Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
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/