https://github.com/csgillespie/plbayes
Code and data from the paper Estimating the number of casualties in the American Indian war: a Bayesian analysis using the power law distribution
https://github.com/csgillespie/plbayes
Last synced: 2 months ago
JSON representation
Code and data from the paper Estimating the number of casualties in the American Indian war: a Bayesian analysis using the power law distribution
- Host: GitHub
- URL: https://github.com/csgillespie/plbayes
- Owner: csgillespie
- License: mit
- Created: 2017-04-21T14:01:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-07T16:05:50.000Z (over 6 years ago)
- Last Synced: 2025-02-08T08:47:09.666Z (4 months ago)
- Language: R
- Size: 44.6 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Estimating the number of casualties in the American Indian war
This repository contains the __R__ code for the paper,
> Estimating the number of casualties in the American Indian war: a Bayesian analysis using the power law distribution [[journal]](https://projecteuclid.org/euclid.aoas/1514430289) [[preprint]](https://arxiv.org/abs/1710.01662)
```tex
@article{Gillespie2017,
title={Estimating the number of casualties in the American Indian war: a Bayesian analysis using the power law distribution},
author={Gillespie, Colin S and others},
journal={The Annals of Applied Statistics},
volume={11},
number={4},
pages={2357--2374},
year={2017},
publisher={Institute of Mathematical Statistics}
}
```## Data
The American Indian data set can be obtained from the `poweRlaw` package
```{r}
install.packages("poweRlaw")
data("us_american", package = "poweRlaw")
data("native_american", package = "poweRlaw")
```The output directory contains the results from MCMC runs.
## Graphics
All code to reproduce the figures in the paper is contained in the `graphics` directory.
* `R/` directory: R code. The files are named an obvious way.
I've used the linux tool pdfcrop to crop the resulting pdf files. If
you don't this tool, just comment out the line.
* `output/` directory: pdf files. The create pdf files are saved in this directory.
## Reproducing the resultsAll code used in the paper is found in the R directory. The main files are
* `R/simulation_study.R`
* `R/full_study.R`