Skip to content

Commit a6fecb8

Browse files
authored
Update README.md
add detailed explanation
1 parent 0db6e14 commit a6fecb8

1 file changed

Lines changed: 40 additions & 11 deletions

File tree

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,52 @@ Each folder includes:
8080

8181
Contains internal `renv` files storing the project-specific package environment.
8282

83-
## Reproducibility via `renv`
83+
## Reproducing Results
84+
85+
1. Run `scripts/main-simulation-function-future-simul-part1.R` to simulate DGMs 2–4. Output is saved to `April10_fullsimulation/`.
86+
2. Run `scripts/main-simulation-function-future-simul-part2.R` for DGM 1. Output is saved to `April17_fullsimulation_contxy/`.
87+
3. Run `scripts/results-plotting.R` to process and visualize the simulation results used in the manuscript.
88+
89+
## Reproducibility: Step-by-Step Guide
90+
91+
This repository uses the [`renv`](https://rstudio.github.io/renv/) package to create a reproducible R environment. To replicate the computational setup and rerun the analyses:
92+
93+
### Step 1: Setup R and RStudio
94+
95+
1. Install **R version 4.2.2** from CRAN ([download link](https://cran.rstudio.com/bin/windows/base/old/4.2.2/R-4.2.2-win.exe))
96+
2. Install **RStudio** (latest stable release)
97+
98+
### Step 2: Clone or Download the Repository
99+
100+
Clone the repository via GitHub or download the ZIP file and unzip it locally.
84101

85-
This project uses the [`renv`](https://rstudio.github.io/renv/) package to ensure a reproducible R environment. To replicate the computational setup:
102+
### Step 3: Restore the Project Environment via `renv`
86103

87-
1. Install R version 4.2.2 from [CRAN](https://cran.rstudio.com/bin/windows/base/old/4.4.2/R-4.4.2-win.exe).
88-
2. Clone or download the repository.
89-
3. Open the project in RStudio.
90-
4. Run:
104+
1. Open **`Master-Thesis.Rproj`** with RStudio.
105+
2. Run the following in the R console:
91106

92107
```r
93108
renv::restore()
94109
```
95110

96-
This will install all required package versions as specified in `renv.lock`.
111+
This restores the exact package versions as specified in the `renv.lock` file, ensuring a consistent and reproducible computational environment.
97112

98-
## Reproducing Results
113+
### Step 4: Run the Simulation Scripts
99114

100-
1. Run `scripts/main-simulation-function-future-simul-part1.R` to simulate DGMs 2–4. Output is saved to `April10_fullsimulation/`.
101-
2. Run `scripts/main-simulation-function-future-simul-part2.R` for DGM 1. Output is saved to `April17_fullsimulation_contxy/`.
102-
3. Run `scripts/results-plotting.R` to process and visualize the simulation results used in the manuscript.
115+
1. Execute **`scripts/main-simulation-function-future-simul-part1.R`**
116+
117+
* Runs simulations for DGMs 2–4
118+
* Outputs will be saved in `simulation_results/April10_fullsimulation/`
119+
120+
2. Execute **`scripts/main-simulation-function-future-simul-part2.R`**
121+
122+
* Runs simulations for DGM 1
123+
* Outputs will be saved in `simulation_results/April17_fullsimulation_contxy/`
124+
125+
### Step 5: Reproduce the Figures
126+
127+
Run **`scripts/results-plotting.R`** to generate the plots used in the manuscript.
128+
129+
This script automatically collects and merges the simulation outputs from both parts and creates boxplots for each design condition.
130+
131+
---

0 commit comments

Comments
 (0)