
Plot predictive means against generalised residuals
Source:R/residual-helpers.R
plot_predicted_residuals.RdUses influ_residuals(), never native Pearson or deviance residuals.
The horizontal coordinate is the predictive mean from the same simulations,
preserving their response component and random-effect conditioning.
Pass a precomputed result to avoid repeating simulation when styling plots.
Arguments
- fit
A supported fitted model or an
influ_residualsobject.- trend
One of
"loess","lm","linear", or"none".- type
"quantile","generalised", or"generalized"(equivalent).- ...
Calculation options passed to
influ_residuals(). Not accepted for a precomputed object. Complete brms fits are needed for calculation; existing posterior draws are used without fitting or running MCMC.