ANOVA: ANOVA

Description Usage Arguments Details Value Author(s) Examples

Description

Constructs an ANOVA model.

Usage

1
ANOVA(DV,family=NO(),design,N,mu,sigma,nu,tau)

Arguments

DV

either a list or a RandomVariable (see details)

.

design

either a data.frame or VariableList containing the factors of the design (see details).

N

a vector with the number of observations in each cell of the design.

mu

a vector with the means in each cell of the design.

sigma

a vector with the standard deviations in each cell of the design.

nu

a vector with the standard deviations in each cell of the design.

tau

a vector with the standard deviations in each cell of the design.

family

a gamlss.family object

Details

The ANOVA function constructs an ANalysis Of VAriance (ANOVA) model. The workhorse function is GLM_create, which should not be called directly.

Value

An object of class ANOVA (directly extending the GLM class).

Author(s)

Maarten Speekenbrink

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mod <- ANOVA(design=data.frame(A=factor(c(1,1,2,2),labels=c("A1","A2")),B=factor(c(1,2,1,2),labels=c("B1","B2"))),DV=list(name="Y",min=-Inf,max=Inf,digits=8),N=c(20,20,20,20),mu=c(10,20,20,30),sigma=c(5,5,5,5),family=NO())
mod <- simulate(mod)

# create two factors and put them into a variablelist
f1 <- NominalVariable(factor(c(1,1,2,2),labels=c("A1","A2")),name="A")
f2 <- NominalVariable(factor(c(1,2,1,3),labels=c("B1","B2","B3")),name="A")
design <- VariableList(list(f1,f2))
# and a random interval variable
d <- RandomIntervalVariable(numeric(1),name="Y",min=-10,max=Inf,digits=2)
mod2 <- ANOVA(design=design,DV=d,family=NOF(),N=rep(10,4),mu=c(10,20,10,30),sigma=c(5,5,5,5),nu=c(1,1,1,1))
mod2 <- simulate(mod2)

simdat.base documentation built on May 2, 2019, 5:53 p.m.