Conditional Ordinal Stereotype Model for Incident-Level Comparison
Overview
Implements the Conditional Ordinal Stereotype Model for Incident-Level Comparison (COSMIC), a method for analyzing ordinal outcomes observed across multiple actors within shared events. The model uses a conditional likelihood to remove event-level confounding and estimate actor-specific propensities relative to their peers. Efficient computation is achieved via a dynamic programming algorithm for the Poisson-multinomial normalization term, enabling scalable estimation with Markov chain Monte Carlo. The package provides tools for data preparation, model fitting using Stan, and extraction of posterior summaries for comparative inference. Estimation of police officer propensity to escalate force is the primary motivation for the model. For more details see Ridgeway (2026) "A Conditional Ordinal Stereotype Model to Estimate Police Officers’ Propensity to Escalate Force" doi:10.1080/01621459.2025.2597050.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK6 OK2026-05-05
Documentation
- Help pages
- 7 (1 internal)includes a package overview page
- Examples that run
- 0%5 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 14%
Also includes 2 demo scripts (run with demo())
Downloads
Dependencies
Code & Tests
Datasets
People & History
- 0.5Latest2026-05-04 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-05-04
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Additional repositories
- stan-dev.r-universe.dev
- Minimum R
- ≥ 4.1.0
- Download size
- 870 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cosmic")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.