| Title: | Quality Improvement Chart Patterns |
|---|---|
| Description: | Defines functions needed to detect patterns in quality improvement charts. |
| Authors: | Healthcare Quality Intelligence Unit (Western Australia Health) [aut, cre] |
| Maintainer: | Healthcare Quality Intelligence Unit (Western Australia Health) <[email protected]> |
| License: | GPL (>= 3) + file LICENSE |
| Version: | 0.1.3 |
| Built: | 2026-05-28 02:40:29 UTC |
| Source: | https://github.com/AUS-DOH-Safety-and-Quality/qiverse |
Generate funnel plot values and output as data table
append_fpl_val( numerator, denominator, group, funnel_chart_type = "PR", multiplier = 1, better_is, overdispersion = FALSE, period_end )append_fpl_val( numerator, denominator, group, funnel_chart_type = "PR", multiplier = 1, better_is, overdispersion = FALSE, period_end )
numerator |
A numeric vector |
denominator |
A numeric vector |
group |
A vector of group ids |
funnel_chart_type |
A string identifying the type of funnel plot. Default "PR" |
multiplier |
A string identifying the multiplication factor. Default 1 |
better_is |
A character string, shows direction of positive change. |
overdispersion |
A boolean flag for whether to adjust for overdispersion |
period_end |
A string of the maximum date of the funnel period for use as the identifier for funnel astronomical points type Date format: %d/%m/%Y:15/12/2022 |
The input data with appended funnel plot values in a data table
Pattern Detection
pattern_detection( indicator, group, period_end, numerator, denominator, multiplier, better_is, spc_chart_type = "p", funnel_chart_type = "PR", parent_indicator = NA, indicator_name = indicator, group_name = group, funnel_data_points = "Yes", overdispersion = FALSE, trend_size = 5, shift_size = 7 )pattern_detection( indicator, group, period_end, numerator, denominator, multiplier, better_is, spc_chart_type = "p", funnel_chart_type = "PR", parent_indicator = NA, indicator_name = indicator, group_name = group, funnel_data_points = "Yes", overdispersion = FALSE, trend_size = 5, shift_size = 7 )
indicator |
A vector of indicator codes |
group |
A vector of group ids |
period_end |
A vector of dates of type Date format: %d/%m/%Y:12/11/2021 |
numerator |
A numeric vector |
denominator |
A numeric vector |
multiplier |
A string identifying the multiplication factor. Default 1 |
better_is |
A character string, shows direction of positive change. |
spc_chart_type |
A string identifying the type of spc chart. Default "p" |
funnel_chart_type |
A string identifying the type of funnel plot. Default "PR" |
parent_indicator |
A vector used for indicator grouping. |
indicator_name |
A vector of descriptive names for indicators |
group_name |
A vector of descriptive names for groups |
funnel_data_points |
A vector of which data points are included in the funnel plot calculation |
overdispersion |
A boolean flag for whether to adjust for overdispersion |
trend_size |
The number of points in a trend pattern |
shift_size |
The number of points in a shift pattern |
A data table of unique indicator group rows with any identified patterns
Other Pattern detection functions:
pattern_rules(),
valid_spc()
Apply pattern rules
pattern_rules( numerator, denominator, period_end, unique_key, spc_chart_type = "p", multiplier = 1, better_is = "Lower", trend_size = 5, shift_size = 7 )pattern_rules( numerator, denominator, period_end, unique_key, spc_chart_type = "p", multiplier = 1, better_is = "Lower", trend_size = 5, shift_size = 7 )
numerator |
A numeric vector |
denominator |
A numeric vector. Set as NA for g and t spc_chart_type. |
period_end |
A vector of dates of type Date format: %d/%m/%Y:15/12/2022 |
unique_key |
A key to identify each indicator group combination |
spc_chart_type |
A string identifying the type of spc chart. Default "p" |
multiplier |
A string identifying the multiplication factor. Default 1 |
better_is |
A character string, shows direction of positive change. "Higher" or "Lower" |
trend_size |
The number of points in a trend pattern |
shift_size |
The number of points in a shift pattern |
The input data with appended identified patterns
Other Pattern detection functions:
pattern_detection(),
valid_spc()
Check validity of data for SPC
valid_spc(numerator, denominator, period_end)valid_spc(numerator, denominator, period_end)
numerator |
A numeric vector |
denominator |
A numeric vector |
period_end |
A vector of dates of type Date format: %d/%m/%Y:15/12/2022 |
The input data with added valid_spc flag for filtering
Other Pattern detection functions:
pattern_detection(),
pattern_rules()