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

st: RE: Did Stata eat my variable?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Did Stata eat my variable?
Date   Tue, 1 Jun 2004 11:58:22 +0100

This looks to me like a fairly low-level problem. The message 
Sarah received doesn't come from -destring- as such but (I guess) 
from a -generate- call within that which hit this memory problem. 

However, all will be agreed that this should not happen. Perhaps 
Sarah can liaise with Stata tech-support so that they can try to 
re-create the problem. 

Nick 
[email protected] 

Sarah A. Mustillo
 
> 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...

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