orm_priority: Compute risk priority scores and traffic light classification

View source: R/orm_priority.R

orm_priorityR Documentation

Compute risk priority scores and traffic light classification

Description

orm_priority() assigns a priority level to each detected risk category using three criteria combined into a single priority score:

  • Frequency (RCS): how saturated is this category in the literature

  • Disconnection (WRDI): how far is the research from real worker data

  • Evidence volume: number of records

Categories whose RCS exceeds context_rcs_threshold are flagged as context categories (the dominant topic of the corpus, not a risk per se) and are reported separately rather than mixed with risk categories.

Priority levels for non-context categories:

  • RED: WRDI >= wrdi_high AND RCS >= 1. Over-studied technically but no worker data. Urgent preventive gap.

  • AMBER: Moderate evidence OR partial worker data.

  • GREEN: WRDI < wrdi_low. Good worker data connection.

  • GREY: n_records < min_records. Insufficient evidence.

Usage

orm_priority(
  result,
  min_records = 2L,
  wrdi_high = 0.7,
  wrdi_low = 0.3,
  context_rcs_threshold = 15,
  lang = getOption("orisma.lang", "en")
)

Arguments

result

An orisma_result object.

min_records

Integer. Min records for evaluation. Default 2.

wrdi_high

Numeric. WRDI threshold for high disconnection. Default 0.7.

wrdi_low

Numeric. WRDI threshold for low disconnection. Default 0.3.

context_rcs_threshold

Numeric. RCS above which a category is considered a context category (dominant topic) rather than a risk. Default 15.

lang

Character. "en" or "es".

Value

A list with two data frames: ⁠$risks⁠ (priority-classified risk categories) and ⁠$context⁠ (dominant topic categories).


orisma documentation built on May 19, 2026, 1:07 a.m.