https://github.com/pblischak/approximate_bayes
A worked example of approximate Bayesian computation in R
https://github.com/pblischak/approximate_bayes
abc abc-smc rmarkdown rstats
Last synced: 4 months ago
JSON representation
A worked example of approximate Bayesian computation in R
- Host: GitHub
- URL: https://github.com/pblischak/approximate_bayes
- Owner: pblischak
- License: mit
- Created: 2016-02-22T18:00:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-08T13:33:45.000Z (about 4 years ago)
- Last Synced: 2024-12-26T04:13:58.665Z (6 months ago)
- Topics: abc, abc-smc, rmarkdown, rstats
- Homepage: http://pblischak.github.io/approximate_bayes/
- Size: 1.02 MB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Approximate Bayesian computation
This is the source code for a small example of doing ABC and ABC-SMC (Sequential Monte Carlo) to estimate the unknown mean and variance of a normal distribution from a data set with 30 observations. I wrote it as part of a class and thought I'd put it up in the hopes that someone else might find it useful. You can get the code by cloning this repository with `git clone`, or you can click on the `Download ZIP` button.
### Files:
- `data.txt`: contains the 30 observed data points generated from a normal distribution with unknown mean and variance.
- `normal-abc.Rmd`: Rmarkdown file with all of the code for running the analysis. There is code for plotting the posterior distributions of the parameters and for timing the different algorithms (ABC vs. ABC-SMC), as well.
- `normal-abc.pdf`: the rendered output of the Rmarkdown file.