I am working with American Community Service (ACS) data for 2016. My variable of interest in annual income (incwage) which is top coded at 99.5th percentile. Following the literature, I am looking to adjust top-coded annual income to 1.5 times of the top code. I am using the following code but it is not working.
I believe the code local top = r(p99.5) does not work as when I replace p99.5 with p99 it works.
Code:
generate topwage = 0 summarize incwage [weight = perwt], detail local top = r(p99.5) replace topwage = 1 if incwage >= `top' generate income = 1.5 * incwage if towage == 1
Comment