Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Re-using multiple imputation data
From
Mosi Ifatunji <[email protected]>
To
[email protected]
Subject
Re: st: Re-using multiple imputation data
Date
Sat, 7 May 2011 17:00:12 -0400
Daniel,
Problem solved.
Thanks! :-)
Mosi
On May 7, 2011, at 2:17 PM, daniel klein wrote:
"[...] to generate 20 datasets in the wide format"
First of all, there is a difference between -wide- (as used in -xt-,
-reshape- or the like context) and -mi wide- (see -help mi set-, help
mi style-, -help mi convert-).
Second, if you have more than one dataset after imputing missing
values your dateset is not in -wide- format, but -flongsep- format.
That's fine, but if you want -mi wide- format (that is: one dataset)
-mi set- your data -wide-. You may switch between mi formarts easily
with -mi convert-.
However, no matter what -mi style- your data is, there is no need for
a special command to load it. -use- will do the job, thanks to
characteristics (for more start here: -help char-) saved along with
the dataset.
Try the following example
(change to a new directory so it is easy to delete the hole thing
after the example)
/*---example---*/
. clear all
. sysuse auto.dta
. mi set flongsep some_name
. mi register imputed rep78
. mi impute reg rep78 price mpg weight ,add(5)
. save some_name.dta ,replace
. dir
. clear all
. use some_name.dta
. mi est : reg price mpg weight rep78
/*---end---*/
Best
Daniel
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/