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

View source: R/get_sum_output.R

get_sum_outputR Documentation

Extract specific outputs from the GAM(M) summary

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

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

# 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 Feb. 22, 2025, 3:15 a.m.