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 on April 23, and its replacement, statalist.org is already up and running.


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

st: Place in quartiles based on prior year - panel data


From   Bill McDonald <mcdonald.1@nd.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Place in quartiles based on prior year - panel data
Date   Tue, 27 Mar 2012 16:51:48 -0400

I have a variable, lets say mpg in a panel of data.  I would like to put each observation into a quartile based on quartile cutoffs from the prior year.  I know how to brute force a solution by have not been able to figure out some combination of xtile, egenmore or cutoff that will categorize the variable based on the prior year quartile cutoffs.  Any help would be appreciated.


Bill

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