Description Usage Arguments Details Value Examples
View source: R/select_interaction.R
select_interaction
is a helper function that creates a tibble with
all indicator-specific combinations of pressures pairs as input for the
test_interaction
function. The pressures in the IND~pressure
GAM(M)s are combined with all other pressures in the model tibble. If
specific combinations should not be modeled simply delete them from
this data frame.
1 | select_interaction(mod_tbl)
|
mod_tbl |
A model output tibble from |
For each IND~pressure pair specific pressures to test for interactions can
be selected by creating a tibble containing the IND (termed 'ind'), the
pressure 1 (termed 'press') and the pressure 2 (termed 't_var'). The easiest
is to use the helper function select_interaction
: it creates
all combinations of IND~press pairs and the threshold variables based on
the input model tibble. If specific combinations should not be modeled
simply delete them from this data frame.
The functions returns a tibble with three columns:
ind
The name of the indicator
press
The pressure name for the smooth term
t_var
The pressure name for the threshold variable
1 2 | # Using some models of the Baltic Sea demo data
test <- select_interaction(mod_tbl = merge_models_ex[1:5,])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.