rotationtest: Rotation testing

View source: R/rotationtest.R

rotationtestsR Documentation

Rotation testing

Description

The functions perform rotation testing based on a matrix of hypothesis observations and a matrix of error observations. Adjusted p-values according to familywise error rates and false discovery rates are calculated.

Usage

rotationtests(xyObj, nSim, verbose = TRUE)

rotationtest(modelData, errorData, simN = 999, dfE = -1, dispsim = TRUE)

Arguments

xyObj

a design-with-responses object created by xy_Obj

nSim

vector of nonnegative integers. The number of simulations to use for each term.

verbose

logical. Whether rotationtests (and rotationtest) should be verbose.

modelData

matrix of hypothesis observations

errorData

matrix of error observations

simN

Number of simulations for each test. Can be a single value or a list of values for each term.

dfE

Degrees of freedom for error needs to be specified if errorData is incomplete

dispsim

When TRUE, dots are displayed to illustrate simulation progress.

Details

modelData and errorObs correspond to hypObs and errorObs calculated by xy_Obj. These matrices are efficient representations of sums of squares and cross-products (see xy_Obj for details). This means that rotationtest can be viewed as a generalised F-test function.

rotationtests is a wrapper function that calls rotationtest for each term in the xyObj and collects the results.

Value

Both functions return a list with components

pAdjusted

adjusted p-values according to familywise error rates

pAdjFDR

adjusted p-values according to false discovery rates

simN

number of simulations performed for each term

Author(s)

Øyvind Langsrud and Bjørn-Helge Mevik

References

Langsrud, Ø. (2005) Rotation Tests. Statistics and Computing, 15, 53–60.

Moen, B., Oust, A., Langsrud, Ø., Dorrell, N., Gemma, L., Marsden, G.L., Hinds, J., Kohler, A., Wren, B.W. and Rudi, K. (2005) An explorative multifactor approach for investigating global survival mechanisms of Campylobacter jejuni under environmental conditions. Applied and Environmental Microbiology, 71, 2086-2094.

See Also

unitest, unitests


ffmanova documentation built on Oct. 18, 2023, 5:08 p.m.