gam: Generalized Additive Models

Description Usage Arguments Value Constraints See Also Examples

Description

gam Fits a generalized additive model to data given by FLTable object.

Usage

1

Arguments

formula

An R formula object with smooth terms s, te. In these smooth terms, m and k are specified which represent splineDegree and number of knots respectively.In addition, NumOfPredPts is specified through xt and byVarName through by.One Can club Spline terms with same set of specifications by passing more than one variables/colnames in s.

family

currently only stats::poisson is supported

data

an object of class FLTable, must be a wide table

...

other arguments as in mgcv::gam may be passed but not currently used

offset

column name indicating the offset if any

maxiter

maximum num of iterations

Value

gam returns FLGAM object

Constraints

Plotting is not available. The result Set may not include all results and methods as in mgcv::gam.

See Also

gam for corresponding R function reference

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
widetable <- FLTable(getTestTableName("tblGAMSimData"),"ObsID")
colnames(widetable) <- tolower(colnames(widetable))
myformula <- yval~x0val+s(x1val,m=3,k=10)+te(x1val,x2val,m=3,k=5)+s(x2val,x1val)
gamobject <- gam(myformula,data=widetable,offset="x2val")
predictedValues <- predict(gamobject,widetable)
gamobject$coefficients
gamobject$fitted.values
gamobject$residuals
gamobject$df.null
print(gamobject)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.