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)
Weighted Sum of Regression CoefficientsHi, I have conducted 6 different regressions. The resulting coefficients for the variables Pre4, Pr…
Correlation matrix with dummy variablesDear statalisters, I aim to test my data for multicollinearity, first using a correlation matrix. H…
Variances and Covariances in the panel dataHi everyone, I just started using STATA and I am wondering how can I compute covariances and varianc…
Remove variable labels from all variable at onceHow to remove variable labels from all variable at once? Or duplicate variable names to variable lab…
OT: Analyzing ordinal data with metric modelsRonán Conroy alerted me to this article in another discussion forum. Some members of this group may …
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