Stat-JR Downloads

Otherwise, templates and eBooks (i.e. other than those distributed with Stat-JR) will be made available below as they become available.


Multiple imputation for 2-level models in Stat-JR

Downloading the template and eBook

The zip file below contains all you need to conduct multiple imputation for 2-level models in Stat-JR. This has been produced as part of a collaborative project between the LEMMA III and PATHWAYS nodes of the ESRC-funded National Centre for Research Methods (NCRM).

Multiple imputation for 2-level models with missing data in Stat-JR (zip, 457 kb)‌

The zip file contains a Stat-JR super-template (2LevelImpute) for 2-level data that allows for missing values in explanatory or response variables, and can handle normal or categorical variables.

In addition, a pdf is now available providing a brief introduction to the template; this covers much the same content as the DEEP eBook (see below).

Stat-JR super-templates are so-called because they call other templates; the super-template 2LevelImpute allows the user separately to specify the imputation and model of interest (MOI). The multiply-imputed datasets are then produced, and the MOI fitted to each (via a variety of other Stat-JR templates 2LevelImpute calls); these are combined using Rubin's rules, and the results for the final MOI fit are then returned (together with results from a complete case analysis, for comparison). If your computer has multiple processors, these will be used in parallel for the imputation models.

The zip file also contains a Stat-JR DEEP eBook (2LevelImpute eBook.zip - this is imported into DEEP as a zip file), with worked examples and further guidance on how to conduct 2-level multiple imputation in Stat-JR.

Once you have downloaded the zip file, extract it into your Stat-JR directory so that the files are saved as follows:

StatJR\templates\1LevelMVMixedResponsecc.py
StatJR\templates\2LevelImpute.py
StatJR\templates\2LevelMVNormal.py
StatJR\templates\CompleteCases.py
StatJR\templates\Resp2LevelMVMixedResponsemvu.py
StatJR\templates\Take.py

StatJR\ebooks\2LevelImpute eBook.zip

StatJR\datasets\tutmiss.dta

You will see this includes a number of the templates 2LevelImpute.py needs to run properly (it also requires a variety of core templates released already as part of the Stat-JR install, including 1LevelMod.py, 1LevelMVNormal.py, 2LevelMod.py, 2LevelRS.py, Generate.py, Merge.py).

Once you have saved these files, you can either open TREE, and choose 2LevelImpute from the list of templates and/or open DEEP, and import the 2LevelImpute eBook.

Whilst we have tested 2LevelImpute in a variety of scenarios, if you do encounter any problems then please let us know via our Bug Report Form.

For earlier versions of the multiple imputation for 2-level models in Stat-JR downloads see here.


eBook for causal modelling

The zip file below contains an eBook (and supporting templates) with examples estimating causal effects in the presence of mediating variables. It uses the gformula command in Stata, an implementation of the g-computation procedure, and was produced as part of a collaborative project between the LEMMA III and PATHWAYS nodes of the ESRC-funded National Centre for Research Methods (NCRM).

Causal modelling - mediation (zip, 207 kb)‌

Once you have downloaded the zip file, extract it into your Stat-JR directory so that the files are saved as follows:

StatJR\templates\Mediation.py
StatJR\templates\StataRegress.py
StatJR\templates\MediationQuiz1.py
StatJR\templates\MediationQuiz2.py

StatJR\ebooks\Mediation.zip

StatJR\datasets\izhevsk_swansea.dta

Once you have saved these files, you can either open TREE, and choose Mediation from the list of templates and/or open DEEP, and import the Mediation eBook.

Whilst we have tested these files in a variety of scenarios, if you do encounter any problems then please let us know via our Bug Report Form.


Other templates

The following zip files contain groups of templates that we didn't add to the main install but which may be of interest to users. To use these templates unzip them in the templates subdirectory of Stat-JR. Please note that these are development versions, and we will aim to add documentation on these templates at a later date.

further multivariate normal and mixed response models (zip, 59 kb)‌

further statistical operations in R (zip, 5 kb)‌

various types of templates for fitting models in aML (zip, 18 kb)‌

various types of other model (zip, 52 kb)‌