Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: xt data, D and L operators and sort


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: xt data, D and L operators and sort
Date   Mon, 5 Apr 2010 08:53:37 -0700

Have you consider preserve and restore before and after unsorting?  

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Neal Beck
Sent: Monday, April 05, 2010 8:15 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: xt data, D and L operators and sort

I seem to be unsorting (from the natural xt sort order) my panel data quite frequently. So then stata complains about the data being unsorted when I use lag and difference operators. Yup, I can remember to say xtset before issueing a command using D. or L. if I think I might have resorted the data (one never quite knows). But is there no equivalent for xt  
bys var: which got rid of the annoying need to issue a sort command before by:. Obviously my first pref by far would be to have stata always sort my data when it sees D. or L. with xt data. Am I mssing something obvious here?

TIA
Neal


Neal Beck
On leave AY 2009 at the Instituto Juan March, Madrid Spain




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

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