zerotrunc.control | R Documentation |
Various parameters that control fitting of zero-truncated count regression models
using zerotrunc
.
zerotrunc.control(method = "BFGS", maxit = 10000, start = NULL, ...)
method |
characters string specifying the |
maxit |
integer specifying the |
start |
an optional vector of starting values, see details. |
... |
arguments passed to |
All parameters in zerotrunc
are estimated by maximum likelihood
using optim
with control options set in zerotrunc.control
.
Most arguments are passed on directly to optim
, only start
is used to
control how optim
is called.
Starting values can be supplied via start
or estimated by
glm.fit
(default). Standard errors are derived numerically using
the Hessian matrix returned by optim
. To supply starting
values, start
should be a vector with (at least) starting values for the
regression coefficients. In case a negative binomial distribution with unknown theta
is used, a starting value for theta may be supplied by adding an additional vector
element (e.g., start = c(coef, theta)
); by default theta = 1
is used as
the starting value otherwise.
A list with the arguments specified.
zerotrunc
data("CrabSatellites", package = "countreg")
## default start values
zt_nb <- zerotrunc(satellites ~ width + as.numeric(color), data = CrabSatellites,
subset = satellites > 0, dist = "negbin")
## user-supplied start values and other options
zt_nb2 <- zerotrunc(satellites ~ width + as.numeric(color), data = CrabSatellites,
subset = satellites > 0, dist = "negbin", start = c(0.5, 0, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.