The QUANTREG Procedure

Example 97.2 Quantile Regression for Econometric Growth Data

(View the complete code for this example.)

This example uses a SAS data set named Growth, which contains economic growth rates for countries during two time periods: 1965–1975 and 1975–1985. The data come from a study by Barro and Lee (1994) and have also been analyzed by Koenker and Machado (1999).

There are 161 observations and 15 variables in the data set. The variables, which are listed in the following table, include the national growth rates (GDP) for the two periods, 13 covariates, and a name variable (Country) for identifying the countries in one of the two periods.

Variable

 

Description

Country

 

Country’s name and period

GDP

 

Annual change per capita in gross domestic product (GDP)

lgdp2

 

Initial per capita GDP

mse2

 

Male secondary education

fse2

 

Female secondary education

fhe2

 

Female higher education

mhe2

 

Male higher education

lexp2

 

Life expectancy

lintr2

 

Human capital

gedy2

 

EducationGDP

Iy2

 

InvestmentGDP

gcony2

 

Public consumptionGDP

lblakp2

 

Black market premium

pol2

 

Political instability

ttrad2

 

Growth rate terms trade

The goal is to study the effect of the covariates on GDP. The following statements request median regression for a preliminary exploration. They produce the results that are in Output 97.2.1 through Output 97.2.6.

data growth;
   length Country$ 22;
   input Country GDP lgdp2 mse2 fse2 fhe2 mhe2 lexp2 lintr2 gedy2
         Iy2 gcony2 lblakp2 pol2 ttrad2 @@;
   datalines;
Algeria75              .0415 7.330 .1320 .0670 .0050 .0220 3.880 .1138 .0382
                       .1898 .0601 .3823 .0833 .1001
Algeria85              .0244 7.745 .2760 .0740 .0070 .0370 3.978 -.107 .0437
                       .3057 .0850 .9386 .0000 .0657
Argentina75            .0187 8.220 .7850 .6200 .0740 .1660 4.181 .4060 .0221
                       .1505 .0596 .1924 .3575 -.011
Argentina85            -.014 8.407 .9360 .9020 .1320 .2030 4.211 .1914 .0243
                       .1467 .0314 .3085 .7010 -.052
Australia75            .0259 9.101 2.541 2.353 .0880 .2070 4.263 6.937 .0348
                       .3272 .0257 .0000 .0080 -.016

   ... more lines ...   

Zambia75               .0120 6.989 .3760 .1190 .0130 .0420 3.757 .4388 .0339
                       .3688 .2513 .3945 .0000 -.032
Zambia85               -.046 7.109 .4200 .2740 .0110 .0270 3.854 .8812 .0477
                       .1632 .2637 .6467 .0000 -.033
Zimbabwe75             .0320 6.860 .1450 .0170 .0080 .0450 3.833 .7156 .0337
                       .2276 .0246 .1997 .0000 -.040
Zimbabwe85             -.011 7.180 .2200 .0650 .0060 .0400 3.944 .9296 .0520
                       .1559 .0518 .7862 .7161 -.024
;
ods graphics on;

proc quantreg data=growth ci=resampling
                plots=(rdplot ddplot reshistogram);
   model GDP = lgdp2 mse2 fse2 fhe2 mhe2 lexp2
               lintr2 gedy2 Iy2 gcony2 lblakp2 pol2 ttrad2
               / quantile=.5 diagnostics leverage(cutoff=8) seed=1268;
   id Country;
   test_lgdp2: test lgdp2 / lr wald;
run;

The QUANTREG procedure uses the default simplex algorithm to estimate the parameters and uses the MCMB resampling method to compute confidence limits.

Output 97.2.1 displays model information and summary statistics for the variables in the model. Six summary statistics are computed, including the median and the median absolute deviation (MAD), which are robust measures of univariate location and scale, respectively. For the variable lintr2 (human capital), both the mean and standard deviation are much larger than the corresponding robust measures (median and MAD), indicating that this variable might have outliers.

Output 97.2.1: Model Information and Summary Statistics

The QUANTREG Procedure

Model Information
Data SetWORK.GROWTH
Dependent VariableGDP
Number of Independent Variables13
Number of Observations161
Optimization AlgorithmSimplex
Method for Confidence LimitsResampling

Summary Statistics
VariableQ1MedianQ3MeanStandard
Deviation
MAD
lgdp26.98907.74508.60807.79050.95431.1579
mse20.31600.72301.26750.96660.85740.6835
fse20.12700.42300.98350.71170.83310.5011
fhe20.01100.03500.08900.07920.12160.0400
mhe20.04000.10600.20600.15840.17520.1127
lexp23.86704.06404.24304.04400.20280.2728
lintr20.001600.56041.88051.46252.54911.0058
gedy20.02480.03430.04660.03600.01410.0151
Iy20.13960.19550.26710.20100.08770.0981
gcony20.04800.07670.12760.09140.06170.0566
lblakp200.06960.24070.19160.30700.1032
pol200.05000.24290.16830.24090.0741
ttrad2-0.0240-0.01000.00730-0.005700.03750.0239
GDP0.002900.01960.03510.01910.02480.0237


