massGAM: Mass-univariate GAM Analysis

View source: R/massGAM.R

massGAMR Documentation

Mass-univariate GAM Analysis

Description

Fits a GAM for each of multiple outcomes using a fixed set of features (many y's, one X).

Usage

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,
  save.plots = FALSE,
  new.x.breaks = 9
)

Arguments

x

Numeric vector or matrix / data frame of features i.e. independent variables

y

Numeric matrix / data frame: Outcomes

covariates

Numeric matrix / data.frame of additional covariates

x.name

Character: Name of the predictor

y.name

Character, vector: Names of the outcomes

k

Integer: Basis dimension for smoothing spline

family

family argument for mgcv::gam

weights

Vector, numeric: Weights for GAM

method

Estimation method for GAM

n.cores

Integer. Number of cores to use

save.mods

Logical. Should models be saved

save.summary

Logical. Should model summary be saved

print.plots

Logical Should plots be shown

outdir

Path to save output

save.plots

Logical. Should plots be saved

new.x.breaks

Integer. Number of splits in the range of x to form vector of features for estimation of fitted values

Details

NA in the input will be kept as NA in the results, maintaining n of cases.

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.