# anova.clm2

##### Likelihood ratio test of cumulative link models

Comparison of cumulative link models in likelihood ratio tests. The models may differ by terms in location, scale and nominal formulae, in link, threshold function and random effect structure.

- Keywords
- internal

##### Usage

```
# S3 method for clm2
anova(object, ..., test = c("Chisq", "none"))
# S3 method for clmm2
anova(object, ..., test = c("Chisq", "none"))
```

##### Arguments

##### Value

The method returns an object of class `Anova`

(for printing) and
`data.frame`

with the following elements

character description of the cumulative link models being compared. Location, scale and nominal formulae are separated by "|"s in this order.

the residual degrees of freedom

twice the negative log likelihood (proportional to the deviance)

indication of which models are being compared.

the difference in the degrees of freedom in the models being compared, i.e. the degrees of freedom for the chi-squared test.

the likelihood ratio statistic.

the p-value from the likelihood ratio test. Absent if
`test = "none"`

.

##### See Also

`clm2`

, `addterm`

,
`dropterm`

and
`anova.default`

##### Examples

```
# NOT RUN {
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))
}
# }
```

*Documentation reproduced from package ordinal, version 2019.12-10, License: GPL (>= 2)*