test.nested.model: Test for nested ANOVA models

Description Usage Arguments Details Value Author(s) Examples

View source: R/anadiff.R

Description

The function compute the F-statistic for nested ANOVA model.

Usage

1

Arguments

X

this is the design matrix corresponding to the full model. X must be of full rank.

X0

this is the design matrix corresponding to the sub-model. X0 is such that span(X0) is a vectorial subspace of span(X). X0 must be of full rank.

Y

this is a matrix corresponding to the dependent variable (samples in row, variables (e.g. genes) in column.

Details

The F-statistic is computed and the p-value is returned. The F-statistic has r-r0 and n-r degrees of freedom where r is the rank of matrix X, r0 is the rand of matrix X0 and n is the number of observations.

Value

A list with the following items:

theta

The estimation of the paratemer of the full model.

F

Value of the F-statistic.

pvalue

The p-value.

residuals

The residuals for the full model.

sigma2

The estimation of the variance for the full model.

X

The matrix design X

...

Author(s)

Nicolas Servant, Eleonore Gravier, Pierre Gestraud, Cecile Laurent, Caroline Paccard, Anne Biton, Jonas Mandel, Bernard Asselain, Emmanuel Barillot, Philippe Hupe

Examples

1
2
3
4
5
6
Y <- matrix(rnorm(21), 21, 1)
ef <- gl(3,7)
X <- lm(Y ~ ef, x = TRUE)$x
X0 <- lm(Y ~ 1, x = TRUE)$x

res.test <- test.nested.model(X, X0, Y)

EMA documentation built on March 26, 2020, 8:40 p.m.