Splendid! My bad, at least I should have seen that } was to be below the post handle line and above the postclose handle. I did just that and got the plot.
Thank you very much for your time, energy and assistance.
Cobby.
Code:
capture postutil clear tempfile results postfile handle int percentile float bx5 lb ub using `results' forvalues i = 5 (5) 95 { qreg2 y x1 x2 x3 x4 x5 x6 x7 y2 - y5 if wanted1==5, cluster(unit) wlsiter(60) q(`=`i'/100') matrix M = r(table) post handle (`i') (M[1, 5]) (M[5,5]) (M[6,5]) } postclose handle xtreg y x1 x2 x3 x4 x5 x6 x7 y2 - y5 if wanted1==5, cluster(unit) re local x5 = _b[x5] matrix M = r(table) local lb = M[5,5] local ub = M[6,5] use `results', clear label var bx5 "x5 coefficient" label var lb "lower limits" label var ub "upper limits" graph twoway connect bx5 lb ub percentile, sort /// yline(`x5' `lb' `ub')
Cobby.
Comment