Learn R Programming

pbkrtest (version 0.5.4)

x2__modcomp: Chisq test

Description

Chisq test

Usage

X2modcomp(largeModel, smallModel, betaH = 0, details = 0, ...)

# S3 method for default X2modcomp(largeModel, smallModel, betaH = 0, details = 0, ...)

Arguments

largeModel

An lmer model

smallModel

An lmer model or a restriction matrix

betaH

A number or a vector of the beta of the hypothesis, e.g. L beta=L betaH. If smallModel is a model object then betaH=0.

details

If larger than 0 some timing details are printed.

...

Additional arguments, currently not used.

Author

Ulrich Halekoh uhalekoh@health.sdu.dk, Søren Højsgaard sorenh@math.aau.dk

(fm0 <- lmer(Reaction ~ (Days|Subject), sleepstudy)) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (fm2 <- lmer(Reaction ~ Days + I(Days^2) + (Days|Subject), sleepstudy))

Test for no effect of Days in fm1, i.e. test fm0 under fm1

X2modcomp(fm1, "Days") X2modcomp(fm1, ~.-Days) L1 <- cbind(0, 1)

X2modcomp(fm1, L1) ## FIXME

X2modcomp(fm1, fm0) anova(fm1, fm0)

Details

TBW