Description Usage Arguments Examples
View source: R/gam_var_importance.R
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.
1 2 3 4 5 6 7 8 | gam_dev_exp(
dataset,
exp.names,
indicator,
family,
base_k = -1,
smoother = "cr"
)
|
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) |
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.