| Title: | QI Matrix |
|---|---|
| Description: | Defines functions needed to generate Quality Improvement Matrices in R. |
| 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.0.2.2 |
| Built: | 2026-05-28 02:41:35 UTC |
| Source: | https://github.com/AUS-DOH-Safety-and-Quality/qiverse |
Construct a Flextable from the SPC Funnel Matrix Data
spc_funnel_matrix_flextable( data, filter_parent_indicator = NULL, filter_indicator = NULL, filter_parent_group = NULL, filter_group = NULL )spc_funnel_matrix_flextable( data, filter_parent_indicator = NULL, filter_indicator = NULL, filter_parent_group = NULL, filter_group = NULL )
data |
A data.table output from the spc_funnel_matrix_prep_data function |
filter_parent_indicator |
A vector of parent indicators to filter the data by. Data will not be filtered by default (NA) |
filter_indicator |
A vector of indicator to filter the data by. Data will not be filtered by default (NA) |
filter_parent_group |
A vector of parent_group to filter the data by. Data will not be filtered by default (NA) |
filter_group |
A vector of group to filter the data by. Data will not be filtered by default (NA) |
A flextable visualisation for the SPC Funnel Matrix.
## Not run: library(qiverse.qimatrix) library(qiverse.data) spc_funnel_matrix_data <- spc_funnel_matrix_prep_data( indicator = example_spc_data$indicator, group = example_spc_data$group, period_end = example_spc_data$period_end, period_start = example_spc_data$period_start, numerator = example_spc_data$numerator, denominator = example_spc_data$denominator, multiplier = example_spc_data$multiplier, better_is = example_spc_data$better_is, parent_group_name = "All", indicator_group = "All", spc_chart_type = example_spc_data$spc_chart_type, funnel_chart_type = example_spc_data$funnel_chart_type, funnel_data_points = "Yes" ) spc_funnel_matrix_flextable(data = spc_funnel_matrix_data) ## End(Not run)## Not run: library(qiverse.qimatrix) library(qiverse.data) spc_funnel_matrix_data <- spc_funnel_matrix_prep_data( indicator = example_spc_data$indicator, group = example_spc_data$group, period_end = example_spc_data$period_end, period_start = example_spc_data$period_start, numerator = example_spc_data$numerator, denominator = example_spc_data$denominator, multiplier = example_spc_data$multiplier, better_is = example_spc_data$better_is, parent_group_name = "All", indicator_group = "All", spc_chart_type = example_spc_data$spc_chart_type, funnel_chart_type = example_spc_data$funnel_chart_type, funnel_data_points = "Yes" ) spc_funnel_matrix_flextable(data = spc_funnel_matrix_data) ## End(Not run)
Extract all favourable and unfavourable SPC and Funnel Plot patterns, and export into the SPC Funnel Matrix format.
spc_funnel_matrix_prep_data( indicator, group, period_end, period_start, numerator, denominator, multiplier = 1, better_is = "Higher", overdispersion = FALSE, parent_group_name = "All", parent_indicator = "All", spc_chart_type = "p", funnel_chart_type = "PR", indicator_name = indicator, group_name = group, funnel_data_points = "Yes" )spc_funnel_matrix_prep_data( indicator, group, period_end, period_start, numerator, denominator, multiplier = 1, better_is = "Higher", overdispersion = FALSE, parent_group_name = "All", parent_indicator = "All", spc_chart_type = "p", funnel_chart_type = "PR", indicator_name = indicator, group_name = group, funnel_data_points = "Yes" )
indicator |
A vector to denote the indicator group. Used to calculate aggregate SPC and Funnel Plots |
group |
A vector of group names. Used to aggregate and group points on plots |
period_end |
A date (or character of format "yyyy-mm-dd") for the end date of the period. |
period_start |
A date (or character of format "yyyy-mm-dd") for the start date of the period. |
numerator |
A vector of the numerator. Used to calculate the value for SPC and Funnel plots |
denominator |
A vector of the denominator Used to calculate the value for SPC and Funnel plots |
multiplier |
Scale relative risk and funnel by this factor. Default to 1, but 100 sometime used, e.g. in some group mortality ratios. |
better_is |
A string identifying the direction that is favourable for the indicator. "Higher" for points below the lower control limit to be unfavourable, "Lower" for points above the upper control limit to be unfavourable, and "Neutral" if the direction is not stated. Default is "Higher" |
overdispersion |
A logical value indicating whether to apply an overdispersion adjustment to control limits. Default is FALSE. |
parent_group_name |
A vector of parent group names which are to be displayed in the tooltip. These are the major categories for the groups. Default is "All" |
parent_indicator |
A vector used for indicator parent grouping, i.e. grouping together maternity related indicators into a Maternity group. Default is "All" |
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" |
indicator_name |
A vector of descriptive names for indicator. Default indicator variable |
group_name |
A vector of descriptive names for groups Default group variable |
funnel_data_points |
A vector of "Yes" or NA, marks which data points are included in the funnel plot calculation. Default "Yes" |
A data.table with the required fields for the SPC Funnel Matrix.
## Not run: library(qiverse.qimatrix) library(qiverse.data) spc_funnel_matrix_data <- spc_funnel_matrix_prep_data( indicator = example_spc_data$indicator, group = example_spc_data$group, period_end = example_spc_data$period_end, period_start = example_spc_data$period_start, numerator = example_spc_data$numerator, denominator = example_spc_data$denominator, multiplier = example_spc_data$multiplier, better_is = example_spc_data$better_is, parent_group_name = "All", parent_indicator = "All", spc_chart_type = example_spc_data$spc_chart_type, funnel_chart_type = example_spc_data$funnel_chart_type, funnel_data_points = "Yes" ) ## End(Not run)## Not run: library(qiverse.qimatrix) library(qiverse.data) spc_funnel_matrix_data <- spc_funnel_matrix_prep_data( indicator = example_spc_data$indicator, group = example_spc_data$group, period_end = example_spc_data$period_end, period_start = example_spc_data$period_start, numerator = example_spc_data$numerator, denominator = example_spc_data$denominator, multiplier = example_spc_data$multiplier, better_is = example_spc_data$better_is, parent_group_name = "All", parent_indicator = "All", spc_chart_type = example_spc_data$spc_chart_type, funnel_chart_type = example_spc_data$funnel_chart_type, funnel_data_points = "Yes" ) ## End(Not run)