Grid posterior predictions of a model
grid_postpred.RdGiven a grid of predictor values, their scaling, and a Bayesian logistic regression model, prints a prediction grid heatmap.
Arguments
- mod
brms or projpred model
- pgrid
A grid of predictor values.
- scls
A scaling table with columns "x" for predictor name, "M" for mean and "SD" for standard deviation.
- perc
Percentage value for computation of the equal-tailed posterior interval \(ETI\).
- lt
Logit threshold(s) for declaring PDD.
- cols
Text colours for separating PDD classification according to thresholds in
lt. Must be of lengthlength(lt) + 1- pal
Colour pallete pushed to
ggplot2::scale_fill_viridis_c().- dir
Which way should be
palscaled? Pushed toggplot2::scale_fill_viridis_c()asdirection.