Learn R Programming

fdrci (version 2.4)

meff.jm: Estimate the Effective Number of Tests

Description

Estimate the effective number of tests using a permutation-based approach.

Usage

meff.jm(mydat, B = 1)

Value

Numeric. Returns the estimated effective number of tests averaged over B permutations.

Arguments

mydat

A design matrix with \(n\) observations (rows) and \(p\) covariates (columns).

B

Integer. Number of permutations to perform. (Default is 1)

Author

Joshua Millstein, Eric S. Kawaguchi

Details

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.

References

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.

Examples

Run this code

# 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)

Run the code above in your browser using DataLab