Learn R Programming

hgam (version 0.1-2)

hgam: Fitting high-dimensional generalized additive models

Description

hgam is used to fit high-dimensional generalized additive models.

Usage

hgam(formula, data = NULL, weights, model = LinReg(), nknots = 20, lambda1 = 2, lambda2 = 3, ...)

Arguments

formula
an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted.
data
a data frame.
weights
vector of weights.
model
an object of class grpl.model implementing the negative log-likelihood, gradient, hessian etc. See the documentation of grpl.model for more details.
nknots
number of knots.
lambda1
grouplasso penalty term.
lambda2
smoothing penalty term.
...
ignored.

Value

hgam returns an object of class hgam:
y
response
x
covariables
Btilde
model matrix
coef
coefficients
Btildenew
function to set up the model matrix for (new) data

See Also

grplasso

Examples

Run this code
test.d <- dgp(1000)
test.m <- hgam(y ~ ., data = test.d)

Run the code above in your browser using DataLab