nominal.test: Likelihood ratio tests of model terms in scale and nominal...

Description Usage Arguments Details Value Author(s) Examples

Description

Add all model terms to scale and nominal formulae and perform likelihood ratio tests. These tests can be viewed as goodness-of-fit tests. With the logit link, nominal_test provides likelihood ratio tests of the proportional odds assumption. The scale_test tests can be given a similar interpretation.

Usage

1
2
3
4
5
6
7
8
9
nominal_test(object, ...)

## S3 method for class 'clm'
nominal_test(object, scope, trace=FALSE, ...)

scale_test(object, ...)

## S3 method for class 'clm'
scale_test(object, scope, trace=FALSE, ...)

Arguments

object

for the clm method an object of class "clm", i.e., the result of a call to clm.

scope

a formula or character vector specifying the terms to add to scale or nominal. In nominal_test terms in scope already in nominal are ignored. In scale_test terms in scope already in scale are ignored.

In nominal_test the default is to add all terms from formula (location part) and scale that are not also in nominal.

In scale_test the default is to add all terms from formula (location part) that are not also in scale.

trace

if TRUE additional information may be given on the fits as they are tried.

...

arguments passed to or from other methods.

Details

The definition of AIC is only up to an additive constant because the likelihood function is only defined up to an additive constant.

Value

A table of class "anova" containing columns for the change in degrees of freedom, AIC, the likelihood ratio statistic and a p-value based on the asymptotic chi-square distribtion of the likelihood ratio statistic under the null hypothesis.

Author(s)

Rune Haubo B Christensen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Fit cumulative link model:
fm <- clm(rating ~ temp + contact, data=wine)
summary(fm)
## test partial proportional odds assumption for temp and contact:
nominal_test(fm)
## no evidence of non-proportional odds.
## test if there are signs of scale effects:
scale_test(fm)
## no evidence of scale effects.

## tests of scale and nominal effects for the housing data from MASS:
if(require(MASS)) {
    fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
    scale_test(fm1)
    nominal_test(fm1)
    ## Evidence of multiplicative/scale effect of 'Cont'. This is a breach
    ## of the proportional odds assumption.
}

ordinal documentation built on May 2, 2019, 5:47 p.m.