rScore: Repeated Score Test

Description Usage Arguments Value Examples

Description

Individually tests each column of G for association with y while adjusting for X. G may contain missing elements, although the remaining model matrices may not. rScore accelerates association testing by recycling the same null model for each hypothesis test.

Usage

1
rScore(y, G, X, parallel = F)

Arguments

y

Numeric response vector.

G

Numeric matrix of covariates for the target outcome whose regression coefficients are zero under the null.

X

Numeric model matrix included in the null model.

parallel

Run association tests if parallel? Must register parallel backend first.

Value

Vector of asymptotic p-values, one for each column of G.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Genotypes
G = replicate(rbinom(n=1e3,size=2,prob=0.25),n=2000);
G[sample(length(G),size=floor(0.01*length(G)),replace=F)] = NA;
storage.mode(G) = "numeric";
doMC::registerDoMC(cores=2);
# Repeated Score Test
P = rScore(y=y,G=G,X=X,parallel=T);

## End(Not run)

zrmacc/LiST documentation built on May 9, 2019, 8:20 a.m.