unbias.eigens: Unbiased estimation of leading eigenvalues

Description Usage Arguments Details Value Author(s) References Examples

View source: R/unbias.eigens.R

Description

A function called by setpath(), used to attain unbiased estimates of leading eigenvalues and to estimate the leading eigenvalues under the null hypothesis.

Usage

1
unbias.eigens(L, g, w, minalpha = NULL)

Arguments

L

A vector of length two containing a leading eigenvalue from each of the two datasets.

g

A vector of length two containing the gamma (p/n) values from the two datasets.

w

The weights to assign to the two classes when estimating common leading eigenvalues under the null hypothesis.

minalpha

Can be used to tweak the estimation of the leading eigenvalues under the null hypothesis. If NULL, eigenvalues are truncated below at 1 + 2*sqrt(gamma). Otherwise, eigenvalues are truncated below at 1 + sqrt(gamma) + minalpha.

Details

Called by the setpath() function, not useful on its own.

Value

QLcorrection

The correction factor to remove the bias in the difference between the two eigenvalues.

a0

The common eigenvalue estimated under the null hypothesis

a

The unbiased eigenvalue estimates from each class

Author(s)

Patrick Danaher

References

Patrick Danaher, Debashis Paul, and Pei Wang. "Covariance-based analyses of biological pathways." Biometrika (2015)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## The function is currently defined as
function (L, g, w, minalpha = NULL) 
{
    if (length(minalpha) == 0) {
        minalpha = sqrt(max(g))
    }
    a = c()
    for (k in 1:2) {
        if (L[k] < (1 + sqrt(g[k]))^2) {
            a[k] = 1 + sqrt(max(g)) + minalpha
        }
        if (L[k] >= (1 + sqrt(g[k]))^2) {
            a[k] = ((1 + L[k] - g[k]) + sqrt((1 + L[k] - g[k])^2 - 
                4 * L[k]))/2
        }
    }
    a0 = sum(a * w)
    a0 = max(c(a0, 1 + sqrt(g)))
    QLcorrection = (g[1] - g[2]) * a0/(a0 - 1)
    return(list(QLcorrection = QLcorrection, a0 = a0, a = a))
  }

SETPath documentation built on May 2, 2019, 8:32 a.m.