Wrapper for mgcv's gam implementation.
SL.mgcv(
Y,
X,
newX,
family,
obsWeights = NULL,
id = NULL,
degree = -1,
continuous_values = 5,
smooth_fn = "s",
exclude_spline = NULL,
method = "REML",
select = TRUE,
gamma = 1,
formula_rhs = NULL,
...
)
Outcome variable
Covariate dataframe
Optional dataframe to predict the outcome
"gaussian" for regression, "binomial" for binary classification
Optional observation-level weights (supported but not tested)
Optional id to group observations from the same unit (not used currently).
Dimension of the basis expansion, default 2.
Variables with this or more unique values are considered continuous and will be incorporated as spline terms.
"s", "te", "ti", or "t2"
Variable names for which not to spline, even if they meet the continuous variable definition.
"REML" (default), "GCV.Cp", "GACV.Cp", "P-REML", "ML", "P-ML"
If covariates can be removed entirely due to a penalty.
Gamma setting, default 1.
Custom RHS formula, if built-in options are insufficient.
Any remaining arguments, not used.
Wood S.N. (2006b) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.
Hastie and Tibshirani (1990) Generalized Additive Models. Chapman and Hall.
Wahba (1990) Spline Models of Observational Data. SIAM
Green and Silverman (1994) Nonparametric Regression and Generalized Linear Models. Chapman and Hall.