# Lambert (1992) simulation

4 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Lambert (1992) simulation

 Hi, I am trying to replicate Lambert (1992)'s simulation with zero-inflated Poisson models. The citation is here: @article{lambert1992zero, Author = {Lambert, D.}, Journal = {Technometrics}, Pages = {1--14}, Publisher = {JSTOR}, Title = {Zero-inflated {P}oisson regression, with an application to defects in manufacturing}, Year = {1992}} Specifically I am trying to recreate Table 2. But my estimates for Gamma are not working out. Any ideas why? Please cc me on a reply! Thanks, Chris ## ZIP simulations based on Lambert (1992)'s conditions # Empty workspace rm(list=ls()) # Load zero-inflation package library(pscl) # Simulation conditions #3 NumSimulations=2000 X=seq(from=0,to=1,length.out=N) Model.Matrix=cbind(rep(1,length(X)),X) Gamma=c(-1.5,2) Beta=c(1.5,-2) P=exp(Model.Matrix%*%Gamma)/exp(1+Model.Matrix%*%Gamma) Lambda=exp(Model.Matrix%*%Beta) CoefSimulations=matrix(nrow=NumSimulations,ncol=2*dim(Model.Matrix)[2]) for(i in 1 : NumSimulations){ Lambda.Draw=rpois(N,Lambda) U=runif(N) Y=ifelse(U<=P,0,Lambda.Draw) CoefSimulations[i,]=coef(zeroinfl(Y~X|X)) } # What were the estimates? colMeans(CoefSimulations) # My gamma estimates aren't even close ...         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Lambert (1992) simulation

Open this post in threaded view
|
Report Content as Inappropriate