Skip to content

Conditional Ordinal Stereotype Model for Incident-Level Comparison

0packages depend
1.3Kdownloads / year
54.5%test coverage
13/13flavors OK

Overview

About

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

CRAN checks
13OK
Slowest check: 1.6 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK6 OK2026-05-05
Advisories

none known

Documentation

In release 0.5
READMENoVignettesYes · 1 · dynamicNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
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

1.3K
CRAN downloads in the past year
Rank #20,338 · ~3/day · ~104/mo
Daily download trend is not available in this view yet.
27130 days
65090 days
1.3K1 year
Compare downloads with other packages →
Also on39 r2u9 autocran

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing cosmic adds 23 packages (13 with compiled code, 6.4 MB of source tarballs). Heaviest: vctrs 1.0 MB, dplyr 902 KB, rlang 766 KB.

Depends (1)
R >= 4.1.0
Imports (3)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.5 (2026)
Releases (1)
  • 0.5Latest
    2026-05-04 · current release
  • R
    R 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")
Ridgeway, G. (2026). cosmic: Conditional Ordinal Stereotype Model for Incident-Level Comparison (Version 0.5) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for cosmic version 0.5 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy