Estimating Quantile Regression in EViews

To estimate a quantile regression specification in EViews you may select Object/New Object.../Equation or Quick/Estimate Equation… from the main menu, or simply type the keyword equation in the command window. From the main estimation dialog you should select QREG - Quantile Regression (including LAD). Alternately, you may type qreg in the command window.

EViews will open the quantile regression form of the Equation Estimation dialog.

Specification

The dialog has two pages. The first page, depicted here, is used to specify the variables in the conditional quantile function, the quantile to estimate, and the sample of observations to use.

You may enter the Equation specification using a list of the dependent and regressor variables, as depicted here, or you may enter an explicit expression. Note that if you enter an explicit expression it must be linear in the coefficients.

The Quantile to estimate edit field is where you will enter your desired quantile. By default, EViews estimates the median regression as depicted here, but you may enter any value between 0 and 1 (though values very close to 0 and 1 may cause estimation difficulties).

Here we specify a conditional median function for Y that depends on a constant term and the series X. EViews will estimate the LAD estimator for the entire sample of 235 observations.

Estimation Options

Most of the quantile regression settings are set using this page. The options on the left-hand side of the page control the method for computing the coefficient covariances, allow you to specify a weight series for weighted estimation, and specify the method for computing scalar sparsity estimates.

Quantile Regression Options

The dropdown menu labeled Coefficient Covariance is where you will choose your method of computing covariances: computing Ordinary (IID) covariances, using a Huber Sandwich method, or using Bootstrap resampling. By default, EViews uses the Huber Sandwich calculations which are valid under independent but non-identical sampling.

Just below the dropdown menu is an section Weight, where you may define observations weights. The data will be transformed prior to estimation using this specification. (See
“Weighted Least Squares” for a discussion of the settings).

The remaining settings in this section control the estimation of the scalar sparsity value. Different options are available for different Coefficient Covariance settings. For ordinary or bootstrap covariances you may choose either Siddiqui (mean fitted), Kernel (residual), or Siddiqui (residual) as your sparsity estimation method, while if the covariance method is set to Huber Sandwich, only the Siddiqui (mean fitted) and Kernel (residual) methods are available.

There are additional options for the bandwidth method (and associated size parameter if relevant), the method for computing empirical quantiles (used to estimate the sparsity or the kernel bandwidth), and the choice of kernel function. Most of these settings should be self-explanatory; if necessary, see the discussion in
“Sparsity Estimation” for details.

It is worth mentioning that the sparsity estimation options are always relevant, since EViews always computes and reports a scalar sparsity estimate, even if it is not used in computing the covariance matrix. In particular, a sparsity value is estimated even when you compute the asymptotic covariance using a Huber Sandwich method. The sparsity estimate will be used in non-robust quasi-likelihood ratio tests statistics as necessary.

Iteration Control

The iteration control section offers the standard edit field for changing the maximum number of iterations, a dropdown menu for specifying starting values, and a check box for displaying the estimation settings in the output. Note that the default starting value for quantile regression is 0, but you may choose a fraction of the OLS estimates, or provide a set of user specified values.

Bootstrap Settings

When you select Bootstrap in the Coefficient Covariance dropdown, the right side of the dialog changes to offer a set of bootstrap options.

You may use the Method dropdown menu to choose from one of four bootstrap methods: Residual, XY-pair, MCMB, MCMB-A. See
“Bootstrapping” for a discussion of the various methods. The default method is XY-pair.

Just below the dropdown menu are two edit fields labeled Replications and No. of obs. By default, EViews will perform 100 bootstrap replications, but you may override this by entering your desired value. The No. of obs. edit field controls the size of the bootstrap sample. If the edit field is left blank, EViews will draw samples of the same size as the original data. There is some evidence that specifying a bootstrap sample size smaller than the original data may produce more accurate results, especially for very large sample sizes; Koenker (2005, p. 108) provides a brief summary.

To save the results of your bootstrap replications in a matrix object, enter the name in the Output edit field.

The last two items control the generation of random numbers. The Random generator dropdown should be self-explanatory. Simply use the dropdown to choose your desired generator. EViews will initialize the dropdown using the default settings for the choice of generator.

By default, the first time that you perform a bootstrap for a given equation, the Seed edit field will be blank; you may provide your own integer value, if desired. If an initial seed is not provided, EViews will randomly select a seed value. The value of this initial seed will be saved with the equation so that by default, subsequent estimation will employ the same seed, allowing you to replicate results when re-estimating the equation, and when performing tests. If you wish to use a different seed, simply enter a value in the Seed edit field or press the Clear button to have EViews draw a new random seed value.

Estimation Output

Once you have provided your quantile regression specification and specified your options, you may click on OK to estimate your equation. Unless you are performing bootstrapping with a very large number of observations, the estimation results should be displayed shortly.

Our example uses the Engel dataset containing food expenditure and household income considered by Koenker (2005, p. 78-79, 297-307). The default model estimates the median of food expenditure Y as a function of a constant term and household income X.

The top portion of the output displays the estimation settings. Here we see that our estimates use the Huber sandwich method for computing the covariance matrix, with individual sparsity estimates obtained using kernel methods. The bandwidth uses the Hall and Sheather formula, yielding a value of 0.15744.

Below the header information are the coefficients, along with standard errors, t-statistics and associated p-values. We see that both coefficients are statistically significantly different from zero and conventional levels.

The bottom portion of the output reports the Koenker and Machado (1999) goodness-of-fit measure (pseudo R-squared), and adjusted version of the statistic, as well as the scalar estimate of the sparsity using the kernel method. Note that this scalar estimate is not used in the computation of the standard errors in this case since we are employing the Huber sandwich method.

Also reported are the minimized value of the objective function (“Objective”), the minimized constant-only version of the objective (“Restr. objective”), the constant-only coefficient estimate (“Quantile dependent var”), and the corresponding form of the Quasi-LR statistic and associated probability for the difference between the two specifications (Koenker and Machado, 1999). Note that despite the fact that the coefficient covariances are computed using the robust Huber Sandwich, the QLR statistic assumes i.i.d. errors and uses the estimated value of the sparsity.

The reported S.E. of the regression is based on the usual d.f. adjusted sample variance of the residuals. This measure of scale is used in forming standardized residuals and forecast standard errors. It is replaced by the Koenker and Machado (1999) scale estimator in the computation of the form of the QLR statistics (see
“Standard Views and Procedures” and
“Quasi-Likelihood Ratio Tests”).

We may elect instead to perform bootstrapping to obtain the covariance matrix. Click on the Estimate button to bring up the dialog, then on Estimation Options to show the options tab. Select Bootstrap as the Coefficient Covariance, then choose MCMB-A as the bootstrap method. Next, we increase the number of replications to 500. Lastly, to see the effect of using a different estimator of the sparsity, we change the scalar sparsity estimation method to Siddiqui (mean fitted). Click on OK to estimate the specification.

For the most part the results are quite similar. The header information shows the different method of computing coefficient covariances and sparsity estimates. The Huber Sandwich and bootstrap standard errors are reasonably close (24.03 versus 22.02, and 0.031 versus 0.024). There are moderate differences between the two sparsity estimates, with the Siddiqui estimator of the sparsity roughly 25% higher (267.83 versus 209.35), but this difference has no substantive impact on the probability of the QLR statistic.