apply_jackstraw: Non-Parametric Jackstraw for Principal Component Analysis...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Estimates statistical significance of association between variables and their principal components (PCs).

Usage

1
2
3
4
5
6
apply_jackstraw(object, PC = NULL, r = NULL, s = NULL, B = NULL,
  covariate = NULL, verbose = TRUE, seed = NULL)

## S4 method for signature 'deSet'
apply_jackstraw(object, PC = NULL, r = NULL, s = NULL,
  B = NULL, covariate = NULL, verbose = TRUE, seed = NULL)

Arguments

object

S4 object: deSet

PC

a numeric vector of principal components of interest. Choose a subset of r significant PCs to be used.

r

a number (a positive integer) of significant principal components.

s

a number (a positive integer) of synthetic null variables. Out of m variables, s variables are independently permuted.

B

a number (a positive integer) of resampling iterations. There will be a total of s*B null statistics.

covariate

a data matrix of covariates with corresponding n observations.

verbose

a logical indicator as to whether to print the progress.

seed

a seed for the random number generator.

Details

This function computes m p-values of linear association between m variables and their PCs. Its resampling strategy accounts for the over-fitting characteristics due to direct computation of PCs from the observed data and protects against an anti-conservative bias.

Provide the deSet, with m variables as rows and n observations as columns. Given that there are r significant PCs, this function tests for linear association between m varibles and their r PCs.

You could specify a subset of significant PCs that you are interested in (PC). If PC is given, then this function computes statistical significance of association between m variables and PC, while adjusting for other PCs (i.e., significant PCs that are not your interest). For example, if you want to identify variables associated with 1st and 2nd PCs, when your data contains three significant PCs, set r=3 and PC=c(1,2).

Please take a careful look at your data and use appropriate graphical and statistical criteria to determine a number of significant PCs, r. The number of significant PCs depends on the data structure and the context. In a case when you fail to specify r, it will be estimated from a permutation test (Buja and Eyuboglu, 1992) using a function permutationPA.

If s is not supplied, s is set to about 10 supplied, B is set to m*10/s.

Value

apply_jackstraw returns a list containing the following slots:

Author(s)

Neo Christopher Chung nc@princeton.edu

References

Chung and Storey (2013) Statistical Significance of Variables Driving Systematic Variation in High-Dimensional Data. arXiv:1308.6013 [stat.ME] http://arxiv.org/abs/1308.6013

More information available at http://ncc.name/

See Also

permutationPA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(splines)
data(kidney)
age <- kidney$age
sex <- kidney$sex
kidexpr <- kidney$kidexpr
cov <- data.frame(sex = sex, age = age)
# create models
null_model <- ~sex
full_model <- ~sex + ns(age, df = 4)
# create deSet object from data
de_obj <- build_models(data = kidexpr, cov = cov, null.model = null_model,
                      full.model = full_model)
## apply the jackstraw
out = apply_jackstraw(de_obj, PC=1, r=1)
## Use optional arguments
## For example, set s and B for a balance between speed of the algorithm and accuracy of p-values
## out = apply_jackstraw(dat, PC=1, r=1, s=10, B=1000, seed=5678)

StoreyLab/edge documentation built on May 9, 2019, 3:09 p.m.