Skip to content
/ grqreg Public

GRQREG: Stata module to graph the coefficients of a quantile regression

License

Notifications You must be signed in to change notification settings

jpazvd/grqreg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRQREG: Stata module to graph the coefficients of a Quantile Regression

Description

grqreg graphs the coefficients of a quantile regression (Koenker and Basset, 1978). It also has the option to graph the confidence interval, the OLS coefficient and the OLS confidence interval on the same graph.

grqreg rewards the use of variable labels. The variable labels are used in the graphs, providing more intelligible variable descriptions than 8-letter names. If no variable label is available grqreg uses the variable names.

grqreg works after qreg, bsqreg and sqreg.

grqreg is an rclass program.

Standard Errors

grqreg uses the standard errors generated by the qreg, bsqreg and sqreg commands.

grqreg estimates the variance-covariance matrix of coefficients using a method of Kroenker and Basset (1982) and Rogers (1993). This is described in Methods and Formulas from the Stata Manual.

sqreg obtains an estiamte of the variance-covariance matrix via bootstraping and the variance-covariance matrix includes between quantile blocks.

bsqreg obtains an estiamte of the variance-covariance matrix via bootstraping with one quantile.

Please notice that: -bsqreg- and -sqreg- have different standard errors (same initial seed and quantile) because the two commands use different methods to generate bootstrap sample.

Both commands calculate the bootstrap standard errors manually instead of using the official -bootstrap- prefix command. The -bsqreg- command uses -bsample- to take each of the bootstrap samples. You can type help bsample for details on this command. On the other hand, -sqreg- uses the undocumented -bsampl_w- command. You can type viewsource bsampl_w.ado to see the code and more information on this command. Here, you will see that this is logically equivalent to -bsample-, but because they use different algorithms, they will not create the same bootstrap sample when used with the same seed.

Remarks

For extreme quantiles it is not recomended to push tau (qstep) into the tails (qmin and qmax) too far especially when there are a large number of parameters being estimated.

The crucial element is the existence of enough observations above and below to make it plausible that the fit isn't just an artifact of a few extreme observations.

The asymptotics rely on there being enough observations on both sides in order to get a conditional central limit theorem (CLT) effect from the gradient. A rough rule of thumb would be that min{n tau , n(1-tau)} should be 10p where p is the number of parameters being estimated. So if you have p = 5, n=5000 then tau shouldn't be smaller than .01.

For more details on this remark please refer to Koenker and Eboil (2001) and Chernozhuko (2000).

References

Chernozhukov, V. (2000) Conditional Extremes and Near-Extremes. MIT Dept. of Economics Working Paper No. 01-21. http://ssrn.com/abstract=272836

Koenker, R. and G. Basset (1978) "Regression Quantiles." Econometrica, 46(1): 33-50.

Koenker, R. and G. Basset (1982) "Robust test for heteroscedasticity based on regression quantiles." Econometrica, 50(1): 43-61.

Koenker, R. and K. F. Hallock (2001) "Quantile Regression." Journal of Economic Perspectives, 15(4): 143-156.

Koenker, R. and Geling, O. (2001) Reappraising medfly longevity: a quantile regression survival analysis. Journal of the American Statistical Association , 96: 458-468.

Rogers, W. H. (1993) "Calculation of quantile regression standard errors." Stata Technical Bulltin, 3: 77-78.

Suggested Citation

Joao Pedro Azevedo, 2004. "GRQREG: Stata module to graph the coefficients of a quantile regression," Statistical Software Components S437001, Boston College Department of Economics, revised 17 Mar 2011.

Handle: RePEc:boc:bocode:s437001

Keywords

quantile regression; graphs;

Note:

This module may be installed from within Stata by typing "ssc install grqreg". Windows users should not attempt to download these files with a web browser.

Author:

João Pedro Azevedo
jazevedo@worldbank.org
World Bank
personal page

About

GRQREG: Stata module to graph the coefficients of a quantile regression

Resources

License

Stars

Watchers

Forks

Packages

No packages published