Extract fitted values and residuals from a linear model and add them to a tibble.
Usage
# S3 method for class 'stat_lm'
collect(x, data = NULL, fold = FALSE, residuals = FALSE, ...)Arguments
- x
A
stat_lmobject- data
A tibble. If NULL, uses the original data from the model.
- fold
How to add fitted values:
FALSE(default): Add as columns matching response structureTRUE: Fold into list-column (for coe responses)Character: Name for folded column
- residuals
Logical. Should residuals be included? Default
FALSE.- ...
Additional arguments (reserved)
