fit_selected | R Documentation |
Functions to facilitate fitting multiple GLMs.
fit_selected(glm_calibration)
fit_glms(formulas, data, weights = NULL, id = NULL)
glm_calibration |
a list resulting from |
formulas |
(character) a vector containing the formula(s) for GLM(s). |
data |
data.frame with the dependent and independent variables. |
weights |
(numeric) a vector with the weights for observations. Default = NULL. |
id |
(character) id code for models fitted. Default = NULL. |
A list of fitted GLMs.
For fit_selected
, an enmpa fitted models
object.
# GLM calibration results
data(cal_res, package = "enmpa")
# Fitting selected models
sel_fit <- fit_selected(cal_res)
sel_fit
# Custom formulas
forms <- c("Sp ~ bio_1 + I(bio_1^2) + I(bio_12^2)",
"Sp ~ bio_12 + I(bio_1^2) + I(bio_12^2)")
# Fitting models
fits <- fit_glms(forms, data = cal_res$data)
fits$ModelID_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.