help qreg2also see: qreg postestimation-------------------------------------------------------------------------------

Title

qreg2-- Quantile regression with robust standard errors

Syntax

qreg2depvar[indepvars] [if] [in] [weight] [,qreg2_options]

optionsDescription -------------------------------------------------------------------------

quantile(#)estimate#quantile; default isquantile(.5)

norobustdisplays results based on the non-robust covariance matrix estimator

mss(varlist)usevarlistin the MSS heteroskedasticity test

nomsssuppresses the computation of the MSS test

wlsiter(#)attempt#weighted least-squares iterations before doing linear programming iterations-------------------------------------------------------------------------

qreg2allowsfweights; see weight. See[R] qreg postestimationfor features available after estimation.

Description

qreg2is a wrapper for[R] qregwhich estimates quantile regression and reports standard errors and t-statistics that are asymptotically valid under heteroskedasticity and misspecification. The robust covariance matrix is computed following Chamberlain (1994), Angrist et al. (2006), and Powell (1984). The non-robust results can also displayed with the optionnorobust. Additionally,qreg2reports the value of the objective function, defined as the average of the check function; the R-squared, defined as the square of the correlation between the fitted values and the dependent variable (note however that in quantile regressions the R-squared is even less meaningful than usual); and the result of the Machado-Santos Silva (2000) test for heteroskedasticity. This test is valid after quantile regression estimation and by default the test variables are the fitted values of the dependent variable and its squares as in the "Special case of the White test"; see Wooldridge (2009, p. 276). Alternative sets of test variables can be specified withmss(varlist)and the computation of the statistic can be suppressed with the optionnomss.

Options

quantile(#)specifies the quantile to be estimated and should be a number between 0 and 1, exclusive. Numbers larger than 1 are interpreted as percentages. The default value of 0.5 corresponds to the median.

norobustdisplay results based on the non-robust covariance matrix estimator.

mss(varlist)specifies the list of variables to be used in the Machado-Santos Silva (2000) heteroskedasticity test. By default, the test is performed using the fitted values of the dependent variable and its squares.

nomsssuppresses the computation of the MSS test.

wlsiter(#)specifies the number of weighted least-squares iterations that will be attempted before the linear programming iterations are started. The default value is 1. If there are convergence problems, increasing this number should help.

Remarks

qreg2was written by J.A.F. Machado and J.M.C. Santos Silva and it is not an official Stata command. For further help and support, please contact jmcss@essex.ac.uk. Please notice that this software is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Examples--------------------------------------------------------------------------- Setup

. sysuse autoMedian regression

. qreg2 price weight length foreignMedian regression with non-robust output

. qreg2 price weight length foreign,norEstimate .25 quantile

. qreg2 price weight length foreign, quantile(.25)Median regression computing the MSS test using the regressors as test variables

. qreg2 price weight length foreign, mss(weight length foreign)Median regression suppressing the MSS test

. qreg2 price weight length foreign, nomss

---------------------------------------------------------------------------

Saved results

qreg2saves the following ine():Scalars

e(N)number of observationse(df_m)model degrees of freedome(df_r)residual degrees of freedome(q)quantile requestede(q_v)value of the quantilee(sum_adev)sum of absolute deviationse(sum_rdev)sum of raw deviationse(obj_func)mean of the check functione(f_r)residual density estimatee(rank)rank of the non-robust covariance matrixe(convcode)0if converged; otherwise, return code for why nonconvergencee(r2)R-squared defined as the square of the correlation between the fitted values and the dependent variablee(mss_chi2)MSS test statistic (if computed)e(mss_df)degrees of freedom of the MSS test (if computed)e(mss_p)p-value of the MSS test (if computed)Macros

e(cmd)qreg2e(cmdline)command as used in the estimatione(depvar)name of dependent variablee(properties)b Ve(predict)program used to implementpredicte(marginsnotok)predictions disallowed bymarginsMatrices

e(b)coefficient vectore(V)variance-covariance matrixFunctions

e(sample)marks estimation sample

ReferencesAngrist, J.; Chernozhukov, V. and Fernández-Val, I. (2006), Quantile Regression under Misspecification, with an Application to the U.S. Wage Structure,

Econometrica, 74, 539-563. Chamberlain, G. (1994), Quantile Regression, Censoring and the Structure of Wages, inAdvances in Econometrics, ed. C. A. Sims, Cambridge University Press, 171-209. Machado, J.A.F. and Santos Silva, J.M.C. (2000), Glejser's Test Revisited,Journal of Econometrics, 97(1), 189-202. Powell, J. L. (1984), Least Absolute Deviation Estimation for the Censored Regression Model,Journal of Econometrics, 25, 303-325. Wooldridge, J.M. (2009),Introductory Econometrics, 4th edition, Mason (OH): South Western.

Also seeManual:

[R] qregHelp:

[R] qreg postestimation;