Description Usage Arguments Value Constraints See Also Examples
gam
Fits a generalized additive model
to data given by FLTable object.
1 |
formula |
An R formula object with smooth terms |
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 |
gam
returns FLGAM
object
Plotting is not available. The result Set may not include all results and methods as in mgcv::gam.
gam
for corresponding R function reference
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.