getGam | R Documentation |
Function for converting a gamViz
object to a gamObject
.
It is essentially the inverse of the getViz function.
getGam(o)
o |
a |
library(mgcViz)
set.seed(2) ## simulate some data...
dat <- gamSim(1,n=1000,dist="normal",scale=2)
b <- gam(y~s(x0)+s(x1, x2)+s(x3), data=dat, method="REML")
a <- getViz(b)
identical(b, getGam(a)) # Must be TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.