Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

clm.anova

ANODE Tables and Likelihood ratio test of cumulative link models


Description

Type I, II, and III analysis of deviance (ANODE) tables for cumulative link models and comparison of cumulative link models with likelihood ratio tests. Models may differ by terms in location, scale and nominal formulae, in link, threshold function.

Usage

## S3 method for class 'clm'
anova(object, ..., type = c("I", "II", "III", "1", "2", "3"))

Arguments

object

a clm object.

...

optionally one or more additional clm objects.

type

the type of hypothesis test if anova is called with a single model; ignored if more than one model is passed to the method.

Details

The ANODE table returned when anova is called with a single model apply only to terms in formula, that is, terms in nominal and scale are ignored.

Value

An analysis of deviance table based on Wald chi-square test if called with a single model and a comparison of models with likelihood ratio tests if called with more than one model.

Author(s)

Rune Haubo B Christensen

See Also

Examples

## Analysis of deviance tables with Wald chi-square tests:
fm <- clm(rating ~ temp * contact, scale=~contact, data=wine)
anova(fm, type="I")
anova(fm, type="II")
anova(fm, type="III")

options(contrasts = c("contr.treatment", "contr.poly"))
m1 <- clm2(SURENESS ~ PROD, scale = ~PROD, data = soup,
          link = "logistic")

## anova
anova(m1, update(m1, scale = ~.-PROD))
mN1 <- clm2(SURENESS ~ 1, nominal = ~PROD, data = soup,
           link = "logistic")
anova(m1, mN1)
anova(m1, update(m1, scale = ~.-PROD), mN1)

## Fit model from polr example:
if(require(MASS)) {
    fm1 <- clm2(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
    anova(fm1, update(fm1, scale =~ Cont))
}

ordinal

Regression Models for Ordinal Data

v2019.12-10
GPL (>= 2)
Authors
Rune Haubo Bojesen Christensen [aut, cre]
Initial release
2019-12-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.