postfile poisrange dist rep mu min max using poisrange.dta, replace forvalues i=1/5000{ clear quietly set obs 20 gen y1 = rpoisson(8.5) quietly summ y1 post poisrange (1) (`i') (r(mean)) (r(min)) (r(max)) gen y2 = rpoisson(10.5) quietly summ y2 post poisrange (2) (`i') (r(mean)) (r(min)) (r(max)) } postclose poisrange use poisrange.dta, clear summarize mu-max if dist ==1 summarize mu-max if dist ==2