anova.overglm | R Documentation |
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.
## S3 method for class 'overglm'
anova(object, ..., test = c("wald", "lr", "score", "gradient"), verbose = TRUE)
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, |
verbose |
an (optional) logical indicating if should the report of results be printed. As default, |
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. |
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.
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.