Learn R Programming

maicplus (version 0.1.2)

plot_weights_base: Plot MAIC weights in a histogram with key statistics in legend

Description

Generates a base R histogram of weights. Default is to plot either unscaled or scaled weights and not both.

Usage

plot_weights_base(
  weighted_data,
  bin_col,
  vline_col,
  main_title,
  scaled_weights
)

Value

a plot of unscaled or scaled weights

Arguments

weighted_data

object returned after calculating weights using estimate_weights

bin_col

a string, color for the bins of histogram

vline_col

a string, color for the vertical line in the histogram

main_title

title of the plot

scaled_weights

an indicator for using scaled weights instead of regular weights

Examples

Run this code
plot_weights_base(weighted_sat,
  bin_col = "#6ECEB2",
  vline_col = "#688CE8",
  main_title = c("Scaled Individual Weights", "Unscaled Individual Weights"),
  scaled_weights = TRUE
)

Run the code above in your browser using DataLab