dfCompile.Gam: Creates an augmented data frame for 'Gam' objects (for...

Description Usage Arguments Details Value Examples

View source: R/Gam.R

Description

Though a similar idea to broom::augment this returns very different values.

Usage

1

Arguments

x

Gam object from gam library

residuals

if TRUE, partial deviance residuals are plotted along with the fitted terms<e2><80><94>default is FALSE. If residuals is a vector with the same length as each fitted term in x, then these are taken to be the overall residuals to be used for constructing the partial residuals.

terms

subsets of the terms can be selected.

...

(extra parameters, passed to dfCompile.Gam).

Details

original data frame

original data frame used to create lm or glm object

.resid

residuals between predicted verse actual y values

For each variable in the model we have the following variables:

.smooth._

part of the predicted value from variable _ for each observation

se.smooth._.lower

lower pointwise twice-standard-error values for each point relative to the part of the predicted value from variable _

se.smooth._.upper

the "upper" version of se.smooth._.lower

Value

augmented data.frame, see details for more information

Examples

1
2
3
4
5
6
library(tidyverse)

gam.object <- gam::gam(Sepal.Length ~ gam::s(Sepal.Width) + Species,
                       data = iris)

dfCompile.Gam(gam.object) %>% head

benjaminleroy/ggDiagnose documentation built on May 4, 2019, 3:07 a.m.