Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

effect_draw

Make posterior draws for treatment effect


Description

This function takes the samples of hyperparameters of a baggr model (commonly hypermean tau and hyper-SD sigma_tau) and simulates values of new realisations of tau (a mean effect in some unobserved group).

Usage

effect_draw(x, n, transform = NULL)

Arguments

x

A baggr class object.

n

How many values to draw? The default is the same as number of samples in the model (default is 2,000).

transform

a transformation to apply to the result, should be an R function; (this is commonly used when calling group_effects from other plotting or printing functions)

Value

A vector of possible values of the treatment effect.


baggr

Bayesian Aggregate Treatment Effects

v0.4.0
GPL (>= 3)
Authors
Witold Wiecek [cre, aut], Rachael Meager [aut], Brice Green [ctb] (predict(), loo_compare, many visuals), Trustees of Columbia University [cph] (tools/make_cc.R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.