| Title: | Vital Operational Waiting Risk for Healthcare Systems |
|---|---|
| Description: | Vital Operational Waiting Risk (VOWR) provides tools for analysing monthly Referral-to-Treatment (RTT) panel data in healthcare systems. The package supports provider-level profiling, operational risk classification, waiting-time volatility assessment, Kaplan-Meier survival analysis, Cox proportional hazards modelling, and visualisation of time-to-threshold breach patterns. It is designed to help analysts and decision-makers identify providers with high waiting times, unstable performance, and increased risk of earlier threshold breach. The survival modelling methods follow Cox (1972) <doi:10.1111/j.2517-6161.1972.tb00899.x> and Kaplan and Meier (1958) <doi:10.1080/01621459.1958.10501452>. |
| Authors: | Muhammad Zahir Khan [aut, cre] (ORCID: <https://orcid.org/0009-0005-7645-8960>) |
| Maintainer: | Muhammad Zahir Khan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-20 13:46:13 UTC |
| Source: | https://github.com/cran/VOWR |
Kaplan-Meier plot by group
plot_km_by_delay(data, time, event, group)plot_km_by_delay(data, time, event, group)
data |
A data frame. |
time |
Name of duration/time variable. |
event |
Name of event variable: 1 = event occurred, 0 = censored. |
group |
Name of grouping variable. |
A survminer ggsurvplot object.
Estimate Cox proportional hazards model for threshold breach
vowr_cox_model(surv_profile)vowr_cox_model(surv_profile)
surv_profile |
Data frame from vowr_survival_merge() |
A fitted Cox proportional hazards model
Flag high-risk providers
vowr_flag(profile, wait_threshold = 18, vol_percentile = 0.9)vowr_flag(profile, wait_threshold = 18, vol_percentile = 0.9)
profile |
A data frame produced by vowr_profile() |
wait_threshold |
The mean wait time threshold (default 18 weeks) |
vol_percentile |
The percentile for volatility (default 0.90) |
The profile data frame with a 'risk_flag' column
Import and validate RTT data
vowr_import(path = NULL)vowr_import(path = NULL)
path |
Optional path to an NHS Referral-to-Treatment (RTT) CSV file. If NULL, the example data included in the package is loaded. |
A cleaned data frame.
sample_path <- system.file( "extdata", "rtt_trust_month_panel_last24_FIXED-2.csv", package = "VOWR" ) data <- vowr_import(sample_path) head(data)sample_path <- system.file( "extdata", "rtt_trust_month_panel_last24_FIXED-2.csv", package = "VOWR" ) data <- vowr_import(sample_path) head(data)
Kaplan-Meier plot by provider risk group
vowr_km_by_risk(surv_profile)vowr_km_by_risk(surv_profile)
surv_profile |
Data frame from vowr_survival_merge() |
A survminer Kaplan-Meier plot object
Visualize provider risk distribution
vowr_plot(flagged_data)vowr_plot(flagged_data)
flagged_data |
A data frame produced by vowr_flag() |
A ggplot object
Profile National Health Service provider performance
vowr_profile(data)vowr_profile(data)
data |
A data frame from vowr_import(). |
A summary table with the number of months, mean waiting time, median waiting time, waiting-time volatility, and total backlog for each provider.
Estimate time-to-breach survival model
vowr_survival(data, threshold = 18)vowr_survival(data, threshold = 18)
data |
A data frame from vowr_import(). |
threshold |
Mean waiting-time threshold in weeks. Default is 18. |
A list containing a Kaplan-Meier survival model object and the data used to fit the model.
Merge survival output with provider profile and risk flags
vowr_survival_merge(surv_result, profile, flagged)vowr_survival_merge(surv_result, profile, flagged)
surv_result |
Output from vowr_survival() |
profile |
Output from vowr_profile() |
flagged |
Output from vowr_flag() |
A provider-level survival analysis data frame
Run complete Volatility-Oriented Waiting-time Risk workflow
vowr_workflow(data, wait_threshold = 18, vol_percentile = 0.9)vowr_workflow(data, wait_threshold = 18, vol_percentile = 0.9)
data |
A data frame from vowr_import() |
wait_threshold |
Waiting-time breach threshold. Default is 18 weeks. |
vol_percentile |
Volatility percentile for risk flagging. Default is 0.90. |
A list containing profile, flagged data, risk plot, survival output, survival profile, Cox model, and Kaplan-Meier plot by risk group.