Displaying 3 results from an estimated 3 matches for "zeroinf".
Did you mean:
zeroing
2012 Sep 10
1
Zero inflated Models- pscl package
Dear R users,
I want to apply zero inflated models with continuous and categorical
variables and I used pscl package from R and the zeroinf() function. My
question are the follow:
a) The value of fitted.values is mu or (1-p)*mu? where p is the probability
of zero came form a zero point mass
b) If mu is zero, how do i know if it is a zero from the zero point mass or
from the count process?
Thank you so much in advance.
Filipa J....
2012 May 05
0
Getting predicted values from a zero-inflated negative binomial using zeroinfl()
Hi,
I am a little confused at the output from predict() for a zeroinfl object.
Here's my confusion:
## From zeroinfl package
fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "negbin")
## The raw zero-inflated overdispersed data
> table(bioChemists$art)
0 1 2 3 4 5 6 7 8 9 10 11 12 16 19
275 246 178 84 67...
2012 Apr 26
2
Lambert (1992) simulation
...ta=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]]