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.

1 2 | ```
rotationtest(modelData, errorData, simN = 999, dfE = -1, dispsim = TRUE)
rotationtests(xyObj, nSim, verbose = TRUE)
``` |

`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 |

`dispsim` |
When |

`xyObj` |
a design-with-responses object created by |

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

`verbose` |
logical. Whether |

`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.

Both functions return a list with components

`pAdjusted` |
adjusted |

`pAdjFDR` |
adjusted |

`simN` |
number of simulations performed for each term |

Øyvind Langsrud and Bjørn-Helge Mevik

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.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.