Package 'CRBHSF'

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

Help Index


Clean healthcare surveillance data

Description

Clean healthcare surveillance data

Usage

clean_health_data(data, provider_col, time_col)

Arguments

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

Description

Compare simple machine-learning benchmarks

Usage

compare_ml_benchmarks(data, outcome_col, predictor_cols)

Arguments

data

A data frame.

outcome_col

Character string giving the column name.

predictor_cols

Character vector of predictor column names.


Compute CRBHSF risk score

Description

Compute CRBHSF risk score

Usage

compute_crbhsf_risk(
  data,
  bayes_risk_col = "risk_bayes",
  trust_col = "latent_trust",
  lambda = 0.2
)

Arguments

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

Description

Compute Cyber-Resilience Pressure Ratio

Usage

compute_crpr(data, bayes_risk_col = "risk_bayes", trust_col = "latent_trust")

Arguments

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

Description

Create future deterioration outcome

Usage

create_deterioration_outcome(
  data,
  provider_col,
  time_col,
  value_col,
  threshold = 1
)

Arguments

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

Description

Estimate expected value of intervention benefit

Usage

estimate_evib(
  data,
  risk_col = "risk_crbhsf",
  review_cost = 1,
  miss_cost = 10,
  threshold = 0.5
)

Arguments

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

Description

Estimate latent organisational trust

Usage

estimate_latent_trust(
  data,
  anomaly_col = NULL,
  corruption_col = NULL,
  cyber_col = NULL,
  missing_col = NULL,
  delay_col = NULL
)

Arguments

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

Description

Fit lightweight Bayesian surveillance model

Usage

fit_bayesian_surveillance(data, y_col, n_col, alpha0 = 2, beta0 = 2)

Arguments

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

Description

Generate simple surveillance report

Usage

generate_surveillance_report(validation_results, deployment_results = NULL)

Arguments

validation_results

Validation results returned by validate_surveillance().

deployment_results

Optional deployment results returned by simulate_digital_twin().


Plot ablation AUC

Description

Plot ablation AUC

Usage

plot_ablation_auc(ablation_results)

Arguments

ablation_results

Function argument.


Plot digital-twin deployment impact

Description

Plot digital-twin deployment impact

Usage

plot_deployment_impact(deployment_results)

Arguments

deployment_results

Optional deployment results returned by simulate_digital_twin().


Plot risk distribution

Description

Plot risk distribution

Usage

plot_risk_distribution(data, risk_col = "risk_crbhsf")

Arguments

data

A data frame.

risk_col

Character string giving the column name.


Run CRBHSF ablation study

Description

Evaluates the incremental predictive contribution of multiple surveillance risk scores by calculating validation metrics for each score against a common binary outcome.

Usage

run_ablation_study(
  data,
  outcome_col,
  score_cols = c("risk_bayes", "latent_trust", "crpr", "risk_crbhsf")
)

Arguments

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 risk_bayes, latent_trust, crpr, and risk_crbhsf.

Value

A tibble containing validation metrics for each score column, including sample size, event count, event rate, AUC, and Brier score.


Simulate digital-twin deployment

Description

Simulate digital-twin deployment

Usage

simulate_digital_twin(
  data,
  outcome_col,
  score_col,
  capacity = 0.1,
  intervention_effect = 0.6,
  miss_cost = 15,
  review_cost = 1
)

Arguments

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.

Value

A tibble summarising reviews, prevented deteriorations, losses, and loss reduction.


Validate surveillance score

Description

Validate surveillance score

Usage

validate_surveillance(data, outcome_col, score_col)

Arguments

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.

Value

A tibble containing sample size, event count, event rate, AUC, and Brier score.