Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughjonesd/truelies
Implements Bayesian methods, described in Hugh-Jones (2019), for estimating the proportion of liars in coinflip-style experiments.
https://github.com/hughjonesd/truelies
experiment lying r
Last synced: 25 days ago
JSON representation
Implements Bayesian methods, described in Hugh-Jones (2019), for estimating the proportion of liars in coinflip-style experiments.
- Host: GitHub
- URL: https://github.com/hughjonesd/truelies
- Owner: hughjonesd
- License: other
- Created: 2019-06-20T07:14:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T21:13:09.000Z (about 3 years ago)
- Last Synced: 2024-10-09T09:39:27.362Z (about 1 month ago)
- Topics: experiment, lying, r
- Language: R
- Size: 80.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# truelies[![CRAN status](https://www.r-pkg.org/badges/version/truelies)](https://cran.r-project.org/package=truelies)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/hughjonesd/truelies?branch=master&svg=true)](https://ci.appveyor.com/project/hughjonesd/truelies)`truelies` implements Bayesian methods, described in
[Hugh-Jones (2019)](https://link.springer.com/article/10.1007/s40881-019-00069-x),
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
``` r
# 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:
```{r example}
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)
```## Citation
`r format(citation("truelies"), style = "text")`
## Bibtex
```{r, echo = FALSE, comment = NA}
cit <- citation("truelies")
cit$key <- "hughjones2019"
print(cit, style = "Bibtex")
```