Hi experts!
I have a four-year repeated cross-sectional data set. I want to divide my observations (within each year) into 400 equal-sized groups according to their income ranks. In addition, whenever there are ties, I want to assign ranks according to the value of another given variable.
I only know that we can do the following:
xtile newvar = income, n(400)
But xtile does not seem to allow me to introduce an additional variable to assign ranks when there are ties. Is there any simple method or user-written command? Thank you!
Related Posts with Divide data into groups according to percentile rank AND another given variable (if tie exists)
mtefe with interactive fixed effectsHello everyone! First time poster, long time lurker here I'm working on a project that requires obt…
Polygons hidden behind others when creating choropleth map using spmapHi everyone - this is my first ever post on this forum. I've been having a problem using the spmap …
How to download API data from the Bureau of Labor Statistics?Hi, I would like to download API data from the Bureau of Labor Statistics. Unfortunately and surpri…
Importing a matrix into stata file: Col numbersDear Statalisters I have a matrix with column names equal numbers, when I run svmat matrix, and Stat…
Converting from long to wide formatDear all, I'm trying to convert from long to wide format: Code: reshape wide _proc_code _proc_eye…
Subscribe to:
Post Comments (Atom)
0 Response to Divide data into groups according to percentile rank AND another given variable (if tie exists)
Post a Comment