Bookmark and Share

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: a dataset appears to be stuck in memory


From   [email protected] (Wesley D. Eddings, StataCorp)
To   [email protected]
Subject   Re: st: a dataset appears to be stuck in memory
Date   Wed, 28 Dec 2011 16:09:49 -0600

Mosi Ifatunji ([email protected]) used -mi ice- to create imputations in
Stata 12.  To use the created -mi- data in SAS, Mosi converted it to the
-flongsep- style and re-saved the original dataset and each imputed dataset in
the old Stata format using -saveold-:

> In order to save the new datasets in the old Stata file format, after imputing
> 20 datasets, I ran the following series of commands:
>
>       . mi convert flongsep selectivity_mi, replace
>	. saveold selectivity_mi, replace
>	. use _1_selectivity_mi, clear
>	. saveold _1_selectivity_mi, replace 				
>
(snip)
>
>       . use _20_selectivity_mi, clear
>	. saveold _20_selectivity_mi, replace 

He then wanted to convert data back to the -flong- style but received an
error:

>       . use selectivity_mi, clear (which works fine)
>       . mi convert flong
> no; you have _1_selectivity_mi.dta in memory
>   you need to use selectivity_mi first
> r(198);


We have not been able to reproduce the error and have asked Mosi off the list
to send us the data and do-file.  Mosi could not send us the data but was able
to work around the problem by redoing the multiple imputation.

Most likely the observed data were accidentally overwritten with the data from
the first imputation.  To prevent such an overwrite, we recommend making a
copy of the imputed data before modifying it.  To create a copy of the
-flongsep- data, you can use the -mi copy- command.


--Wes
[email protected]
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index