Hello

I have a panel data of all NYSE, AMEX and NASDAQ firms. I am trying to create size deciles based on total assets but only want to use the NYSE firms to set up the cutpoints.

How do I create size deciles by year (for all firms), but just based on the NYSE (i have the stock exchange code) cutpoints.

I used egen sizedecile = xtile(size), by (year) nq (10)

The problem is that it uses all firms to create the cutoff points.

Thank you!