bayes_updater: Bayesian Updating of Experimental Results

Description Usage Arguments Value Examples

View source: R/bayes.R

Description

Generates posterior based on prior (Distribution 1) and likelihood (Distribution 2). This function implements the Bayesian averaging employed by Green, Krasno, and Coppock et al. in The Effects of Lawn Signs on Vote Outcomes: Results from Four Randomized Field Experiments. Their replication code is available here: https://doi.org/10.7910/DVN/K2TLDB.

Usage

1
bayes_updater(est_1, se_1, est_2, se_2, graph = TRUE, ...)

Arguments

est_1

Point estimate of Distribution 1

se_1

Standard error on point estimate of Distribution 2

est_2

Point estimate of Distribution 2

se_2

Standard error on point estimate of Distribution 2

graph

Boolean, should a graph be generated

...

Any additional parameters that should be passed to ?graph_bayes

Value

vector of the posterior point estimate and SE. Optionally, graph

Examples

1
bayes_updater(0, 0.1, 2.5, 0.1, x_min = -5, x_max = 5)

anniejw6/testingtools documentation built on Jan. 26, 2021, 6:41 a.m.