getGam: Convert gamViz object to gamObject

Description Usage Arguments Examples

Description

Function for converting a gamViz object to a gamObject. It is essentially the inverse of the getViz function.

Usage

1
getGam(o)

Arguments

o

a gamViz object, the output of mgcViz::getViz.

Examples

1
2
3
4
5
6
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

mfasiolo/mgcViz documentation built on May 20, 2019, 4:10 p.m.