forked from langtonhugh/iteval-sims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
36 lines (26 loc) · 2.11 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# iteval-sims
<!-- badges: start -->
<!-- badges: end -->
The goal of the **iteval-sims** [GitHub](https://github.com/) repository is to enable replication of the simulation study in Hoogland et al. [yet to insert DOI]. The R scripts are not meant to be used for other purposes and are not annotated. R package [**iteval**](https://github.com/jeroenhoogland/iteval) is available for application of the methods in practice and contains example illustrations and help for all functions.
This README file describes the contents of the **iteval-sims** repository and the required steps for replication of the simulations, tables, and figures. Note that this repository does not have the structure of an R package and does not have to be installed.
First, `population.R` simulates the population data and stores the required representations in `population.RData`. Second, `sim.RData` performs the simulation study. Note that this script depends on R package **Hmisc**, **rms**, **MatchIt** and **iteval** and sources `support_functions.R` (which only contains helper functions specific to the simulation).
Just running `sim.RData` for a number of simulation provides some replications to check against the pre-computed results in the `replicate` folder. Note that the simulations take a considerable amount of time, and that all results are available in pre-computed form. The `replicate.R` script provides exact replicates of the Figures and Tables in Hoogland et al. [yet to insert DOI]. Results have been checked on R version 4.2.0 and using the following package versions.
Supplementary simulations on model misspecification have also been added in the `sup` folder, where the `sim*.R` scripts can run the simulations, `replicate_suppl.R` again provides replication of key figures, and the `supple_sim_*` folders contain pre-computed simulation results.
```{r}
library(Hmisc)
library(rms)
library(MatchIt)
library(iteval)
library(ggplot2)
sessionInfo()
```