Dear Statalisters,
I want to set the top and bottom 1% of the sample to r(p1) r(p99) respectively - winsorize the data.
I did
sum x, d
replace x = r(p1) if x< r(p1)
replace x = r(p99) if x>r(p99)
in stata13, the first replace works, but the second gives me zero observations,
I assume I can't use two replace consecutively.
please let me know if that is the case.
Best,
Rochelle
I want to set the top and bottom 1% of the sample to r(p1) r(p99) respectively - winsorize the data.
I did
sum x, d
replace x = r(p1) if x< r(p1)
replace x = r(p99) if x>r(p99)
in stata13, the first replace works, but the second gives me zero observations,
I assume I can't use two replace consecutively.
please let me know if that is the case.
Best,
Rochelle
Comment