spam: Estimates sparse (mulitivariate) additive model

Description Usage Arguments Value Examples

Description

Estimates sparse (mulitivariate) additive model

Usage

1
spam(Y, X, df = 10, which.lam = 10, returnall = FALSE, ...)

Arguments

Y

response, Nxd matrix

X

predictors, Nxp matrix

df

the number of spline basis functions to use, defaluts to 10

which.lam

component of the tuning parameter vector for saving coefficients

returnall

if TRUE, returns extra information, see below

...

optional arguments to samQL

Value

a list with components

knots

a list with components interior, a (df-1)xp matrix and boundary, a 2xd matrix

B.hat

a (d)x(1+df*p) matrix containing the retained coefficients (intercept in the first column)

range.info

a list with components min and range of size px1 each describing the predictors

spam.out

if returnall is TRUE, a list of length d containing all output from samQL. Useful for the predict or fitted methods

X

the original X input

Examples

1
2
someData = generateSPASM(100,3,4)
SPAMfit = spam(someData$y, someData$x)

dajmcdon/spasm documentation built on May 6, 2019, 1:31 a.m.