Description Usage Arguments Value See Also Examples
calc_pred
is a helper function for model_trend
,
model_gam
, model_gamm
and
plot_model
. It calculates for a list of Generalized Additive
(Mixed) Models the predicted IND values as well as the upper and lower
95% confidence intervals based on a list of corresponding
pressure values (observed or a regular spaced sequence).
1 | calc_pred(model_list, obs_press)
|
model_list |
A list of model objects of class 'gam' or 'gamm'. |
obs_press |
A list of vectors with pressure values (observed or an artificial sequence). |
The function returns a tibble with one row for each model and three columns:
pred
A list-column with the predicted IND values given the input pressure values.
ci_up
A list-column with the upper 95% confidence limit of the IND predictions.
ci_low
A list-column with the lower 95% confidence limit of the IND predictions.
model_trend
, model_gam
,
model_gamm
, plot_model
1 2 3 4 | # Using the Baltic Sea demo data
model_list <- model_gam_ex$model
obs_press <- ind_init_ex$press_train
x <- calc_pred(model_list, obs_press)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.