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

anova.gllvm

Analysis Of Deviance for gllvm


Description

Computes an analysis of deviance table for two generalized linear latent variable model fits.

Usage

## S3 method for class 'gllvm'
anova(object, ..., which = "multi", method = "holm")

Arguments

object

an object of class 'gllvm'.

...

one or more objects of class 'gllvm'

which

either "multi" or "uni". If "uni", performs anova for each species separately.

method

method used to adjust p-values for multiple testing when which="uni". One of "holm" (default), "hochberg", "hommel", "bonferonni", "BH", BY", "fdr", or "none". See p.adjust for more information.

Details

Computes likelihood-ratio test for two or more gllvm models. Test results makes sense only for nested models. Notice also that this test is not designed for testing models which have degrees of freedom difference larger than 20. For such models the P-value should be treated as very approximate.

Author(s)

Jenni Niku, Bert van der Veen

Examples

## Load a dataset from the mvabund package
data(antTraits)
y <- antTraits$abund
X <- antTraits$env
TR <- antTraits$traits
# Fit gllvm model
fit1 <- gllvm(y, X, TR, formula = ~ Bare.ground + Shrub.cover, family = poisson())
fit2 <- gllvm(y, X, TR, formula = ~ Bare.ground + Shrub.cover +
             (Bare.ground + Shrub.cover) : Webers.length, family = poisson())
# Test if the model with fourth corner interaction terms is significantly
# better using likelihood-ratio test:
anova(fit1, fit2)

gllvm

Generalized Linear Latent Variable Models

v1.3.0
GPL-2
Authors
Jenni Niku [aut, cre], Wesley Brooks [aut], Riki Herliansyah [aut], Francis K.C. Hui [aut], Sara Taskinen [aut], David I. Warton [aut], Bert van der Veen [aut]
Initial release
2021-4-26

We don't support your browser anymore

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