| Title: | Cyber-Resilient Bayesian Healthcare Surveillance Framework |
|---|---|
| Description: | Provides methods for healthcare performance surveillance using Bayesian risk estimation, latent organisational trust modelling, cyber-resilience assessment, external validation, decision-theoretic optimisation, and digital-twin deployment simulation. The package supports prospective deterioration monitoring, uncertainty-aware risk assessment, intervention prioritisation, ablation analysis, and operational evaluation for healthcare performance management and health system resilience research. The methodological framework is informed by contemporary guidance on prediction model development and validation (Efthimiou et al., 2024 <doi:10.1136/bmj-2023-078276>), transparent reporting of prediction models (Collins et al., 2024 <doi:10.1136/bmj-2023-078378>), and decision-analytic model evaluation (Vickers and Elkin, 2006 <doi:10.1177/0272989X06295361>). |
| Authors: | Muhammad Zahir Khan [aut, cre], Abdul Wahid Khan [aut] |
| Maintainer: | Muhammad Zahir Khan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-24 13:21:38 UTC |
| Source: | https://github.com/cran/CRBHSF |
Clean healthcare surveillance data
clean_health_data(data, provider_col, time_col)clean_health_data(data, provider_col, time_col)
data |
A data frame. |
provider_col |
Character string giving the column name. |
time_col |
Character string giving the column name. |
A cleaned data.frame containing standardized health-service performance variables. The output typically includes harmonized provider identifiers, time-period variables, numeric performance measures, and derived fields required for CRBHSF risk estimation. Each row represents one provider-period observation.
Compare simple machine-learning benchmarks
compare_ml_benchmarks(data, outcome_col, predictor_cols)compare_ml_benchmarks(data, outcome_col, predictor_cols)
data |
A data frame. |
outcome_col |
Character string giving the column name. |
predictor_cols |
Character vector of predictor column names. |
A data.frame or list containing benchmark results comparing CRBHSF with conventional machine-learning models. The output includes model names and performance metrics such as AUC, sensitivity, specificity, accuracy, and/or Brier score, depending on the supplied inputs. These results summarise relative predictive performance across competing methods.
Compute CRBHSF risk score
compute_crbhsf_risk( data, bayes_risk_col = "risk_bayes", trust_col = "latent_trust", lambda = 0.2 )compute_crbhsf_risk( data, bayes_risk_col = "risk_bayes", trust_col = "latent_trust", lambda = 0.2 )
data |
A data frame. |
bayes_risk_col |
Character string giving the column name. |
trust_col |
Character string giving the column name. |
lambda |
Numeric parameter. |
A data.frame containing the original observations with additional CRBHSF risk-score columns. The returned risk values represent estimated future deterioration or breach risk after incorporating performance pressure, operational pressure, and cyber/data-reliability adjustment components.
Compute Cyber-Resilience Pressure Ratio
compute_crpr(data, bayes_risk_col = "risk_bayes", trust_col = "latent_trust")compute_crpr(data, bayes_risk_col = "risk_bayes", trust_col = "latent_trust")
data |
A data frame. |
bayes_risk_col |
Character string giving the column name. |
trust_col |
Character string giving the column name. |
A numeric vector or data.frame containing cyber-resilience pressure ratio/index values. Larger values indicate greater cyber or data-integrity pressure relative to the observed operational context and may be used as an input to CRBHSF risk scoring.
Create future deterioration outcome
create_deterioration_outcome( data, provider_col, time_col, value_col, threshold = 1 )create_deterioration_outcome( data, provider_col, time_col, value_col, threshold = 1 )
data |
A data frame. |
provider_col |
Character string giving the column name. |
time_col |
Character string giving the column name. |
value_col |
Character string giving the column name. |
threshold |
Numeric parameter. |
A data.frame containing the input data with an added binary deterioration outcome column. The new outcome indicates whether a provider experienced future deterioration or target breach according to the specified threshold and forecasting horizon.
Estimate expected value of intervention benefit
estimate_evib( data, risk_col = "risk_crbhsf", review_cost = 1, miss_cost = 10, threshold = 0.5 )estimate_evib( data, risk_col = "risk_crbhsf", review_cost = 1, miss_cost = 10, threshold = 0.5 )
data |
A data frame. |
risk_col |
Character string giving the column name. |
review_cost |
Numeric parameter. |
miss_cost |
Numeric parameter. |
threshold |
Numeric parameter. |
A data.frame containing expected value of information or expected value of intervention benefit estimates for each observation or decision unit. The output typically includes baseline risk, intervention-adjusted risk, expected loss, expected benefit, and recommended action variables.
Estimate latent organisational trust
estimate_latent_trust( data, anomaly_col = NULL, corruption_col = NULL, cyber_col = NULL, missing_col = NULL, delay_col = NULL )estimate_latent_trust( data, anomaly_col = NULL, corruption_col = NULL, cyber_col = NULL, missing_col = NULL, delay_col = NULL )
data |
A data frame. |
anomaly_col |
Character string giving the column name. |
corruption_col |
Character string giving the column name. |
cyber_col |
Character string giving the column name. |
missing_col |
Character string giving the column name. |
delay_col |
Character string giving the column name. |
An object containing the function output. The exact structure depends on the inputs and analysis requested, but typically contains CRBHSF risk, performance, decision, or diagnostic summaries suitable for downstream analysis.
Fit lightweight Bayesian surveillance model
fit_bayesian_surveillance(data, y_col, n_col, alpha0 = 2, beta0 = 2)fit_bayesian_surveillance(data, y_col, n_col, alpha0 = 2, beta0 = 2)
data |
A data frame. |
y_col |
Character string giving the column name. |
n_col |
Character string giving the column name. |
alpha0 |
Numeric parameter. |
beta0 |
Numeric parameter. |
An object containing the function output. The exact structure depends on the inputs and analysis requested, but typically contains CRBHSF risk, performance, decision, or diagnostic summaries suitable for downstream analysis.
Generate simple surveillance report
generate_surveillance_report(validation_results, deployment_results = NULL)generate_surveillance_report(validation_results, deployment_results = NULL)
validation_results |
Validation results returned by validate_surveillance(). |
deployment_results |
Optional deployment results returned by simulate_digital_twin(). |
An object containing the function output. The exact structure depends on the inputs and analysis requested, but typically contains CRBHSF risk, performance, decision, or diagnostic summaries suitable for downstream analysis.
Plot ablation AUC
plot_ablation_auc(ablation_results)plot_ablation_auc(ablation_results)
ablation_results |
Function argument. |
A ggplot object showing the requested CRBHSF diagnostic, performance, risk, or intervention summary. The plot can be printed, modified, or saved using standard ggplot2 functions.
Plot digital-twin deployment impact
plot_deployment_impact(deployment_results)plot_deployment_impact(deployment_results)
deployment_results |
Optional deployment results returned by simulate_digital_twin(). |
A ggplot object showing the requested CRBHSF diagnostic, performance, risk, or intervention summary. The plot can be printed, modified, or saved using standard ggplot2 functions.
Plot risk distribution
plot_risk_distribution(data, risk_col = "risk_crbhsf")plot_risk_distribution(data, risk_col = "risk_crbhsf")
data |
A data frame. |
risk_col |
Character string giving the column name. |
A ggplot object showing the requested CRBHSF diagnostic, performance, risk, or intervention summary. The plot can be printed, modified, or saved using standard ggplot2 functions.
Evaluates the incremental predictive contribution of multiple surveillance risk scores by calculating validation metrics for each score against a common binary outcome.
run_ablation_study( data, outcome_col, score_cols = c("risk_bayes", "latent_trust", "crpr", "risk_crbhsf") )run_ablation_study( data, outcome_col, score_cols = c("risk_bayes", "latent_trust", "crpr", "risk_crbhsf") )
data |
A data frame containing the outcome and score columns. |
outcome_col |
Character string giving the binary outcome column. |
score_cols |
Character vector giving the surveillance score columns
to evaluate. Defaults to |
A tibble containing validation metrics for each score column, including sample size, event count, event rate, AUC, and Brier score.
Simulate digital-twin deployment
simulate_digital_twin( data, outcome_col, score_col, capacity = 0.1, intervention_effect = 0.6, miss_cost = 15, review_cost = 1 )simulate_digital_twin( data, outcome_col, score_col, capacity = 0.1, intervention_effect = 0.6, miss_cost = 15, review_cost = 1 )
data |
A data frame containing outcome and score columns. |
outcome_col |
Character string giving the binary deterioration outcome column. |
score_col |
Character string giving the risk score column used for prioritisation. |
capacity |
Proportion of observations selected for review. |
intervention_effect |
Proportion of reviewed deterioration events assumed preventable. |
miss_cost |
Cost assigned to a missed deterioration event. |
review_cost |
Cost assigned to each review. |
A tibble summarising reviews, prevented deteriorations, losses, and loss reduction.
Validate surveillance score
validate_surveillance(data, outcome_col, score_col)validate_surveillance(data, outcome_col, score_col)
data |
A data frame containing the outcome and score columns. |
outcome_col |
Character string giving the binary outcome column. |
score_col |
Character string giving the risk score column. |
A tibble containing sample size, event count, event rate, AUC, and Brier score.