Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.DEB.2.02.1209110832290.4898@paninaro.uibk.ac.at>
Date: 2012-09-11T06:37:34Z
From: Achim Zeileis
Subject: Zero inflated Models- pscl package
In-Reply-To: <1347308619164-4642689.post@n4.nabble.com>

On Mon, 10 Sep 2012, Filipa J. wrote:

> 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

See vignette("countreg", package = "pscl"), especially Appendix C.

The default predict(..., type = "response") and fitted(...) both compute 
the expected value Equation (8). This corresponds to your (1-p)*mu but 
uses a different notation.

> b) If mu is zero, how do i know if it is a zero from the zero point mass 
> or from the count process?

You can inspect all component: Your "mu" ("exp(x'b)" in the notation of 
the paper) can be computed with predict(..., type = "count") and "p" ("pi" 
in the paper) with predict(..., type = "zero").

Best,
Z