anova.gllvm: Analysis Of Deviance for gllvm

Description Usage Arguments Details Author(s) Examples

View source: R/anova.gllvm.R

Description

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

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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 documentation built on July 29, 2021, 1:06 a.m.