anova.BTm: Compare Nested Bradley Terry Models

Description Usage Arguments Details Value Warning Author(s) See Also Examples

Description

Compare nested models inheriting from class "BTm". For models with no random effects, compute analysis of deviance table, otherwise compute Wald tests of additional terms.

Usage

1
2
## S3 method for class 'BTm'
anova(object, ..., dispersion = NULL, test = NULL)

Arguments

object

a fitted object of class inheriting from "BTm".

...

additional "BTm" objects.

dispersion

a value for the dispersion. Not implemented for models with random effects.

test

optional character string (partially) matching one of "Chisq", "F" or "Cp" to specify that p-values should be returned. The Chisq test is a likelihood ratio test for models with no random effects, otherwise a Wald test. Options "F" and "Cp" are only applicable to models with no random effects, see stat.anova().

Details

For models with no random effects, an analysis of deviance table is computed using anova.glm(). Otherwise, Wald tests are computed as detailed here.

If a single object is specified, terms are added sequentially and a Wald statistic is computed for the extra parameters. If the full model includes player covariates and there are players with missing values over these covariates, then the NULL model will include a separate ability for these players. If there are missing values in any contest-level variables in the full model, the corresponding contests will be omitted throughout. The random effects structure of the full model is assumed for all sub-models.

For a list of objects, consecutive pairs of models are compared by computing a Wald statistic for the extra parameters in the larger of the two models.

The Wald statistic is always based on the variance-covariance matrix of the larger of the two models being compared.

Value

An object of class "anova" inheriting from class "data.frame".

Warning

The comparison between two or more models will only be valid if they are fitted to the same dataset. This may be a problem if there are missing values and 's default of na.action = na.omit is used. An error will be returned in this case.

The same problem will occur when separate abilities have been estimated for different subsets of players in the models being compared. However no warning is given in this case.

Author(s)

Heather Turner

See Also

BTm(), add1.BTm()

Examples

1
2
3
4
5
result <- rep(1, nrow(flatlizards$contests))
BTmodel <- BTm(result, winner, loser, ~ throat.PC1[..] + throat.PC3[..] +
               head.length[..] + (1|..), data = flatlizards,
               trace = TRUE)
anova(BTmodel)

BradleyTerry2 documentation built on Feb. 3, 2020, 5:08 p.m.