baytrends (version 2.0.11)

loadModels: Load Built-in GAM formulas

Description

Returns built-in GAM formulas

Usage

loadModels(gamSelect = "gam4")

Value

Returns a list with GAM formulas

Arguments

gamSelect

character vector of models (Current options include gam0, gam1, gam2, gam3, gam4, gam5)

Details

By default, the function analysisOrganizeData will store the formulas for gam0-gam4 in the variable analySpec$gamModels as a list. The user can customize this list with the function loadModels (see example).

Examples

Run this code
# run analysisOrganizeData function to create the list analySpec
dfr <- analysisOrganizeData (dataCensored, report=NA)
df        <- dfr[["df"]]
analySpec <- dfr[["analySpec"]]

# current models in analySpec
analySpec$gamModels

# set models in analySpec to gam0, gam1, and gam2 only
analySpec$gamModels <- loadModels(c('gam0','gam1','gam2'))

Run the code above in your browser using DataLab