Reference-based MI via Multivariate Normal RM (the “five macros” and MIWithD)

Quick summary

The “five macros” fit a Bayesian Normal RM model and then impute post withdrawal data under a series of possible post-withdrawal profiles including J2R, CIR and CR as described by Carpenter et al [Carpenter, J. R., Roger, J., and Kenward, M.G. Analysis of longitudinal trials with missing data: A framework for relevant, accessible assumptions, and inference via multiple imputation. J Biopharm Stat (2012).]. It then analyses the data using a univariate ANOVA at each visit and summarizes across imputations using Rubin’s rules.

An earlier macro to implement a similar marginal approach is also available here called MIWITHD (current version is 34). It uses the MCMC statement in proc MI rather than proc MCMC which limits its functionality compared to the five macro0s. The macros are available here for historical reasons, and the “5 macros” will usually be preferred.


The Part1A macro is rather slow as it is compatible with early versions of proc MCMC, and does not take advantage of more recent facilities. But the sample from the posterior is automatically stored and can be repeatedly used in Partt2A onward.

The MyMCMC macro (Gaussian Repeated Measures with conjugate priors fitted using proc MCMC in SAS) in the Direct likelihood / Bayesian approaches section imputes using MAR, J2R, CIR, ALMCF or AFCMCF much more efficiently and faster, but is restricted to a single variance-covariance matrix.


The current zip file containing the “five macros” package as tested on SAS 9.4 can be downloaded here Five_Macros20171010

This version no longer requires SAS/Grpah for the Plotter macro. The previous version ( tested on earlier version of SAS) can be downloaded here Five_Macros20161111

The folder TheFive macros contains the marcro Part1A, Part1B, Part2A, Part2B and Part3 along with a plotting macro.

The folders DIA_Run and PI_Demo_GSK contain examples based on two publicly available data sets (supplied).

The method based on causal inference by (White et al. to be published) has been integrated into Part2A and is now available automatically.

Also included are a poster from PSI 2012 annual conference that describes the method and an extensive documentation file.

The zip file containing the MIWithD macro can be downloaded here deliver_mar2014

The program file contains the only documentation. Note that methods have slightly different names here so that J2R was called J2C, CIR was called CDC while CR was called CC.

Also a final draft version of the original Carpenter et al paper is included package.

Comments are closed.