plot_outcome_BIN {LoTTA} | R Documentation |
Function that plots the median (or another quantile) of the posterior function with binary outcome along with the quanatile-based credible interval. The function is plotted on top of the binned input data. To bin the data, the score data is divided into bins of fixed length, then the average outcome in each bin is calculated. The average outcomes are plotted against the average values of the score in the corresponding bins.
Description
Function that plots the median (or another quantile) of the posterior function with binary outcome along with the quanatile-based credible interval. The function is plotted on top of the binned input data. To bin the data, the score data is divided into bins of fixed length, then the average outcome in each bin is calculated. The average outcomes are plotted against the average values of the score in the corresponding bins.
Usage
plot_outcome_BIN(
LoTTA_posterior,
nbins = 100,
probs = c(0.025, 0.5, 0.975),
n_eval = 200,
col_line = "#E69F00",
size_line = 0.1,
alpha_interval = 0.35,
col_dots = "gray",
size_dots = 3,
alpha_dots = 0.6,
col_cutoff = "black",
title = "Outcome function",
subtitle = NULL,
y_lab = "",
x_lab = expression(paste(italic("x"), " - score")),
plot.theme = theme_classic(base_size = 14),
legend.position = "none",
name_legend = "Legend",
labels_legend = "median outcome fun.",
text = element_text(family = "serif"),
legend.text = element_text(size = 14),
plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5),
...
)
Arguments
LoTTA_posterior |
|
nbins |
|
probs |
|
n_eval |
|
col_line |
|
size_line |
|
alpha_interval |
|
col_dots |
|
size_dots |
|
alpha_dots |
|
col_cutoff |
|
title |
|
subtitle |
|
y_lab |
|
x_lab |
|
plot.theme |
|
legend.position |
|
name_legend |
|
labels_legend |
|
text |
|
legend.text |
|
plot.title |
|
plot.subtitle |
|
... |
|
Value
ggplot2 object