| Title: | Cyber-Resilient Bayesian Healthcare Surveillance Framework |
|---|---|
| Description: | Provides methods for cyber-resilient 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-25 08:37:10 UTC |
| Source: | https://github.com/zerish12/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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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(). |
Plot ablation AUC
plot_ablation_auc(ablation_results)plot_ablation_auc(ablation_results)
ablation_results |
Function argument. |
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(). |
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. |
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.