hgam: Fitting high-dimensional generalized additive models

Description Usage Arguments Value See Also Examples

View source: R/hgam.R

Description

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

Usage

1
2
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

1
2
test.d <- dgp(1000)
test.m <- hgam(y ~ ., data = test.d)

Example output

Loading required package: grplasso
Loading required package: splines
Loading required package: lattice
Loading required package: rgl
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
There were 50 or more warnings (use warnings() to see the first 50)

hgam documentation built on May 2, 2019, 5 p.m.