Debian Codegraph @

man/augment.smooth.spline.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/stats-smooth.spline.R
3 \name{augment.smooth.spline}
4 \alias{augment.smooth.spline}
5 \alias{smooth.spline_tidiers}
6 \title{Tidy a(n) smooth.spline object}
7 \usage{
8 \method{augment}{smooth.spline}(x, data = x$data, ...)
9 }
10 \arguments{
11 \item{x}{A \code{smooth.spline} object returned from \code{\link[stats:smooth.spline]{stats::smooth.spline()}}.}
12
13 \item{data}{A \link[base:data.frame]{base::data.frame} or \code{\link[tibble:tibble]{tibble::tibble()}} containing the original
14 data that was used to produce the object \code{x}. Defaults to
15 \code{stats::model.frame(x)} so that \code{augment(my_fit)} returns the augmented
16 original data. \strong{Do not} pass new data to the \code{data} argument.
17 Augment will report information such as influence and cooks distance for
18 data passed to the \code{data} argument. These measures are only defined for
19 the original training data.}
20
21 \item{...}{Additional arguments. Not used. Needed to match generic
22 signature only. \strong{Cautionary note:} Misspelled arguments will be
23 absorbed in \code{...}, where they will be ignored. If the misspelled
24 argument has a default value, the default value will be used.
25 For example, if you pass \code{conf.lvel = 0.9}, all computation will
26 proceed using \code{conf.level = 0.95}. Two exceptions here are:
27 \itemize{
28 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
29 it will be ignored.
30 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
31 will be ignored.
32 }}
33 }
34 \description{
35 Tidy summarizes information about the components of a model.
36 A model component might be a single term in a regression, a single
37 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
38 model component varies across models but is usually self-evident.
39 If a model has several distinct types of components, you will need to
40 specify which components to return.
41 }
42 \examples{
43 \dontshow{if (FALSE) withAutoprint(\{ # examplesIf}
44
45 # fit model
46 spl <- smooth.spline(mtcars$wt, mtcars$mpg, df = 4)
47
48 # summarize model fit with tidiers
49 augment(spl, mtcars)
50
51 # calls original columns x and y
52 augment(spl)
53
54 library(ggplot2)
55 ggplot(augment(spl, mtcars), aes(wt, mpg)) +
56 geom_point() +
57 geom_line(aes(y = .fitted))
58 \dontshow{\}) # examplesIf}
59 }
60 \seealso{
61 \code{\link[=augment]{augment()}}, \code{\link[stats:smooth.spline]{stats::smooth.spline()}},
62 \code{\link[stats:predict.smooth.spline]{stats::predict.smooth.spline()}}
63
64 Other smoothing spline tidiers:
65 \code{\link{glance.smooth.spline}()}
66 }
67 \concept{smoothing spline tidiers}
68 \value{
69 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
70 \item{.fitted}{Fitted or predicted value.}
71 \item{.resid}{The difference between observed and fitted values.}
72
73 }