seqic_indicator_13 | R Documentation |
Calculates the proportion of trauma records that meet or exceed a threshold for data validity among facilities at the specified trauma center levels. Optionally computes confidence intervals.
seqic_indicator_13(
data,
level,
included_levels = c("I", "II", "III", "IV"),
unique_incident_id,
validity_score,
validity_threshold = 85,
groups = NULL,
calculate_ci = NULL,
...
)
data |
A data frame containing trauma incident records. |
level |
Column indicating the trauma center designation level (e.g., I, II, III, IV). |
included_levels |
Character vector indicating what facility levels to
include in the analysis. Defaults to |
unique_incident_id |
Unique identifier for each record. |
validity_score |
Numeric. The proportion of each trauma registry record that is valid, expressed as a percentage (0–100). Typically calculated by the registry system. |
validity_threshold |
Numeric. The minimum acceptable validity percentage
threshold for records to be counted in the numerator. Defaults to |
groups |
Additional columns passed as a vector of strings to
|
calculate_ci |
If |
... |
Arguments passed on to
|
This function:
Filters to include only patients treated at trauma centers with
levels specified in included_levels
(default: Levels I–IV).
Deduplicates the dataset using unique_incident_id
to ensure each
incident is counted only once.
Flags records with a validity_score
greater than or equal to the
specified validity_threshold
threshold (default: 85).
Calculates the proportion of valid records among all included records.
Optionally calculates binomial confidence intervals using the method
specified in calculate_ci
via nemsqa_binomial_confint()
.
Adds a "Population/Sample" label unless grouping is applied via
groups
.
Users must ensure that appropriate column names are passed using tidy evaluation (bare column names) and that the input data has been cleaned and includes no missing or malformed identifiers, trauma level classifications, or validity scores.
A tibble summarizing SEQIC Indicator 13 results. Includes numerator, denominator, and performance rate 95% confidence intervals are included if requested.
Nicolas Foss, Ed.D., MS
# Packages
library(dplyr)
library(traumar)
# Simulated data for SEQIC Indicator 13
test_data <- tibble::tibble(
id = as.character(1:12),
trauma_level = c("I", "II", "III", "IV", "I", "II", "III", "IV", "I", "II",
"III", "IV"),
validity = c(90, 80, 88, 92, 86, 75, 89, 70, 95, 85, 83, 87)
)
# Run the function
traumar::seqic_indicator_13(
data = test_data,
level = trauma_level,
included_levels = c("I", "II", "III", "IV"),
unique_incident_id = id,
validity_score = validity,
validity_threshold = 85,
calculate_ci = "wilson"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.