These files in the OSF project allow replicating the simulation study in the paper *Evaluating Model Fit in Two-Level Mokken Scale Analysis* (submitted to the journal *Psych*). The R file **replicateResults.R** contains all R code to replicate Tables 1, 2, 3, 4, and 5, and Figures 4, 5. Note that the R code to replicate Figures 2 and 3 is available in these figures. There is no R code to replicate Figures 1 as this Figure is not based on data.
By setting the the object `useResultsFromOsf` to `FALSE`, and running the entire file, the entire simulation is run, and the results are used to reconstruct Tables 1, 2, 3 and 4, and Figures 1 and 2 in the paper (approx 4-6 hours, laptop single core).
By downloading the **.Rds** files into an appropriate directory, setting object `useResultsFromOsf` to `TRUE` (default) and setting objsect `osfFileDir`to the name of the directory with the downloaded Rds-files, and running the entire file, the **.Rds** files are read, which contain the results from the simulation study. Then, Tables 1, 2, 3 and 4, and Figures 1 and 2 in the paper are constructed based on the results in the **.Rds** files (approx 5 min.).