Learn R Programming

whatifbandit (version 0.3.0)

plot_hist: Plots Histograms of multiple_mab_simulation() Results

Description

Plots distribution of AIPW estimates over trials for plot.multiple.mab() or the distribution of the number of observations assigned to each treatment arm.

Usage

plot_hist(x, quantity, params)

Value

Minimal ggplot object, that can be customized and added to with + (to change scales, labels, legend, theme, etc.).

Arguments

x

A multiple.mab class object created by multiple_mab_simulation().

quantity

The quantities to plot when type = "hist", accepts either 'estimate' to plot the distributuons of the AIPW estimates, or 'assignment' to plot the distributions of the number of observations assigned to each treatment across the repeated trials.

params

The dynamic dots (...) from plot.multiple.mab() should be a named list containing two elements, geom and facet containing arguments for ggplot2::geom_histogram() and ggplot2::facet_grid() respectively.