results_histograms: Get histograms of DID g-formula results

View source: R/plots.R

results_histogramsR Documentation

Get histograms of DID g-formula results

Description

Red vertical lines represent the true expected value for the random variable of which the displayed quantities should be realizations. If show_bias=TRUE, this is 0, otherwise it is E(Y_t(a)-Y_t-1(a)). Blue vertical lines represent the estimated expected value based on the realizations.

Usage

results_histograms(results_df, estimates_truth, show_bias = TRUE)

Arguments

results_df

Data frame with columns 'rep' and 'estimates' where 'estimates' is a list of tibble output results from either iptw_pipeline(), ice_pipeline(), or or_pipeline().

estimates_truth

Data frame with columns 't' and 'estimate', with the 'true' value of E(Y_t(a)-Y_t-1(a)) for t=1,...,T

show_bias

Logical. Should the histograms show deviations from 'truth' (TRUE) or the estimates themselves (FALSE)?


audreyrenson/didgformula documentation built on Oct. 9, 2022, 11:45 a.m.