Comparison of nested Negative Binomial and Beta-Binomial Regression Models
Allows to compare nested negative binomial and beta-binomial regression models using Wald, score, gradient and likelihood ratio tests.
## S3 method for class 'overglm' anova( object, ..., test = c("wald", "lrt", "score", "gradient"), verbose = TRUE )
object |
an object of the class overglm which is obtained from the fit of a negative binomial or beta-binomial model. |
... |
another objects of the class overglm which are obtained from the fit of negative binomial or beta-binomial models. |
test |
an (optional) character string indicating the required test. The available options are: Wald ("wald"), Rao's score ("score"), likelihood ratio ("lrt") and Terrell's gradient ("gradient") tests. By default, |
verbose |
an (optional) logical indicating if should the report of results be printed. By default, |
The Wald, Rao's score and Terrell's gradient tests are performed using the observed Fisher information matrix.
A matrix with three columns which contains the following:
Chi:
The value of the statistic of the test.
Df:
The number of degrees of freedom.
Pr(>Chi):
The p-value of the 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 fit1 <- overglm(cbind(cells,200-cells) ~ tnf, family="bb(logit)", data=cellular) fit2 <- update(fit1, . ~ . + ifn) fit3 <- update(fit2, . ~ . + tnf:ifn) anova(fit1, fit2, fit3, test="wald") anova(fit1, fit2, fit3, test="score") anova(fit1, fit2, fit3, test="lrt") anova(fit1, fit2, fit3, test="gradient") ## Example 2 fit1 <- overglm(infections ~ frequency, family="nb1(log)", data=swimmers) fit2 <- update(fit1, . ~ . + location) fit3 <- update(fit2, . ~ . + age) fit4 <- update(fit3, . ~ . + gender) anova(fit1, fit2, fit3, fit4, test="wald") anova(fit1, fit2, fit3, fit4, test="score") anova(fit1, fit2, fit3, fit4, test="lrt") anova(fit1, fit2, fit3, fit4, test="gradient")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.