mixedroast: Multiple Contrast Rotation Tests based on Marginal Mixed...

Description Usage Arguments Details Value Author(s) References Examples

Description

Adaption of the roast function in package limma to perform a maxT-test for fixed effects in multiple linear mixed models, controlling FWER for multiple contrasts.

Usage

1
mixedroast(formula, data = NULL, K, nrot = 9999, adjusted = TRUE)

Arguments

formula

A formula object, analogously to lmer, with a matrix of response variables (independent subjects in rows) on the left, and design covariates + random effects on the right hand side.

data

A data.frame object, searching for column names in formula.

K

A contrast matrix (different contrasts in rows), with the same number of columns as number of parameters in the model

nrot

Number of Monte Carlo simulation steps

adjusted

logical, if TRUE single-step maxT FWER control is performed; if FALSE the comparison-wise error rate is controlled

Details

Most of the code was taken from function roast in package limma (Bioconductor).

Value

A list with

Y

The matrix of response variables

X

The design matrix

statistic

A matrix of test statistics

pvalue

A matrix of (adjusted) p-values

B

A matrix with contrast parameter estimates

mrot

A vector with simulated maxT statistics under H0

Author(s)

Daniel Gerhard

References

Wu, D, Lim, E, Francois Vaillant, F, Asselin-Labat, M-L, Visvader, JE, and Smyth, GK (2010). ROAST: rotation gene set tests for complex microarray experiments. Bioinformatics 26, 2176-2182.

Langsrud, O (2005). Rotation tests. Statistics and Computing 15, 53-60.

Examples

1
2
3
4
5
6
7
8
9
# Soils MANOVA example of package car
data("Soils", package = "car")
# Using the Group dummy variable summarizing the 2-factorial design
# Contrasts for all-pair comparison of Group levels
K <- multcomp::contrMat(table(Soils$Group), type="Tukey")
# define Block as random factor
mxr <- mixedroast(cbind(pH, N, Dens, P, Ca, Mg, K, Na, Conduc) ~ Group-1 + (1|Block), 
                  data=Soils, K=K, nrot=999)
mxr$pvalue

daniel-gerhard/mcroast documentation built on May 14, 2019, 3:38 p.m.