The files in this archive allow to rerun the applied example (Section C)
in the online appendix for "Multilevel Analysis with Few Cluster: Improving Likelihood-based
Methods to Provide Unbiased Estimates and Accurate Inference". The example is
based on the article by Steenbergen and Jones (2002) "Modeling Multilevel
Data Structures" in the American Journal of Political Science.

The individual files are described as follows:

'macrodata.csv':

    Replication macro data obtained from the AJPS replication DataVerse

'setupData.R':

    This script file is used to set up the micro data (available from the
    GESIS data archive under study number ZA2898) and the macrodata (in
    'macrodata.csv') for analysis in *R*. The script requires the exention packages
    'memisc' and 'magrittr', which users may need to download and install from CRAN
    (https://cran.r-project.org).
  
'steenbergen-jones-nlme.R':

    This script file illustrates the application of REML and the m-l-1 heuristic when the
    function 'lme()' from the package 'nlme' is used. This script does not
    require the installation of any additional packages, as 'nlme' is usually
    part of a standard installation of R (due to its status as a 'recommended'
    package).

'steenbergen-jones-lme4.R':

    This script file illustrates the application of REML the m-l-1 heuristic,
    the Satterhwaite and Kenward-Roger approximations when the function 'lmer()'
    from the more 'modern' package 'lme4' is used. In addition to the
    installation of 'lme4', 'lmerTest', and 'pbkrtest' which are availabele from
    CRAN (https://cran.r-project.org), users will also need to install the
    packages 'devtools' (also available from CRAN) and 'iimm'. The latter
    package is not published on CRAN yet. Instead it will have to be installed
    with 'devtools::install_github("melff/iimm")'.

'steenbergen-jones-lme4-multiparameter-test.R':

    This script file illustrates the application of REML, the m-l-1 heuristic,
    and the Satterhwaite and Kenward-Roger approximations for multi-parameter
    hypothesis tests. It may require the installation of 'lme4', 'lmerTest', and
    'pbkrtest' which are availabele from CRAN (https://cran.r-project.org).

'genData.do':

    This do-file is used to set up the micro data (available from the
    GESIS data archive under study number ZA2898) and the macrodata (in
    'macrodata.csv') for analysis in *Stata*.

'SteenbergenJones.do':

    This do-file demonstrates the application of ML and REML estimators in *Stata*.
