powered by
This function is used to calculate the integrated variance correlation between a discrete response variable and a continuous random variable
IVCCA(y, x, K)
The value of the corresponding sample statistic
is the categorical response vector
is a numeric vector
is the number of quantile levels
n=100 y=sample(rep(1:3), n, replace = TRUE, prob = c(1/3,1/3,1/3)) x=c() for(i in 1:n){ x[i]=rnorm(1,mean=2*y[i],sd=1) } IVCCA(y,x,K=5)
Run the code above in your browser using DataLab