powered by
A unified interface to perform Poisson, Negbin and log-normal Poisson models
poisreg( formula, data, weights, subset, na.action, offset, contrasts = NULL, start = NULL, mixing = c("none", "gamma", "lognorm"), vlink = c("nb1", "nb2"), opt = c("bfgs", "nr", "newton"), maxit = 100, trace = 0, check_gradient = FALSE, ... )# S3 method for poisreg scoretest(object, ..., vcov = NULL)# S3 method for poisreg residuals(object, ..., type = c("deviance", "pearson", "response"))
# S3 method for poisreg scoretest(object, ..., vcov = NULL)
# S3 method for poisreg residuals(object, ..., type = c("deviance", "pearson", "response"))
an object of class c("poisreg", "micsr"), see micsr::micsr for further details.
c("poisreg", "micsr")
micsr::micsr
a symbolic description of the model, (for the count component and for the selection equation)
a data frame
see stats::lm,
stats::lm
a vector of starting values
the mixing distribution, one of "none", "gamma" and "lognorm"
"none"
"gamma"
"lognorm"
one of "nb1" and "nb2"
"nb1"
"nb2"
optimization method
maximum number of iterations
printing of intermediate result
if TRUE the numeric gradient and hessian are computed and compared to the analytical gradient and hessian
TRUE
further arguments
a poisreg object
poisreg
the covariance matrix estimator to use for the score test
the type of residuals for the residuals method
residuals
nb1 <- poisreg(trips ~ workschl + size + dist + smsa + fulltime + distnod + realinc + weekend + car, trips, mixing = "gamma", vlink = "nb1")
Run the code above in your browser using DataLab