This repository contains the R code used to reconstruct questionnaire scores and conduct the inferential, sensitivity, and exploratory prediction analyses for the liver transplant adherence study.
.
├── analysis.R
├── README.md
├── data/
│ └── README_data_access.md
└── results/ # generated locally; not committed
The participant-level dataset is not included in the public repository.
The script expects the analytic SPSS file at:
data/Nazari_Liver_Transplant_Clean.sav
A different location can be supplied without editing the script:
Sys.setenv(ANALYSIS_DATA_FILE = "path/to/analytic_file.sav")
Sys.setenv(ANALYSIS_OUTPUT_DIR = "path/to/results")
source("analysis.R")Run the analysis from the repository root. The script records the random seed, input-file SHA-256 hash, package versions, session information, resampling configuration, and generated output inventory.
Before the final repository release:
- verify the questionnaire scoring keys and the ATQ cutoff;
- run the script on the locked final analytic dataset;
- reconcile every regenerated estimate, table, and figure with the manuscript;
- inspect model and resampling error logs;
- create or update
renv.lockfrom the successful final run; - confirm that no participant-level data or fitted model objects are tracked by Git.
The repository must not include the SPSS dataset, participant identifiers, source-row numbers, duplicate-cluster details, row-level predictions, or fitted workflow objects. Public repository runs use:
EXPORT_ROW_LEVEL_OUTPUTS <- FALSE
SAVE_FITTED_MODELS <- FALSEThe machine-learning analyses are exploratory and use grouped nested repeated cross-validation. Potential duplicate clusters remain in the same resampling partition. The repository does not provide a clinically deployable model and does not constitute external validation.