getGam: Convert gamViz object to gamObject

View source: R/getGam.R

getGamR Documentation

Convert gamViz object to gamObject

Description

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

Usage

getGam(o)

Arguments

o

a gamViz object, the output of getViz.

Examples

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

mgcViz documentation built on Oct. 6, 2023, 5:09 p.m.

Related to getGam in mgcViz...