glmSparse.Rd
glmSparse
is a thin wrapper around MatrixModels::glm4
. The notable
differences are that glmSparse
always fits using a sparse model matrix,
and that it provides an alternate interface for situations where the user
wants to directly provide a sparse model matrix and response variable instead
of using the more standard formula interface. For more details on the
underlying implementation, see MatrixModels::glm4
.
glmSparse(
formula = NULL,
family = stats::gaussian,
data = NULL,
weights = NULL,
subset = NULL,
na.action = stats::na.fail,
start = NULL,
etastart = NULL,
mustart = NULL,
offset = NULL,
doFit = TRUE,
control = list(...),
model = TRUE,
contrasts = NULL,
x = NULL,
y = NULL,
drop.unused.levels = FALSE,
...
)
An object of class formula, (or one that can be coerced to that class): a symbolic description of the model to be fitted.
A description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See family for details of family functions.)
An optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.
an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector.
An optional vector specifying a subset of observations to be used in the fitting process.
A function which indicates what should happen when the data
contain NA
s. The default is set by the na.action setting of options,
and is na.fail if that is unset. The ‘factory-fresh’ default is
na.omit. Another possible value is NULL
, no action. Value
na.exclude can be useful.
Starting values for the parameters in the linear predictor.
Starting values for the parameters in the predictor itself.
Starting values for the parameters in the vector of means.
This can be used to specify an a priori known component
to be included in the linear predictor during fitting. This should be NULL
or a numeric vector of length equal to the number of cases. One or more
offset terms can be included in the formula instead or as well, and if more
than one is specified, their sum is used. See model.offset.
Logical indicating if the model should be fitted (or just returned unfitted).
A list with options on fitting; currently passed unchanged to
(hidden) function IRLS()
.
Currently ignored; here for back-compatibility with glm.
Currently ignored; here for back-compatibility with glm.
Alternate interface for modeling. An already-constructed sparse model matrix (class 'dgCMatrix').
Alternate interface for modeling. A numeric response vector.
Should factors have unused levels dropped? Defaults
to FALSE
.
Potentially arguments passed on to fitter functions; currently unused.
An object of class glpModel
.
Matrix::sparse.model.matrix()
for information on creating sparse
model matrices, and MatrixModels::glm4()
to understand more details on
the implementation.