comodex: Model comparison

View source: R/anovax.R

comodexR Documentation

Model comparison

Description

Wrapper for functions KRmodcomp, SATmodcomp, PBmodcomp, PBFmodcomp

Usage

comodex(
  largeModel,
  smallModel,
  test = "x2",
  control = list(),
  details = 0,
  ...
)

## S3 method for class 'lmerMod'
comodex(
  largeModel,
  smallModel,
  test = "x2",
  control = list(),
  details = 0,
  ...
)

## S3 method for class 'gls'
comodex(
  largeModel,
  smallModel,
  test = "x2",
  control = list(),
  details = 0,
  ...
)

## S3 method for class 'glmerMod'
comodex(
  largeModel,
  smallModel,
  test = "x2",
  control = list(),
  details = 0,
  ...
)

## S3 method for class 'lm'
comodex(
  largeModel,
  smallModel,
  test = "x2",
  control = list(),
  details = 0,
  ...
)

Arguments

largeModel

An lmer model

smallModel

An lmer model or a restriction matrix

test

A character string

control

A list controlling the model comparions.

details

should details be printed

...

Additional arguments to be passed on to other methods

Author(s)

Søren Højsgaard

Examples

(lmer0 <- lmer(Reaction ~ (Days|Subject), sleepstudy))
(lmer1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(lmer2 <- lmer(Reaction ~ Days + I(Days^2) + (Days|Subject), sleepstudy))

anovax(lmer2, lmer1)
anovax(lmer2, lmer1, test="sat")
anovax(lmer2, .~. - I(Days^2))
anovax(lmer2, lmer1, test="PB", control=list(nsim=50, cl=1))
anovax(lmer2, lmer1, test="PBF", control=list(nsim=50, cl=1))

hojsgaard/pbkrtest documentation built on June 13, 2025, 8:33 a.m.