knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
# stable version on CRAN install.packages("truelies") # latest version from github remotes::install_github("hughjonesd/truelies")
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) # 95% confidence interval, using hdrcde dist_hdr(d1, 0.95)
r format(citation("truelies"), style = "text")
cit <- citation("truelies") cit$key <- "hughjones2019" print(cit, style = "Bibtex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.