meff.jm: Estimate the Effective Number of Tests

View source: R/meff.R

meff.jmR Documentation

Estimate the Effective Number of Tests

Description

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

Usage

meff.jm(mydat, B = 1)

Arguments

mydat

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

B

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

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.

Value

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

Author(s)

Joshua Millstein, Eric S. Kawaguchi

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


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

fdrci documentation built on Oct. 18, 2022, 9:07 a.m.