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