get_sum_output: Extract specific outputs from the GAM(M) summary

Description Usage Arguments Value See Also Examples

View source: R/get_sum_output.R

Description

get_sum_output is a helper function for model_trend, model_gam, and model_gamm and extracts from a list of summary.gam objects specific values defined in 'varname'.

Usage

1
get_sum_output(sum_list, varname, cell = NULL)

Arguments

sum_list

A list of summary objects created with summary.gam.

varname

A character naming the element to extract from the 'sum_list'.

cell

If more than one value is stored under 'varname' you need to specify which one you want to pull with 'cell'.

Value

The function returns a vector with the length of 'sum_list' containing the extracted values.

See Also

model_trend, model_gam, model_gamm

Examples

1
2
3
4
5
6
# Using some models of the Baltic Sea demo data:
sum_list <- purrr::map(model_gam_ex$model, ~mgcv::summary.gam(.) )
get_sum_output(sum_list, varname = "edf")

# Get p-val with cell argument:
get_sum_output(sum_list, "s.table", cell = 4)

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