Hi All,

I have tried to find this answer in the forum but cant seem to.
I have a set of panel data for 15 countries over 10 years and want to create a dummy based on per capita income levels, per year but split into 3. Hope this makes sense
Usually with cross section i would first create the median income per year (as i want equal observations in each half(75))

egen MEDINCOME=median(income), by (year)

then gen dummy = income>MEDINCOME

However, I would like to have 3 splits instead of just two, eg 50 observations in each to get the equivalent of high income, middle income and lower income.

Is this possible?

Thank you

Safia