anova_quasipois.reg: ANOVA for two quasi Poisson regression models

View source: R/anova_related.R

ANOVA for two quasi Poisson regression modelsR Documentation

ANOVA for two quasi Poisson regression models

Description

ANOVA for two quasi Poisson regression models.

Usage

anova_quasipois.reg(mod0, mod1, n) 

Arguments

mod0

An object as returned by the "qpois.reg" function. This is the null model.

mod1

An object as returned by the "qpois.reg" function. This is the alternative model.

n

The sample size. This is necessary to calculate the degrees of freedom.

Details

This is an ANOVA type significance testing for two quasi Poisson models.

Value

A vector with 4 elements, the test statistic value, its associated p-value and the relevant degrees of freedom of the numerator and the denominator.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

References

Papke L. E. & Wooldridge J. (1996). Econometric methods for fractional response variables with an application to 401(K) plan participation rates. Journal of Applied Econometrics, 11(6): 619–632.

McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.

See Also

anova_qpois.reg, qpois.reg, univglms, quasipoisson.anova

Examples

## Not run: 
y <- rnbinom(200, 10, 0.5)
x <- matrix(rnorm(200 * 3), ncol = 3)
a1 <- qpois.reg(x, y)
a0 <- qpois.reg(x[, 1], y)
res<-anova_quasipois.reg(a0, a1, 200)
b1 <- glm(y ~ x, family = quasipoisson)
b0 <- glm(y ~ x[, 1], family = quasipoisson)
res<-anova(b0, b1, test = "F")
c1 <- glm(y ~ x, family = poisson)
c0 <- glm(y ~ x[, 1], family = poisson)
res<-anova(c0, c1, test = "Chisq")

## End(Not run)

Rfast documentation built on March 18, 2022, 7:41 p.m.