Learn R Programming

pgam (version 0.4.12)

plot.pgam: Plot of estimated curves

Description

Plot of the local level and, when semiparametric model is fitted, the estimated smooth terms.

Usage

# S3 method for pgam
plot(x, rug = TRUE, se = TRUE, at.once = FALSE, scaled = FALSE, ...)

Arguments

x

object of class pgam holding the fitted model

rug

if TRUE a density rug is drawn on the bottom of the graphic

se

if TRUE error band is drawn around the fitted values

at.once

if TRUE each plot goes to a separate window, else the user is prompted to continue

scaled

if TRUE the same scale will be used for plots of smoothed functions

further arguments passed to method

Value

No value returned.

Details

Error band of smooth terms is approximated.

See Also

pgam, pgam.fit, pgam.likelihood

Examples

Run this code
# NOT RUN {
library(pgam)
data(aihrio)
attach(aihrio)
form <- ITRESP5~f(WEEK)+HOLIDAYS+rain+PM+g(tmpmax,7)+g(wet,3)
m <- pgam(form,aihrio,omega=.8,beta=.01,maxit=1e2,eps=1e-4,optim.method="BFGS")

plot(m,at.once=TRUE)

# }

Run the code above in your browser using DataLab