anova.DirichletRegModel {DirichletReg} | R Documentation |
This function allows for pairwise tests of Dirichlet regression models using a likelihood ratio test (LRT).
## S3 method for class 'DirichletRegModel'
anova(object, ..., sorted = FALSE)
object |
the model to be compared against those listed in ... |
... |
models to be tested against the one specified as |
sorted |
should the models be sorted according to their numbers or parameters? |
The test statistic is computed LR=-2\left[\log(L_a)-\log(L_b)\right]
where L_i
is the likelihood of model i
with df
equal to the difference of the number of parameters in the models.
Marco J. Maier
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)