Under Construction 🚧
This repository contains the code and documentation for the evaluation of a diagnostic prediction rule for silicosis, which was developed in the Netherlands see 2007 research paper to rule out pneumoconiosis and identify workers at high risk for further diagnostic workup. Simulated data is used to replicate samples with similar summary characteristics as those provided in the original study, and different scenarios are simulated by incorporating outcome misclassification rates.
Lexces aims to prevent new cases of silicosis in Dutch workers. For this, a Health Surveillance Program (HSP) for respiratory occupational diseases is being developed. The diagnostic prediction rule could be incorporated as part of the HSP. However, the diagnostic rule was developed in the past with chest x-rays (CXR) as the reference standard for the diagnosis of silicosis. Recently, there have been concerns of suboptimal diagnostic performance of CXR for the diagnosis of silicosis. Thus, the current work aims to assess the potential impact of misclassification error on the diagnostic rule's performance, and to scope for potential alternative diagnostic and prediction models for silicosis/pneumoconiosis.
Note: This repository is a work in progress and full reproducibility and re-use may not me granted at this point. Please use with caution.
The suggested use of this repository starts with making sure that R and RStudio are installed in your computer:
- Install R and RStudio on your computer if you haven't done so. (Note that these analyses were conducted under R version 4.4.1 and RStudio 2024.04.2).
- Clone this repository. If you do not know how to do this, you can follow these instructions. Alternatively, you can download the ZIP file, unpack it, and place it in a folder in your computer.
- You should now have all these files in your computer with an identical folder structure (described in the following section).
- In the main directory, open the file named lexces-silicosis-predict.Rproj in RStudio.
- You can navigate through the folders on the right-bottom panel of R Studio. Open the R folder. You should now see a series of files ending with .qmd.
- Open one of the .qmd files. You can run every chunk of code sequentially to reproduce the analyses. Make sure to respect the order and if something fails, I recommend that you start running al chunks of code from the beginning. If you don't know how to run a chunk of code, you can imitate what this person is doing. If you get a message saying "Access denied", change from Visual to Source mode which can be done with the Ctrl+Shift+F4 command.
- Please note that scripts are meant to be sourced into the flow of analyses in the main .qmd files. You may encounter problems if you attempt to run the scripts independently.
If you are not able to follow the prior steps, you may also consider reviewing the PDF reports documenting the analyses.
Currently, there is only one relevant .qmd file linked to the R scripts and analyses:
- Misclassification error of silicosis diagnostic prediction rule. Link to the report: PDF
Although I have made significant efforts to ensure reproducibility of this project, I encourage you to contact me or post a request in this repository in case you encounter any issues.
The project structure distinguishes three kinds of folders:
- read-only (RO): not edited by either code or researcher
- human-writeable (HW): edited by the researcher only.
- project-generated (PG): folders generated when running the code; these folders can be deleted or emptied and will be completely reconstituted as the project is run.
.
├── .gitignore
├── CITATION.cff
├── LICENSE
├── README.md
├── lexces-silicosis-predict.Rproj
├── data <- All project data files
│ ├── processed <- The final, canonical data sets for modeling. (PG)
│ ├── raw <- The original, immutable data. (RO)
│ └── temp <- Intermediate data that has been transformed. (PG)
├── docs <- Documentation for users (HW)
│ ├── manuscript <- Manuscript source, docx. (HW)
│ ├── presentations <- Presentations, pptx, pdf. (HW)
│ └── reports <- Project reports, pdf. (HW)
├── results
│ ├── output_figures <- Figures for the manuscript or reports (PG)
│ └── output_tables <- Output tables for the manuscript (PG)
└── R <- Source code for this project (HW)
├── scripts <- Scripts sourced in main R markdown documents (PG)
└── sessions <- Text files with information of R sessions (PG)
This project is licensed under the terms of the MIT License.
Permission to use the Lexces logo for this project has been obtained. Please refer to their copyright notice.
This project structure repository is adapted from the Utrecht University simple R project template, which builds upon the Good Enough Project Cookiecutter template by Barbara Vreede (2019).