Bayesian Methods to Estimate the Proportion of Liars in Coin Flip Experiments

Implements Bayesian methods, described in Hugh-Jones (2019) , for estimating the proportion of liars in coin flip-style experiments, where subjects report a random outcome and are paid for reporting a "good" outcome.


truelies

CRANstatus Travis buildstatus AppVeyor buildstatus

truelies implements Bayesian methods, described in Hugh-Jones (2019), for estimating the proportion of liars in coinflip-style experiments, where subjects report a random outcome and are paid for reporting a “good” outcome.

For R source for the original paper, see https://github.com/hughjonesd/GSV-comment.

Installation

# stable version on CRAN
install.packages("truelies")

# latest version from github
remotes::install_github("hughjonesd/truelies")

Example

If you have 33 out of 50 reports of heads in a coin flip experiment:

library(truelies)
d1 <- update_prior(heads = 33, N = 50, P = 0.5, prior = dunif)
plot(d1)

dist_mean(d1)
#> [1] 0.3120336

# 95% confidence interval, using hdrcde
dist_hdr(d1, 0.95)
#> [1] 0.06123949 0.55000000

Citation

Hugh-Jones D (2019). “True Lies: Comment on Garbarino, Slonim and Villeval (2018).” Journal of the Economic Science Association. doi: 10.1007/s40881-019-00069-x (URL: http://doi.org/10.1007/s40881-019-00069-x), <URL: https://link.springer.com/article/10.1007/s40881-019-00069-x>.

Bibtex

@Article{hughjones2019,
  title = {True Lies: Comment on Garbarino, Slonim and Villeval (2018)},
  author = {David Hugh-Jones},
  journal = {Journal of the Economic Science Association},
  year = {2019},
  url = {https://link.springer.com/article/10.1007/s40881-019-00069-x},
  doi = {10.1007/s40881-019-00069-x},
}

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("truelies")

0.2.0 by David Hugh-Jones, 7 years ago


https://github.com/hughjonesd/truelies


Report a bug at https://github.com/hughjonesd/truelies/issues


Browse source code at https://github.com/cran/truelies


Authors: David Hugh-Jones <[email protected]>


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports hdrcde

Suggests dplyr, ggplot2, MASS, purrr, tidyr


See at CRAN