results_summarize {nemsqar} | R Documentation |
Tabulate Measure Results
Description
Calculates measure numerator, denominator, and proportions for a NEMSQA measure and each population (total, adult, and pediatric). The function returns a summarized result table for the selected populations, with optional confidence intervals for the proportions.
This function is used throughout the package to calculate measure results
for different populations (e.g., total population, adults, and pediatric
groups) based on the given input data. Each of the population arguments
(total_population
, adult_population
, peds_population
) defaults to NULL
.
If a population argument is NULL
, it will be excluded from the results.
Usage
results_summarize(
total_population = NULL,
adult_population = NULL,
peds_population = NULL,
measure_name,
population_names = c("all", "adults", "peds"),
numerator_col,
confidence_interval = FALSE,
method = c("wilson", "clopper-pearson"),
conf.level = 0.95,
correct = TRUE,
...
)
Arguments
Value
A tibble containing the summarized measure results for the selected populations. The output includes:
-
measure
: The measure name. -
pop
: The population group (e.g., "All", "Adults", "Peds"). -
numerator
: The count of qualifying events. -
denominator
: The total number of records in the population. -
prop
: The proportion of qualifying events. -
prop_label
: A formatted percentage representation ofprop
. -
lower_ci
,upper_ci
: The lower and upper confidence interval bounds (ifconfidence_interval = TRUE
).
If multiple populations are specified, their results are combined into a
single tibble using dplyr::bind_rows()
.
Author(s)
Samuel Kordik, BBA, BS