Skip to content

About

persephone is an agent-based model (with in-development R package and interactive Shiny web app) for simulating bioarchaeological data and exploring the effects of hidden variables on bioarchaeological analyses of population health.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Persephone ABM

An agent-based model (ABM) for simulating skeletal assemblage data in bioarchaeology. Individuals in a birth cohort or age-structured population face annual risks of age-specific mortality following a Siler hazard model and, optionally, annual risks of skeletal lesion formation.

Lesion status can modify mortality risk, enabling exploration of the osteological paradox and evaluation of survival analysis methods or multistate illness-death models applied to cemetery data.

Installation

Install from GitHub using devtools:

# Install devtools if needed
install.packages("devtools")

# Install persephone (and demohaz dependency)
devtools::install_github("Amy-S-Anderson/persephone")

Dependencies

  • R (>= 3.5)
  • demohaz (installed automatically from GitHub)

Development

Building the Package

# Generate documentation from roxygen2 comments
devtools::document()

# Build and install locally
devtools::install()

# Check package for CRAN compliance (optional)
devtools::check()

Running Tests

# Run all tests
devtools::test()

# Run a specific test file
testthat::test_file("tests/testthat/test-estimation-error.R")

Loading for Development

# Load package without installing (for interactive development)
devtools::load_all()

Usage

The main function in the package is Simulate_Cemetery().

library(persephone)

# Run a simulation
result <- Simulate_Cemetery(
  cohort_size = 500,
  lesion_formation_rate = 0.10,
  formation_window_closes = 5,
  mortality_regime = CoaleDemenyWestF5
)

# Access individual outcomes
head(result$individual_outcomes)

# Access survivor data
head(result$annual_census)

About

persephone is an agent-based model (with in-development R package and interactive Shiny web app) for simulating bioarchaeological data and exploring the effects of hidden variables on bioarchaeological analyses of population health.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages