Description Usage Arguments Value Examples
fit_curves
Takes inputed models and create vectorized functions able to get the model predictionsfor any value inputed. Also outputs a table comparing models.
1 | fit_curves(models, predict_formals = NULL, separator = "_")
|
models |
list. List with models that have methods for function 'predict'. |
predict_formals |
character. Names of variables necessary for predict function. If NULL, function will attempt to retrieve them from the model's formula. |
separator |
character. Character that separates variable names, years and scenarios. |
Returns a list with a table of statistics for model comparision, and a list for each model containing the original call, its output and a vectorized function that gets predictions for the model.
1 2 3 4 5 6 7 8 | library(mgcv)
fit_curves(models = list(tpc_size = gamm(performance ~ s(temp, bs = 'cs') + size,
random = list(id = ~ 1),
data = FulanusPhysiology),
tpc_no_size = gamm(performance ~ s(temp, bs = 'cs'),
random = list(id = ~ 1),
data = FulanusPhysiology)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.