29.07.2014 Views

qreg - Stata

qreg - Stata

qreg - Stata

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>qreg</strong> — Quantile regression 15<br />

By default, bs<strong>qreg</strong>, s<strong>qreg</strong>, and i<strong>qreg</strong> use 20 replications. We can control the number of<br />

replications by specifying the reps() option:<br />

. bs<strong>qreg</strong> price weight length i.foreign, reps(1000)<br />

(fitting base model)<br />

Bootstrap replications (1000)<br />

1 2 3 4 5<br />

.................................................. 50<br />

.................................................. 100<br />

.................................................. 150<br />

.................................................. 200<br />

.................................................. 250<br />

.................................................. 300<br />

.................................................. 350<br />

.................................................. 400<br />

.................................................. 450<br />

.................................................. 500<br />

.................................................. 550<br />

.................................................. 600<br />

.................................................. 650<br />

.................................................. 700<br />

.................................................. 750<br />

.................................................. 800<br />

.................................................. 850<br />

.................................................. 900<br />

.................................................. 950<br />

.................................................. 1000<br />

Median regression, bootstrap(1000) SEs Number of obs = 74<br />

Raw sum of deviations 142205 (about 4934)<br />

Min sum of deviations 108822.6 Pseudo R2 = 0.2347<br />

price Coef. Std. Err. t P>|t| [95% Conf. Interval]<br />

weight 3.933588 2.659349 1.48 0.144 -1.370316 9.237492<br />

length -41.25191 69.29744 -0.60 0.554 -179.4613 96.95748<br />

foreign<br />

Foreign 3377.771 1096.197 3.08 0.003 1191.474 5564.068<br />

_cons 344.6489 5916.939 0.06 0.954 -11456.31 12145.61<br />

A comparison of the standard errors is informative.<br />

<strong>qreg</strong> bs<strong>qreg</strong> bs<strong>qreg</strong><br />

Variable <strong>qreg</strong> vce(robust) reps(20) reps(1000)<br />

weight 1.329 1.694 3.124 2.660<br />

length 45.46 51.74 83.71 69.30<br />

1.foreign 885.4 728.5 1057. 1095.<br />

cons 5182. 5096. 7053. 5917.<br />

The results shown above are typical for models with heteroskedastic errors. (Our dependent variable<br />

is price; if our model had been in terms of ln(price), the standard errors estimated by <strong>qreg</strong> and<br />

bs<strong>qreg</strong> would have been nearly identical.) Also, even for heteroskedastic errors, 20 replications is<br />

generally sufficient for hypothesis tests against 0.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!