Fits a GAM for each of multiple outcomes using a fixed set of features (many y's, one X).
massGAM(x, y, covariates = NULL, x.name = NULL, y.name = NULL,
k = NULL, family = gaussian(), weights = NULL, method = "REML",
n.cores = rtCores, save.mods = FALSE, save.summary = TRUE,
print.plots = FALSE, outdir = NULL, labeledNifti = NULL,
save.plots = FALSE, new.x.breaks = 9)
Numeric vector or matrix / data frame of features i.e. independent variables
Float, Matrix / data frame: Outcomes
String: Name of the predictor
String, vector: Names of the outcomes
Integer. Number of bases for smoothing spline
family
argument for mgcv::gam
Numeric vector: Weights for cases. For classification, weights
takes precedence
over ipw
, therefore set weights = NULL
if using ipw
.
Note: If weight
are provided, ipw
is not used. Leave NULL if setting ipw = TRUE
. Default = NULL
Estimation method for GAM
Integer. Number of cores to use
Logical. Should models be saved
Logical. Should model summary be saved
Logical Should plots be shown
Path to save output
String. Path to labeled nifti file.
Logical. Should plots be saved
Integer. Number of splits in the range of x to form vector of features for estimation of fitted values
Vector. Weights for GAM
NA in the input will be kept as NA in the results, maintaining n of cases.