gam_dev_exp: Variable importance for GAMs

Description Usage Arguments Examples

View source: R/gam_var_importance.R

Description

Function builds GAM and calculates deviance explained by each covariate. Simon Wood; http://r.789695.n4.nabble.com/variance-explained-by-each-term-in-a-GAM-td836513.html Litzow et al. (2013) Reassessing regime shifts in the North Pacific: incremental climate change and commercial fishing are necessary for explaining decadal-scale biological variability. Global Change Biology.

Usage

1
2
3
4
5
6
7
8
gam_dev_exp(
  dataset,
  exp.names,
  indicator,
  family,
  base_k = -1,
  smoother = "cr"
)

Arguments

dataset

is the dataset containing y and all x covariates. should be scaled and centered (mean = 0, sd = 1)

exp.names

= explanatory covariate names, passed as vector of characters

indicator

= y variable of interest (character)

family

= GAM family distribution, takes 'gaussian' or 'Gamma'

base_k

= number of knots for each smoother term. Default = -1, mgcv uses generalized cross-validation

smoother

= cubic regression spline method (cr is default)

Examples

1

jpwrobinson/funk documentation built on Nov. 21, 2021, 11:23 p.m.