hurdle {pscl} | R Documentation |
Estimate a hurdle regression model for count data model via maximum likelihood
hurdle(count = y ~ ., x = ~1, z = ~1, data = list(), link = "logit", dist = "poisson", method = "BFGS", trace = FALSE, maxit = 50000, na.action = na.omit)
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 |
An object of class "hurdle"
Only minimal support for this class thus far; e.g., no predict method
Simon Jackman <jackman@stanford.edu>
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)