Learn R Programming

gam.hp (version 0.0-5)

plot.gamhp: Plot for a gam.hp object

Description

Plot for a gam.hp object

Usage

# S3 method for gamhp
plot(x, plot.perc = FALSE, ...)

Value

a ggplot object

Arguments

x

A gam.hp object.

plot.perc

Logical;if TRUE, the bar plot (based on ggplot2 package) of the percentage to individual effects of variables towards total explained variation, the default is FALSE to show plot with original individual effects.

...

unused

Author

Jiangshan Lai lai@njfu.edu.cn

Examples

Run this code
library(mgcv)
mod1 <- gam(Sepal.Length ~ s(Petal.Length) + s(Petal.Width) + Sepal.Width,data = iris)
plot(gam.hp(mod1))

Run the code above in your browser using DataLab