I have this loop Code:
gen percentile = . foreach i in 10 20 30 40 50 60 70 80 90 { egen p`i' = pctile(revenue), p(`i') replace percentile = `i' if revenue == p`i' } keep if !mi(percentile) |
-
Login or Register
- Log in with
I have this loop Code:
gen percentile = . foreach i in 10 20 30 40 50 60 70 80 90 { egen p`i' = pctile(revenue), p(`i') replace percentile = `i' if revenue == p`i' } keep if !mi(percentile) |