basisFun: Show basis function

Description Usage Arguments Examples

View source: R/ggGam.R

Description

Show basis function

Usage

1
basisFun(model, which = NULL, ...)

Arguments

model

An object of class gam

which

NULL or one of 1:4

...

Further arguments to be passed to plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(mgcv)
set.seed(1)
x <- seq(0, pi * 2, 0.1)
sin_x <- sin(x)
y <- sin_x + rnorm(n = length(x), mean = 0, sd = sd(sin_x / 2))
data1 <- data.frame(y,x)
model=gam(y~s(x),method="REML")
basisFun(model)
basisFun(model,which=1)
basisFun(model,which=2)
basisFun(model,which=3)
basisFun(model,which=4)

cardiomoon/ggGam documentation built on May 2, 2020, 9:58 a.m.