gamlassoFit: The function fitting a gamlasso model

Description Usage Arguments Value Examples

View source: R/fit.R

Description

This function is the workhorse for fitting a gamlasso model. Not recommended to call directly. It is slightly more efficient than gamlasso.default since it doesn't perform any quality checks. Only use if the data has been cleaned and no errors are expected to occur.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
gamlassoFit(
  data,
  formula = NULL,
  response.name = NULL,
  linear.name = NULL,
  smooth.name = NULL,
  family = "gaussian",
  linear.penalty = 0,
  smooth.penalty = 2,
  offset.name = NULL,
  weights.name = NULL,
  num.knots = 5,
  num.iter = 100,
  interactions = F,
  tolerance = 1e-04,
  seed = .Random.seed[1],
  verbose = TRUE
)

Arguments

data

The training data for fitting the model

formula

A formula describing the model to be fitted

response.name

The name of the response variable. Vector of two if family = "binomial"

linear.name

The names of the variables to be used as linear predictors

smooth.name

The names of the variables to be used as smoothers

family

The family describing the error distribution and link function to be used in the model. A character string which can only be "gaussian" (default), "binomial", "poisson" or "cox". For family = "binomial", response can be a vector of two and for family="cox", weights must be provided (see details below).

linear.penalty

The penalty used on the linear predictors. Can be 0, 1 or 2

smooth.penalty

The penalty used on the smoothers. Can be 1 or 2

offset.name

The name of the offset variable. NULL (default) if not provided

weights.name

The name of the weights variable. NULL (default) if not provided. See Details of gamlasso.

num.knots

Number of knots for each smoothers. Can be a single integer (recycled for each smoother variable) or a vector of integers the same length as the number of smoothers.

num.iter

Number of iterations for the gamlasso loop

interactions

logical. Should interactions be included.

tolerance

Tolerance for covergence of the gamlasso loop

seed

The random seed can be specified for reproducibility. This is used for fitting the gam and lasso models, or fixed before each loop of gamlasso.

verbose

logical. Should there be "progress reports" printed to the console while fitting the model.

Value

See gamlasso

Examples

1
## Not recommended to use directly. Please see examples of gamlasso

plsmselect documentation built on Dec. 1, 2019, 1:11 a.m.