Yasmine Kent wrote:
> I have a panel data set of companies, with my time
> variable "date" over many quarters, and my id variable
> "co". I would like to categorise my data according to
> size (my size variable is "TA"), into quintiles, BY
> QUARTER. I want to get a single new variable, call it
> quintile, that takes on values from 1-5 depending on
> which quintile of size the company falls into in that
> particular quarter. [...]
[...]
Assuming your -quarter- variable takes on as many values as there are
quarters in your dataset, then
. bysort quarter (ta): g quintile=group(5)
should do it.
CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.
*
* 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/