Output 97.2.2 displays the parameter estimates and 95% confidence limits that are computed with the rank method.

Output 97.2.2: Parameter Estimates

Parameter Estimates
ParameterDFEstimateStandard
Error
95% Confidence Limitst ValuePr > |t|
Intercept1-0.04880.0733-0.19370.0961-0.670.5065
lgdp21-0.02690.0041-0.0350-0.0188-6.58<.0001
mse210.01100.0080-0.00480.02691.380.1710
fse21-0.00110.0088-0.01850.0162-0.130.8960
fhe210.01480.0321-0.04850.07820.460.6441
mhe210.00430.0268-0.04870.05730.160.8735
lexp210.06830.02290.02320.11352.990.0033
lintr21-0.00220.0015-0.00520.0008-1.440.1513
gedy21-0.05080.1654-0.37770.2760-0.310.7589
Iy210.07230.02480.02330.12132.920.0041
gcony21-0.09350.0382-0.1690-0.0181-2.450.0154
lblakp21-0.02690.0084-0.0435-0.0104-3.220.0016
pol21-0.03010.0093-0.0485-0.0117-3.230.0015
ttrad210.16130.07400.01490.30762.180.0310


Diagnostics for the median regression fit, which are requested in the PLOTS= option, are displayed in Output 97.2.3 and Output 97.2.4. Output 97.2.3 plots the standardized residuals from median regression against the robust MCD distance. This display is used to diagnose both vertical outliers and horizontal leverage points. Output 97.2.4 plots the robust MCD distance against the Mahalanobis distance. This display is used to diagnose leverage points.

The cutoff value 8, which is specified in the LEVERAGE option, is close to the maximum of the Mahalanobis distance. Eighteen points are diagnosed as high leverage points, and almost all are countries with high human capital, which is the major contributor to the high leverage as observed from the summary statistics. Four points are diagnosed as outliers by using the default cutoff value of 3. However, these are not extreme outliers.

A histogram of the standardized residuals and two fitted density curves are displayed in Output 97.2.5. This output shows that median regression fits the data well.

Output 97.2.3: Plot of Residual versus Robust Distance

Plot of Residual versus Robust Distance


Output 97.2.4: Plot of Robust Distance versus Mahalanobis Distance

Plot of Robust Distance versus Mahalanobis Distance


Output 97.2.5: Histogram for Residuals

Histogram for Residuals


Tests of significance for the initial per-capita GDP (LGDP2) are shown in Output 97.2.6.

Output 97.2.6: Tests for Regression Coefficient

Test test_lgdp2 Results
TestTest
Statistic
DFChi-SquarePr > ChiSq
Wald43.2684143.27<.0001
Likelihood Ratio36.3047136.30<.0001


The QUANTREG procedure computes entire quantile processes for covariates when you specify QUANTILE=PROCESS in the MODEL statement, as follows:

proc quantreg data=growth ci=resampling;
   model GDP = lgdp2 mse2 fse2 fhe2 mhe2 lexp2 lintr2
               gedy2 Iy2 gcony2 lblakp2 pol2 ttrad2
               / quantile=process plot=quantplot seed=1268;
run;

Confidence limits for quantile processes can be computed by using the sparsity or resampling methods. But they cannot be computed by using the rank method, because the computation would be prohibitively expensive.

A total of 14 quantile process plots are produced. Output 97.2.7 and Output 97.2.8 display two panels of eight selected process plots. The 95% confidence bands are shaded.

Output 97.2.7: Quantile Processes with 95% Confidence Bands

Quantile Processes with 95% Confidence Bands


Output 97.2.8: Quantile Processes with 95% Confidence Bands

Quantile Processes with 95% Confidence Bands


As pointed out by Koenker and Machado (1999), previous studies of the Barro growth data have focused on the effect of the initial per-capita GDP on the growth of this variable (annual change in per-capita GDP). The following statements request a single process plot for this effect:

proc quantreg data=growth ci=resampling;
   model GDP = lgdp2 mse2 fse2 fhe2 mhe2 lexp2 lintr2
               gedy2 Iy2 gcony2 lblakp2 pol2 ttrad2
               / quantile=process plot=quantplot(lgdp2) seed=1268;
run;

The plot is shown in Output 97.2.9.

Output 97.2.9: Quantile Process Plot for LGDP2

Quantile Process Plot for LGDP2


The confidence bands here are computed by using the MCMB resampling method. In contrast, Koenker and Machado (1999) used the rank method to compute confidence limits for a few selected points. Output 97.2.9 suggests that the effect of the initial level of GDP is relatively constant over the entire distribution, with a slightly stronger effect in the upper tail.

The effects of other covariates are quite varied. An interesting covariate is public consumption divided by GDP (gcony2) (first plot in second panel), which has a constant effect over the upper half of the distribution and a larger effect in the lower tail. For an analysis of the effects of the other covariates, see Koenker and Machado (1999).