deviancepercentage: Calculate Percentage and Significance of Deviance Explained...

Description Usage Arguments Details Value Author(s) References Examples

Description

This function calculates the percentage of deviance explained by a GLM model and calculates the significance of the model.

Usage

1
deviancepercentage(x,data,test="F",digits=2)

Arguments

x

Result of GLM as calculated by glm or glm.nb.

data

Data set to be used for the null model (preferably the same data set used by the 'full' model).

test

Test statistic to be used for the comparison between the null model and the 'full' model as estimated by anova.glm or anova.negbin: partial match of one of "Chisq", "F" or "Cp".

digits

Number of digits in the calculation of the percentage.

Details

The function calculates the percentage of explained deviance and the significance of the 'full' model by contrasting it with the null model.

For the null model, the data is subjected to na.omit. You should check whether the same data are used for the null and 'full' models.

Value

The function calculates the percentage of explained deviance and the significance of the 'full' model by contrasting it with the null model by ANOVA. The results of the ANOVA are also provided.

Author(s)

Roeland Kindt

References

Kindt, R. & Coe, R. (2005) Tree diversity analysis: A manual and software for common statistical methods for ecological and biodiversity studies.

http://www.worldagroforestry.org/output/tree-diversity-analysis

Examples

1
2
3
4
5
6
7
8
library(vegan)
data(dune)
data(dune.env)
dune.env$Agrostol <- dune$Agrostol
Count.model1 <- glm(Agrostol ~ Management + A1, family=quasipoisson(link=log), 
    data=dune.env, na.action=na.omit)
summary(Count.model1)
deviancepercentage(Count.model1, dune.env, digits=3)

BiodiversityR documentation built on July 15, 2018, 9:02 a.m.