anova.overglm: Comparison of nested models for alternatives to the Poisson...

View source: R/overglm3.R

anova.overglmR Documentation

Comparison of nested models for alternatives to the Poisson and Binomial Regression Models under the presence of Overdispersion.

Description

Allows to compare nested models for regression models based on the negative binomial, beta-binomial, and random-clumped binomial distributions, which are alternatives to the Poisson and binomial regression models under the presence of overdispersion. The comparisons are performed by using the Wald, score, gradient or likelihood ratio tests.

Usage

## S3 method for class 'overglm'
anova(object, ..., test = c("wald", "lr", "score", "gradient"), verbose = TRUE)

Arguments

object

an object of the class overglm.

...

another objects of the class overglm.

test

an (optional) character string which allows to specify the required test. The available options are: Wald ("wald"), Rao's score ("score"), likelihood ratio ("lr") and Terrell's gradient ("gradient") tests. As default, test is set to "wald".

verbose

an (optional) logical indicating if should the report of results be printed. As default, verbose is set to TRUE.

Value

A matrix with the following three columns:

Chi The value of the statistic of the test,
Df The number of degrees of freedom,
Pr(>Chi) The p-value of the test-type test computed using the Chi-square distribution.

References

Buse A. (1982) The Likelihood Ratio, Wald, and Lagrange Multiplier Tests: An Expository Note. The American Statistician 36, 153-157.

Terrell G.R. (2002) The gradient statistic. Computing Science and Statistics 34, 206–215.

Examples

## Example 1: Self diagnozed ear infections in swimmers
data(swimmers)
fit1 <- overglm(infections ~ frequency + location + age + gender, family="nb1(log)", data=swimmers)
anova(fit1, test="wald")
anova(fit1, test="score")
anova(fit1, test="lr")
anova(fit1, test="gradient")

## Example 2: Agents to stimulate cellular differentiation
data(cellular)
fit2 <- overglm(cbind(cells,200-cells) ~ tnf*ifn, family="bb(logit)", data=cellular)
anova(fit2, test="wald")
anova(fit2, test="score")
anova(fit2, test="lr")
anova(fit2, test="gradient")


glmtoolbox documentation built on Sept. 11, 2024, 7:32 p.m.