View source: R/modeling_phrases.R
obtain_diagnostics | R Documentation |
A wrapper for augment
which obtains residuals and
fitted values only for a specified data generating process.
obtain_diagnostics(mean.model, data)
mean.model |
|
data |
the original data set to which the fitted values and residuals should be added. Defaults to extracting the data from the model. |
A data.frame
containing one row for each observations, with
two columns added to the original data:
.fitted
: the fitted values for the model.
.resid
: the residuals for the model.
fit <- lm(mpg ~ hp, data = mtcars)
mtcars.aug <- obtain_diagnostics(fit, data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.