Hello stata-users,
I have come across code for trimming data globally but not what I am specifically looking for. I have two variables - age and a score. I want to remove the 1st and 99th percentile of the score within each age group. For instance, I'd like to remove the 1st and 99th percentile of the score for everyone that is 18 years old. Then I'd do the same for 19 years old in the dataset, and so on until 110 yo.
I have thought of creating age categories individually and then trimming but that is a lot of manual work (n=thousands). Are there any shortcuts in stata that I am unaware of?
Thank you.
Related Posts with Trimming percentiles within each age category
Regressions: ommisions due to collinearityDear statalist users, I am running a regression in which I have 2 fixed effects: year and 2-digit S…
Recommendations for descriptive analysis?Hello, I am a STATA-beginner and looking for recommendations for good tutorials or codes on descrip…
Investor turnoverHi all, First of all, thank you for help in advance. I'm trying to calculate the churn rate (CR) and…
Compute a composite measure of several variablesHi, I have a panel data. I want to perform principal component analysis over the three continuous va…
Matrix row calculationsHey everybody, once again im asking for your help! Could you please tell me how to multiply the elem…
Subscribe to:
Post Comments (Atom)
0 Response to Trimming percentiles within each age category
Post a Comment