test.nested.model {EMA}R Documentation

Test for nested ANOVA models

Description

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

Usage

test.nested.model(X, X0, Y)

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)

EMA group

Examples

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)


[Package EMA version 1.3.2 Index]