Join or split multiple imputed datasets
{mijoin7 [filestubname] | misplit7} , clear [ m(#) impid(varname) ]
Description
mijoin7 converts datasets prepared by Carlin's miset routine to mvis format, for analysis by micombine7. The component datasets are stacked (joined vertically). If filestubname is specified then the program will look for files called filestubname1.dta, filestubname2.dta,..., filestubnamem.dta where m is determined by the m() option.
misplit7 converts a dataset prepared by mvis to miset format, for analysis by mifit and other utilities. You should use the dataset first.
The operations performed by mijoin7 and misplit7 are reciprocal.
Options
clear is not optional and confirms that you are willing to replace the data in memory.
impid(varname) sets the name of the variable identifying the imputations to varname (default is _j). mijoin7 creates varname whereas misplit7 expects it to exist already.
m(#) sets the number of imputed datasets to be #.
Remarks
After mijoin7 has been executed, the data are ready for immediate use by micombine7. However, to save the data permanently you would need to issue a save command.
After misplit7 has been executed, the data are ready for immediate use by Carlin's routines. However, to save the data permanently you would need to issue a misave command followed by miset on the next use.
Examples
. mvis y x1 x2 x3 using imp, m(3) . use imp, clear . misplit7, clear . mifit regress y x1 x2 x3
. miset using imp, clear mimps(5) . mijoin7, clear . micombine7 regress y x1 x2 x3
. mijoin7 imp, clear m(5) . save imp_mvis . micombine7 regress y x1 x2 x3
Author
Patrick Royston, MRC Clinical Trials Unit, London. patrick.royston@ctu.mrc.ac.uk
References
Carlin, J. B., N. Li, P. Greenwood, and C. Coffey. 2003. Tools for analyzing multiple imputed datasets. The Stata Journal 3 (3): 226-244.
Also see