gg_smooth: Plot smooth 1d terms of gam objects

Description Usage Arguments Value Examples

Description

Given a gam model this convenience function returns a plot of all smooth terms contained in the model. If more than one smooth is present, the different smooth are faceted.

Usage

1
2
3
4
5
6
7
gg_smooth(x, ...)

## Default S3 method:
gg_smooth(x, fit, ...)

## S3 method for class 'pamm'
gg_smooth(x, ...)

Arguments

x

A data frame or object of class pamm.

...

Further arguments passed to get_terms

fit

A fitted model object.

Value

A ggplot2 object.

Examples

1
2
g1 <- mgcv::gam(Sepal.Length ~ s(Sepal.Width) + s(Petal.Length), data=iris)
gg_smooth(iris, g1, terms=c("Sepal.Width", "Petal.Length"))

adibender/pamm documentation built on May 14, 2019, 5:22 p.m.