.- help for ^iqreg^ (STB-38: sg70) .- Interquantile regression ------------------------ ^iqreg^ [depvar [varlist] [^if^ exp] [^in^ range] ] [^, q^uantiles^(^# #^) r^eps^(^#^) nolo^g ^l^evel^(^#^)^ ] This command shares the features of all estimation commands, see help @est@. To reset problem-size limits, see help @matsize@. Due to how ^iqreg^ is implemented, no more than 336 independent variables may be specified regardless of the value of ^matsize^. Description ----------- ^iqreg^ estimates interquantile range regressions, regressions of the difference in quantiles. Options ------- ^quantiles(^# #^)^ specifies the two quantiles to be compared. Not specifying this option is equivalent to specifying ^quantiles(.25 .75)^, meaning the interquartile range. Specifying, for instance, ^quantiles(.1 .9)^ would estimate a model of the difference in the .9 and .1 quantiles. If this option is specified, the first number must be less than the second. Strictly speaking, both numbers should be between 0 and 1, exclusive. However, if you specify a number larger than 1, it will be iterpreted as a percent. Thus, ^quantiles(.25 .75)^ could also be specified as ^quantiles(25 75)^ if you wish. You may optionally place a comma between the two numbers. The default could be specified ^quantiles(.25,.75)^ or ^quantiles(25,75)^. ^reps(^#^)^ specifies the number of bootstrap replications to be used to obtain an estimate of the variance-covariance matrix of the estimators (standard errors). ^reps(20)^ is the default. This default is arguably too small. ^reps(100)^ would perform 100 bootstrap replications. ^reps(1000)^ would perform 1,000. ^nolog^ specifies itermediate output during the estimation process is not to be presented. If ^nolog^ is not specified, a period is placed on the screen after the completion of each replication (so if ^reps(100)^ is specified, 100 periods appear before final results are presented). ^nolog^ suppresses this. ^level(^#^)^ specifies the confidence level in percent for the confidence interval of the coefficients; see help @level@. Remarks ------- If you are not familiar with quantile regression, please see help @qreg@. Consider a quantile-regression model where the q-th quantile is given by Q_q(y) = a_q + b1_q*var1 + b2_q*var2 For instance, the 75th and 25th quantiles are given by Q_75(y) = a_75 + b1_75*var1 + b2_75*var2 Q_25(y) = a_25 + b1_25*var1 + b2_25*var2 The difference in the quantiles is then Q_75(y)-Q25(y) = (a_75-a_25) + (b1_75-b1_25)*var1 + (b2_75-b2_25)*var2 ^qreg^ estimates models such as Q75(y) and Q25(y). ^iqreg^ estimates models such as Q75(y)-Q25(y). The relationship of the coefficients estimated by ^qreg^ and ^iqreg^ are exactly as shown: ^iqreg^ reports coefficients that are the difference in coefficients of two ^qreg^ models. The value of ^iqreg^ is that it also reports the standard errors and, in fact, estimates the entire variance-covariance matrix of the estimators. This it does by bootstrapping. Example ------- Say you are interested in a model of ln_wage on edyrs, exp, and exp_sq estimated on CPS data. You estimate . ^qreg ln_wage edyrs exp exp_sq, quantile(.90)^ and obtain a coefficient on edyrs of .11261. You estimate . ^qreg ln_wage edyrs exp exp_sq, quantile(.10)^ and obtain a coefficient on edyrs of .16218. Thus, it appears that the effect of schooling is more pronounced at the 1st as compared to the 9th decile of earnings. ^iqreg^ lets you make statements of that sort more precise. If you estimated . ^iqreg ln_wage edyrs exp esp_sq, quantile(.10 .90)^ you would obtain a coefficient on edyrs of .11261 - .16218 = -.04957 and you would obtain a standard error, providing a confidence interval for the difference and allowing you to determine the statistical significance of the difference in schooling effects. The standard errors are obtained by bootstrapping. In this case, when no ^reps()^ option was specified, 20 samples are drawn and two quantile regressions were estimated on each sample. Twenty is a small number of bootstrap replications; the default was chosen so that ^iqreg^ would produce some kind of result in a reasonable amount of time. If you wanted 100 bootstrap replications, you would type . ^iqreg ln_wage edyrs exp esp_sq, quantile(.10 .90) reps(100)^ The number of replications does not affect estimated coefficients; it does affect reported standard errors. ^iqreg^'s results are determined by the random number seed; see help @seed@. If you set the random number seed, estimate a model with some number of replications, reset the seed to be the same number again and repeat the estimation with the same number of replications, you will obtain the same results in the second run as the first. Examples -------- . ^iqreg mpg foreign^ . ^iqreg ln_wage edyrs exp exp_sq, reps(100)^ . ^iqreg ln_wage edyrs exp exp_sq, reps(100) quantiles(10 90)^ Author ------ William Gould StataCorp email: tech-support@@stata.com Also see -------- STB: sg70 (STB-38) On-line: help for @qreg@, @sqreg@, @est@, @matsize@