meff.jm | R Documentation |
Estimate the effective number of tests using a permutation-based approach.
meff.jm(mydat, B = 1)
mydat |
A design matrix with n observations (rows) and p covariates (columns). |
B |
Integer. Number of permutations to perform. (Default is 1) |
The effective no of independent vars is the sum of the scaled eigenvalues for truly independent vars (n) minus the variance inflation of the top eigenvalues, that is, (observed - permuted) The sum of the eigenvalues of the correlation matrix = trace = sum of diag = n. The eigenvalues of variables X can be thought of as normalized Dependencies between variables will increase the magnitude of top eigenvalues, therefore, the effective number of independent variables is equal to the proportion of the sum of eigenvalues attributed to independence minus the proportion attributed to dependencies.
Numeric. Returns the estimated effective number of tests averaged over B
permutations.
Joshua Millstein, Eric S. Kawaguchi
Millstein J, Volfson D. 2013. Computationally efficient permutation-based confidence interval estimation for tail-area FDR. Frontiers in Genetics | Statistical Genetics and Methodology 4(179):1-11.
# Independent ss=300 nvar=100 X = as.data.frame(matrix(rnorm(ss * nvar), nrow = ss, ncol = nvar)) meff.jm(X, B = 5) # High correlation S = matrix(0.9, nvar, nvar) diag(S) = 1 X = as.matrix(X) %*% chol(S) meff.jm(X, B = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.