select_model: Select the best correlation structure in the GAMM

Description Usage Arguments Details Value References See Also Examples

View source: R/select_model.R

Description

The function selects and returns the best GAMM out of the six GAMMs computed in model_gamm. In the case that the GAMM without any correlation structure performs best, the output tibble contains the information from the original model_gam output tibble (therefore needed as input).

Usage

1
select_model(gam_tbl, gamm_tbl)

Arguments

gam_tbl

Output tibble from the model_gam function.

gamm_tbl

Output tibble from the model_gamm function.

Details

The best error structure is chosen here based on the Akaike's Information Criterion (AIC). The GAMM with the lowest AIC value is selected, but only if the AIC difference to the GAMMs with a less complex error structure is greater than 2 (or respectively 4 or 6 depending on the level of nested complexity) (Burnham and Anderson, 2002). Otherwise the less complex GAMM is chosen. The following hierarchy of complexity is considered:

Value

select_model returns the same model output tibble as model_gamm but with only one final GAMM for each filtered IND~pressure pair.

References

Burnham, K.P., Anderson, D.R. (2002) Model Selection and Multimodel Inference - A Practical Information-Theoretic Approach. Springer, New York.

See Also

Other IND~pressure modeling functions: find_id(), ind_init(), model_gamm(), model_gam(), plot_diagnostics(), plot_model(), scoring(), test_interaction()

Examples

1
2
3
4
5
# Using some models of the Baltic Sea demo data
test_ids <- c(67:70)
gam_tbl <- model_gam_ex[model_gam_ex$id %in% test_ids,]
gamm_tbl <- model_gamm(ind_init_ex[test_ids,], filter = gam_tbl$tac)
best_gamm <- select_model(gam_tbl, gamm_tbl)

saskiaotto/INDperform documentation built on Oct. 27, 2021, 10:33 p.m.