In the most recent version of Stata (17) the behavior of collapse percentiles with iweight may have a bug (or perhaps this is an intentional change; is this documented anywhere?) To illustrate:
In previous versions of stata, the above snippet returns 2 instead of 1.
Code:
. clear . qui set obs 3 . gen iw = -1 . gen x = _n . collapse (median) x [iweight = iw] . disp x 1
Comment