Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: RE: RE: RE: reallocating variables within observations


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: RE: RE: reallocating variables within observations
Date   Tue, 18 Nov 2008 16:32:09 -0000

Given the last compliment, I should not complain. However, I have to point out that the use of temporary variables during its operation has no bearing on the main point. -fixsort- changes your data and its help file contains a warning on that score. That is why I mentioned -cquantile- first. 

But, as Martin implies, if Linn were actually to read the help files indicated, she would discover that no merging is required. 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

Look under the hood of -ssc d fixsort- (which seems to do exactly what you
want), and you see that it also uses temps: -tempvar-s and -h clonevar- from
official Stata instead of -tempfile-s. It is an extremely convenient command
in the rare cases where users want what you seem to be asking for... 

Linn Renée Naper

Thanks, I will. 
Right know I'm not sure if I need it, but interesting to look into anyway I
think.
It is probably possible to do this in several steps using merge, new files
etc, 
but that's not how I want to do it if I can do it with a "simple" command.

Nick Cox

Linn's statement is an understatement. This kind of allocation is strong
stuff. See -cquantile- and -fixsort- on SSC for what may be  answers to your question, and always keep copies of the data as they are now. 


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index