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]

st: a dataset appears to be stuck in memory


From   Mosi Ifatunji <[email protected]>
To   [email protected]
Subject   st: a dataset appears to be stuck in memory
Date   Tue, 27 Dec 2011 13:16:25 -0500

All,

So it appears that I have a dataset that is stuck in my Stata memory. After generating multiple datasets with the - mi ice - command I wanted to convert the file format to 'flong' using, - mi convert flong -. I have used this conversion plenty of times before but it appears not to work this time.

The conversation stopped working after I converted all my multiply imputed datasets to an older version of Stata so that I could import them into SAS (SAS does not support Stata 12 datasets yet). The name of the aggregated multiply imputed dataset is 'selectivity_mi.dta.' 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 															
	use _2_selectivity_mi, clear
	saveold _2_selectivity_mi, replace 
	use _3_selectivity_mi, clear
	saveold _3_selectivity_mi, replace 
	use _4_selectivity_mi, clear
	saveold _4_selectivity_mi, replace 
	use _5_selectivity_mi, clear
	saveold _5_selectivity_mi, replace 
	use _6_selectivity_mi, clear
	saveold _6_selectivity_mi, replace 
	use _7_selectivity_mi, clear
	saveold _7_selectivity_mi, replace 
	use _8_selectivity_mi, clear
	saveold _8_selectivity_mi, replace 
	use _9_selectivity_mi, clear
	saveold _9_selectivity_mi, replace 
	use _10_selectivity_mi, clear
	saveold _10_selectivity_mi, replace 
	use _11_selectivity_mi, clear
	saveold _11_selectivity_mi, replace 
	use _12_selectivity_mi, clear
	saveold _12_selectivity_mi, replace 
	use _13_selectivity_mi, clear
	saveold _13_selectivity_mi, replace 
	use _14_selectivity_mi, clear
	saveold _14_selectivity_mi, replace 
	use _15_selectivity_mi, clear
	saveold _15_selectivity_mi, replace 
	use _16_selectivity_mi, clear
	saveold _16_selectivity_mi, replace 
	use _17_selectivity_mi, clear
	saveold _17_selectivity_mi, replace 
	use _18_selectivity_mi, clear
	saveold _18_selectivity_mi, replace 
	use _19_selectivity_mi, clear
	saveold _19_selectivity_mi, replace 
	use _20_selectivity_mi, clear
	saveold _20_selectivity_mi, replace 

Then I needed to convert the dataset to 'flong' format in order to do some analyses in Stata. So I typed:

use selectivity_mi, clear (which works fine)

Then to convert the file to 'flong' format I typed:

mi convert flong

I get the following error message:

no; you have _1_selectivity_mi.dta in memory
   you need to use selectivity_mi first

r(198);

In addition to doing what I was asked to do in the error command (i.e., - use selectivity_mi.dta -), I have already tried the following to clear the dataset (_1_selectivity_mi) from my Stata memory:

1. - clear -
2. - clear all -
3. - exit, clear - (the dataset is still stuck in memory after I reboot Stata)
4. - erase _1_ selectivity_mi.dta -

None have worked. Any and all suggestions are welcome :-)

All my best,

M
*
*   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