A routine that uses the same internals as feglm.
fenegbin(
formula = NULL,
data = NULL,
weights = NULL,
beta_start = NULL,
eta_start = NULL,
init_theta = NULL,
link = c("log", "identity", "sqrt"),
control = NULL
)A named list of class "feglm". The list contains the following
eighteen elements:
a named vector of the estimated coefficients
a vector of the linear predictor
a vector of the weights used in the estimation
a matrix with the numerical second derivatives
the deviance of the model
the null deviance of the model
a logical indicating whether the model converged
the number of iterations needed to converge
the estimated theta parameter
the number of outer iterations
a logical indicating whether the outer loop converged
a named vector with the number of observations used in the estimation indicating the dropped and perfectly predicted observations
a named vector with the number of levels in each fixed effects
a list with the names of the fixed effects variables
the formula used in the model
the data used in the model after dropping non-contributing observations
the family used in the model
the control list used in the model
an object of class "formula": a symbolic description of
the model to be fitted. formula must be of type y ~ X | k,
where the second part of the formula refers to factors to be concentrated
out. It is also possible to pass clustering variables to feglm
as y ~ X | k | c.
an object of class "data.frame" containing the variables
in the model. The expected input is a dataset with the variables specified
in formula and a number of rows at least equal to the number of
variables in the model.
an optional string with the name of the 'prior weights'
variable in data.
an optional vector of starting values for the structural parameters in the linear predictor. Default is \(\boldsymbol{\beta} = \mathbf{0}\).
an optional vector of starting values for the linear predictor.
an optional initial value for the theta parameter (see
glm.nb).
the link function. Must be one of "log", "sqrt", or
"identity".
a named list of parameters for controlling the fitting
process. See fit_control for details.
# check the feglm examples for the details about clustered standard errors
mod <- fenegbin(mpg ~ wt | cyl, mtcars)
summary(mod)
Run the code above in your browser using DataLab