eglm.wfit | R Documentation |
Efficient Generalized Linear Model Weighted Fit ("eglm.wfit"
) is used
to fit generalized linear models in an equivalent way to
"glm.fit"
but in a reduced time depending on the design matrix
and the family (or link).
eglm.wfit(
x,
y,
weights = rep.int(1, nobs),
start = NULL,
etastart = NULL,
mustart = NULL,
offset = rep.int(0, nobs),
family = gaussian(),
control = list(),
intercept = TRUE,
singular.ok = TRUE,
reduce = FALSE
)
x , y |
For |
weights |
an optional vector of weights to be used in the fitting
process. Should be |
start |
starting values for the parameters in the linear predictor. |
etastart |
starting values for the linear predictor. |
mustart |
starting values for the vector of means. |
offset |
this can be used to specify an a priori known component
to be included in the linear predictor during fitting. This should be
|
family |
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 |
control |
a list of parameters for controlling the fitting process. For
|
intercept |
logical value indicating whether intercept should be
included in the null model. Defaults to |
singular.ok |
logical; if FALSE a singular fit is an error. |
reduce |
logical; if TRUE an alternate design matrix of |
eglm.wfit
is a workhorse function: it is not normally called
directly but can be more efficient where the response vector, design matrix
and family have already been calculated. Use eglm
for most of the
cases.
A list that contains the same elements as the output from
"glm.fit"
, with the addition of the vector "good" that
indicates with logicals which observations were used in the fitting process.
x <- cbind(rep(1, nrow(mtcars)), mtcars$wt)
y <- mtcars$mpg
eglm.wfit(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.