estequa.zeroinflation: Estimating Equations in Regression Models to deal with...

View source: R/overglm3.R

estequa.zeroinflationR Documentation

Estimating Equations in Regression Models to deal with Zero-Excess in Count Data

Description

Computes the estimating equations evaluated at the parameter estimates and the observed data for regression models to deal with zero-excess in count data.

Usage

## S3 method for class 'zeroinflation'
estequa(object, submodel = c("counts", "zeros"), ...)

Arguments

object

an object of the class zeroinflation.

submodel

an (optional) character string which allows to specify the model: "counts" or "zeros". By default, submodel is set to "counts".

...

further arguments passed to or from other methods.

Value

A vector with the values of the estimating equations evaluated at the parameter estimates and the observed data.

Examples

####### Example 1: Roots Produced by the Columnar Apple Cultivar Trajan
data(Trajan)
fit1 <- zeroalt(roots ~ photoperiod, family="nbf(log)", zero.link="logit", data=Trajan)
estequa(fit1)

fit1a <- zeroinf(roots ~ photoperiod, family="nbf(log)", zero.link="logit", data=Trajan)
estequa(fit1a)

####### Example 2: Self diagnozed ear infections in swimmers
data(swimmers)
fit2 <- zeroalt(infections ~ frequency | location, family="nb1(log)", data=swimmers)
estequa(fit2)

fit2a <- zeroinf(infections ~ frequency | location, family="nb1(log)", data=swimmers)
estequa(fit2a)

####### Example 3: Article production by graduate students in biochemistry PhD programs
bioChemists <- pscl::bioChemists
fit3 <- zeroalt(art ~ fem + kid5 + ment, family="nb1(log)", data = bioChemists)
estequa(fit3)

fit3a <- zeroinf(art ~ fem + kid5 + ment | ment, family="nb1(log)", data = bioChemists)
estequa(fit3a)

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