Skip to content
Prev 13114 / 20628 Next

Predictions from zero-inflated or hurdle models

Hi,

two more questions, sorry.

6.
could it be that where you wrote
normal.evd<-function(x, mu, v){
exp(-exp(x))*dnorm(x, mu, sqrt(v))
}

you're not actually passing the variance but the standard deviation? so the
functions should be

normal.evd<-function(x, mu, sd){
exp(-exp(x))*dnorm(x, mu, sd)
}
normal.zt<-function(x, mu, sd){
exp(x)/(1-exp(-exp(x)))*dnorm(x, mu, sd)
}

Because at least in the example, you were taking the square root here
already: sd_1<-mean(sqrt(m1$VCV[,1]))
Maybe this was a copy-paste from the source where you do it differently? Or
I misunderstood...

An addition to question 5:
5. When I use the correct inverse link function in my old code, but don't
do double integration, I do get a "reasonable" amount of uncertainty around
the reference factor. The predicted means are too low, which I put down to
this approach ignoring the VCV. I was just wondering how this could happen
(actually seeing the "reasonable" amount of uncertainty was what made me
hopeful that my approach might not be entirely wrong).

Best,

Ruben
On Tue, Mar 17, 2015 at 7:53 PM Ruben Arslan <rubenarslan at gmail.com> wrote: