augment.nlrq | R Documentation |
Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies across models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.
## S3 method for class 'nlrq' augment(x, data = NULL, newdata = NULL, ...)
x |
A |
data |
A base::data.frame or |
newdata |
A |
... |
Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in
|
augment()
, quantreg::nlrq()
Other quantreg tidiers:
augment.rqs()
,
augment.rq()
,
glance.nlrq()
,
glance.rq()
,
tidy.nlrq()
,
tidy.rqs()
,
tidy.rq()
# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) augment(n) glance(n) library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.