fit_glm {mfp2} | R Documentation |
Function that fits generalized linear models
Description
Function that fits generalized linear models
Usage
fit_glm(x, y, family, weights, offset, fast = TRUE)
Arguments
x |
a matrix of predictors with nobs observations. |
y |
a vector for the outcome variable. |
family |
a family function e.g. |
weights |
a numeric vector of length nobs of 'prior weights' to be used
in the fitting process. see |
offset |
a numeric vector of length nobs of of a priori known component to be included in the linear predictor during fitting. |
fast |
a logical which determines how the model is fitted. The default
|
Value
A list with the following components:
-
logl
: the log likelihood of the fitted model. -
coefficients
: regression coefficients. -
df
: number of parameters (degrees of freedom). -
sse
: residual sum of squares. -
fit
: the fitted model object.