This is GitHub repository hosting the code and most of the material belonging to the manuscript Using Multilevel Regression and Poststratification to Efficiently Derive Accurate Norms.
4 things are required to be able to rerun our code:
- TwinLife data: Must be requested from GESIS. Alternatively you can run the tutorial code on the synthetic sample we provide on our OSF project.
- CFT 20-R, German version norms: Means and SDs (Streuung) of "Teil-1 Max" have to be manually extracted from the manual for age groups 11;1-11;6 through 60-64. The Normalised Manual IQ values presented in Table 2 in the manuscript also have to be extracted.
- The census tables, which we provide on our OSF project.
- To ensure the code works as expected, it’s best to have the same versions of R (4.2.2) and the packages we use.
Since brms requires the most work to set up, it's best to start there. Follow this walk-through for installing
brms
on different operating systems (take care to install the right version of RTools if you're on Windows!). Once you've done that, it's probably safe to install the proper versions of the of rest of the packages by runningrenv::restore()
. Ifrenv::restore()
fails to install any of the packages, tryremotes::install_version()
to install that specific version of the package and runrenv::restore()
again.
Note that all code in our tutorial document can be executed based on materials we provide on our OSF repository.