powered by
Generalized Measure of Correlation: GMC(X | Y)
GMC_X_given_Y(X, Y, kernel = dnorm)
GMC(X|Y) estimate
Predictor variable
Response variable
Kernel function (default = dnorm)
# Generate sample data with nonlinear relationship set.seed(123) n <- 1000 X <- rnorm(n) Y <- X^2 + rnorm(n, sd = 0.5) # Calculate GMC(X|Y) gmc_result <- GMC_X_given_Y(X, Y) print(gmc_result)
Run the code above in your browser using DataLab