fit_custom_gam.Rd
A wrapper function for mgcv::gam
to help fit GAM models
functionally.
fit_custom_gam(
x_var = "age",
y_var = "var",
error_family = "gaussian(link = 'identity')",
smooth_basis = c("tp", "cr"),
data_source,
weights_var = NULL,
sel_k = 10,
max_iterations = 200,
verbose = FALSE
)
Character. Name of the X-variable
Character. Name of the Y-variable
Character. Name of the error family to be used
Character. Name of the Smooth basis to use
Data.frame with columns whose names are set by y_var
and
x_var
Character. Name of the variable to use as weights
Numeric. Define k
(wiggliness)
Numeric. Maximum number of iterations for GAM to try.
Logical. Should additional messages be output?
Fitted GAM model