Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Did Stata eat my variable?


From   "Sarah A. Mustillo" <[email protected]>
To   [email protected]
Subject   st: Did Stata eat my variable?
Date   Fri, 28 May 2004 10:52:42 -0400

Hi -

I am doing some simple recoding and data cleaning on a relatively large data set. I tried to destring a variable, and got the error message that there was no more room. I saved the data, cleared, set my memory higher, and reopened the data. Then I tried to pick up where I left off with destringing, and got an error message that the variable is not found! What happened to my variable?

Here's the output:


. tab pared

pared | Freq. Percent Cum.
------------+-----------------------------------
* | 491 0.06 0.06
0 | 2 0.00 0.06
1 | 74,586 8.97 9.03
2 | 299,438 36.02 45.06
3 | 79,040 9.51 54.57
4 | 72,972 8.78 63.34
5 | 62,650 7.54 70.88
6 | 182,731 21.98 92.86
7 | 59,309 7.14 100.00
------------+-----------------------------------
Total | 831,219 100.00

. replace pared="" if pared=="*"
(491 real changes made)

. destring pared, replace
no room to add more variables due to width
An attempt was made to add a variable that would have increased the memory
required to store an observation beyond what is currently possible. You have the
following alternatives:

1. Store existing variables more efficiently; see help compress.

2. Drop some variables or observations; see help drop. (Think of Stata's data
area as the area of a rectangle; Stata can trade off width and length.)

3. Increase the amount of memory allocated to the data area using the set
memory command; see help memory.
r(902);

. save, replace
file msbl03.dta saved

. clear

. set mem 500m

Current memory allocation

current memory usage
settable value description (1M = 1024k)
--------------------------------------------------------------------
set maxvar 5000 max. variables allowed 1.733M
set memory 500M max. data space 500.000M
set matsize 400 max. RHS vars in models 1.254M
-----------
502.987M

. use msbl03

. destring pared, replace
variable pared not found
r(111);


I know, I know - never do data management interactively...

Thanks!

Sarah



--
Sarah A. Mustillo, Ph.D
Department of Psychiatry and Behavioral Sciences
Duke University School of Medicine
Box 3454
Durham NC 27710

919 687-4686 x231
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index