ezinb {zicounts}R Documentation

The expected value of the censored zero-inflated negative binomial model

Description

'ezinb' computes the expected value of the censored zero-inflated negative binomial regression model

Usage

ezinb((coeff = NULL, resp = y ~ ., upper = r ~ ., x =  ~ 1, z =  ~ 1, data=NULL,
        sub = NULL)

Arguments

coeff Regression coefficients from 'zicensor' a.k.a censored ZINB regression model.
resp a symbolic description of the response, of the form resp=y~., where y is the response variable.
x a formula to describe the covariates to the Poisson (or Negative binomial) part of the model, of the form x=~x1 + x2 + ..., where x1,x2,... are explanatory variables.
z a formula to describe the covariates to zero-indlated part, of the form z=~z1 + z2 + ..., where z1, z2,... are explanatory variables.
data a frame containing the variables in the model.
sub an optional logical expression specifying a subset of observations to be used in the fitting process. This should be specified in the form: e.g. subsets =expression(w==0).

Value

returns a vector of the censored zinb expected values.

Author(s)

S. M. Mwalili <samuelmwalili@yahoo.com>

See Also

zicounts,zicensor.

Examples

## load the artificial 'teeth' data
 data(teeth)
 names(teeth)
 
##  fit zero-inflated negative binomial regression model
zinb.cens <- zicensor(resp = dmft~., upper = decid~.,x =~gender + age,z =~gender + age, data=teeth)
zinb.cens 

## expected value of the censored zinb model
## uncomment to run
#zinb.e <- ezinb(coeff=zinb.cens$coeff,resp = dmft~., upper = decid~.,
#       x =~gender + age,z =~gender + age, data=teeth)
#zinb.e

[Package zicounts version 1.1.5 Index]