Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: xtile from the start of a period


From   John Hund <[email protected]>
To   [email protected]
Subject   st: xtile from the start of a period
Date   Mon, 25 Feb 2008 17:27:16 -0600

Hey all--

A simple question whose answer I can't find in the very interesting xtile by groups discussion. In this case I have data (market values) on companies (compid) monthly. Ideally I would like to generate a variable containing the decile rank of the company based on their market value at the beginning of a period (i.e. their decile in January 1970) and have that variable contain the decile rank for all monthly observations of the compid for a particular time window (i.e. 1970-1975). That is, there would be a variable that contains the decile rank from Jan70 for all monthly observations of a compid for the next 5 years. I suspect that my question is less about xtile and more about filling in, since it is easy to get the decile rank for the first month...I just can't "fill" it in for the next (in this case) 59 observations of each company.

Thanks for your help,
John

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