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
Coefplot and spatial standard errors fromDear all, I am using x_ols to estimate spatial standard errors of multiple models. Now, I'd like to…
Estimation of pseudo‑panel modelsHello everyone, I have just recently started to learn about pseudo-panel data, and I have some ques…
Additive indexHi dears, I have an issue in creating of an additive index. I have 11 variables that are normalized …
3-Year Rolling Standard Deviations of ReturnsHey Community, for a paper at university I need a three year rolling standard deviation of returns.…
calculating percentages by household idHello, I want to create a variable that shows the % of increase in care by household. Below, you ca…
Subscribe to:
Post Comments (Atom)
0 Response to Trimming percentiles within each age category
Post a Comment