hurdle {pscl}R Documentation

Fit hurdle models to count data

Description

Estimate a hurdle regression model for count data model via maximum likelihood

Usage

hurdle(count = y ~ ., x = ~1, z = ~1, data = list(), link = "logit",
        dist = "poisson", method = "BFGS", trace = FALSE,
        maxit = 50000, na.action = na.omit)

Arguments

count count being modeled, passed as the left-hand side of a link{formula}; lowest count must be zero
x right-hand side of a formula giving covariates for the count part of the model
z right-hand side of a formula giving covariates for the hurdle part of the model
data a data frame
link link function for zero-inflated part of the model (choices are logit or probit)
dist count model, "poisson" (default) or "negbin"
method method for maximizing the log-likelihood function, only "BFGS" and "Nelder-Mead" are supported
trace logical, if TRUE, display progress of maximization
maxit maximum number of iterations in maximization
na.action method for handling missing data, default is na.omit

Details

Value

An object of class "hurdle"

Note

Only minimal support for this class thus far; e.g., no predict method

Author(s)

Simon Jackman <jackman@stanford.edu>

References

See Also

zeroinfl, summary.hurdle

Examples

data(bioChemists)
hp <- hurdle(count=art ~ .,
              x = ~ fem + mar + kid5 + phd + ment,
              z = ~ fem + mar + kid5 + phd + ment,
              data=bioChemists,trace=TRUE)
summary(hp)

hnb <- hurdle(count=art ~ .,
              x = ~ fem + mar + kid5 + phd + ment,
              z = ~ fem + mar + kid5 + phd + ment,
              dist="negbin",
              data=bioChemists,trace=TRUE)
summary(hnb)

[Package pscl version 0.52 Index]