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

anova.DirichletRegModel

Compare Dirichlet Regression Models using an LRT


Description

This function allows for pairwise tests of Dirichlet regression models using a likelihood ratio test (LRT).

Usage

## S3 method for class 'DirichletRegModel'
anova(object, ..., sorted = FALSE)

Arguments

object

the model to be compared against those listed in ...

...

models to be tested against the one specified as object

sorted

should the models be sorted according to their numbers or parameters?

Details

The test statistic is computed LR=-2[log(La)-log(Lb)] where Li is the likelihood of model i with df equal to the difference of the number of parameters in the models.

Author(s)

Marco J. Maier

Examples

ALake <- ArcticLake
ALake$AL <- DR_data(ArcticLake[,1:3])
mod0 <- DirichReg(AL ~ 1, ALake)
mod1 <- DirichReg(AL ~ depth, ALake)
mod2 <- DirichReg(AL ~ depth + I(depth^2), ALake)
anova(mod1, mod0, mod2, sorted = TRUE)

DirichletReg

Dirichlet Regression in R

v0.7-0
GPL (>= 2)
Authors
Marco Johannes Maier [cre, aut] (<https://orcid.org/0000-0002-1715-7456>)
Initial release
2020-05-28

We don't support your browser anymore

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