I have an example data frame as follows.
data.df = data.frame(Y=c(0,0,0,0,0,0,0,0,0,0,1,2,3),X1=c(3,5,3,2,5,6,3,5,1,3,1,7,8),X2=c(6,2,1,6,7,1,1,4,2,6,7,2,3))
To create and update the Poisson model I would do the following
model.poi = glm(Y~X1+X2,data=data.df,family="poisson")
summary(model.poi)
model.poi.2 = update(model.poi,~. -X2)
summary(model.poi.2)
I can create a Zero Inflated Poisson model by doing the following
require(pscl)
model.zip = zeroinfl(Y~X1+X2|X1+X2,data=data.df,dist="poisson")
summary(model.zip)
How would I go about updating the zero inflated model in the same manner as the Poisson glm?