Skip to content

zero truncated poisson regression

3 messages · Achim Zeileis, Iasonas Lamprianou

#
On Sun, 31 Jul 2011, Iasonas Lamprianou wrote:

            
As previously pointed out by others on this list: hurdle() is not what you 
are looking for (although it is related to what you want to do). The 
hurdle() model is a two-part model consisting of a zero-truncated count 
part and a binary part for modeling N=0 vs N>0. See also 
vignette("countreg", package = "pscl") for details.

As you don't need the binary hurdle part, you cannot use hurdle() 
directly.

This is why the package "countreg" on R-Forge provides the function 
zerotrunc() which essentially does the same thing as the count part in 
hurdle().

install.packages("countreg", repos = "http://R-Forge.R-project.org")
library("countreg")
m <- zerotrunc(n ~ type + diam, data = an, dist = "poisson")
summary(m)
#
On Mon, 1 Aug 2011, Iasonas Lamprianou wrote:

            
The package still needs some proper documentation and some cleaning up 
which is why it is not yet on CRAN.

The code, however, is well tested because it is exactly the code 
underlying the hurdle() function in "pscl". Hence, the "zerotrunc" objects 
are rather similar in many respect to "hurdle" objects. Starting from the 
JSS paper you should hopefully be able to find your way.
Z