Plot of Posterior Model Fit Draws
posterior_draws_plot.Rd
A plot of a sample of model fit draws from the posterior distribution from the expected mean and median quantile intervals.
Usage
posterior_draws_plot(
model,
newdata = NULL,
n = 50,
point_size = 0.75,
jitter_height = 0,
jitter_width = 0,
title = "Dose-Response Posterior Draws",
xlab = "Log[Molar]",
ylab = "Response"
)
Arguments
- model
brmsfit model.
- newdata
data.frame of newdata to use for predictions. Default data.frame with each predictor and log-dose.
- n
numeric value of the number of draws to be observed (default = 50).
- point_size
numeric.
geom_jitter
point size (default = 0.75).- jitter_height
numeric. the height distance between overlapping points (default = 0).
- jitter_width
numeric. the width distance between overlapping points (default = 0).
- title
character name for the plot (default = "Dose-Response Posterior Draws").
- xlab
character name for the x-axis label (default = "Log[Molar]").
- ylab
character name for the y-axis label (default = "Response").
Examples
if (FALSE) {
# Consider a model named my_model and data named my_data with a column
# named predictors containing multiple different perturbations.
posterior_draws_plot(
model = my_model,
newdata = my_data,
predictors_col_name = "predictors",
lower = -12,
upper = -3,
n = 50,
facet_var = predictors,
jitter_width = 0.10,
title = "Dose-Response Posterior Draws",
xlab = "Log[Molar]",
ylab = "Response")
}