rScore.mnr: Multivariate Regression Repeated Score Test

Description Usage Arguments Value Examples

View source: R/rScore.R

Description

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

Usage

1
2
rScore.mnr(Y, j = 1, G, X, maxit = 100, eps = 1e-08, report = F,
  parallel = F)

Arguments

Y

Outcome matrix.

j

Column number of the outcome of interest. By default, j=1.

G

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

X

List of model matrices, one for each outcome.

maxit

Maximum number of parameter updates.

eps

Minimum acceptable improvement in log likelihood.

report

Report model fitting progress? Default is FALSE.

parallel

Run association testing in parallel? Must register parallel backend first.

Value

A numeric vector of p-values, one for each column of G.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# See `? rMNR` for data generation
# See vignette for test description
# Genotype matrix
G = replicate(2000,rbinom(n=1000,size=2,prob=0.25));
storage.mode(G) = "numeric";
# Introduce missingness
G[sort(sample(length(G),size=0.01*length(G)))] = NA;
# Repeated Score test
R = rScore.mnr(Y=Y,G=G,X=X,report=T);
# Estimated size
mean(R<=0.05);

## End(Not run)

zrmacc/MNR documentation built on May 17, 2019, 8:47 p.m.