fit_model {mfp2} | R Documentation |
Function that fits models supported by mfp2
Description
Fits generalized linear models and Cox proportional hazard models.
Usage
fit_model(
x,
y,
family = "gaussian",
weights = NULL,
offset = NULL,
method = NULL,
strata = NULL,
control = NULL,
rownames = NULL,
nocenter = NULL,
fast = TRUE
)
Arguments
x |
a matrix of predictors (excluding intercept) with column names.
If column names are not provided they are set according to
|
y |
a vector for the outcome variable for glms, and a |
family |
a character strong specifying glm family to be used, or "cox" for Cox models. The default family is set to 'Gaussian'. |
method |
a character string specifying the method for tie handling.
See |
strata , control , weights , offset , rownames , nocenter |
parameters for Cox
or glm. See |
fast |
passed to @return A list with the following components:
|
Details
Computations rely on fit_glm()
and fit_cox()
.