# NOT RUN {
## 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
+Webers.length, family = "poisson")
fit2 <- gllvm(y, X, TR, formula = ~ (Bare.ground+Shrub.cover)*
Webers.length, family = "poisson")
# Let's test the need for fourth corner interaction terms using likelihood-ratio test:
anova(fit1, fit2)
# }
Run the code above in your browser using DataLab