*! version 2.0 June 2022
help mmqreg

Title

mmqreg -- MM-Quantile regression

Syntax

mmqreg depvar indepvars [if] [in] [aw] [, options]

options

quantile(#[#[# ...]]) estimate # quantile, where 0<#q<100; default is quantile(50). One can simulatenously estimate
any number of quantiles given by the numlist.

absorb(varlist) specifies the variable(s) that will be absorbed in the estimation. Default is to absorb no variables.

denopt(denmethod bwidth) can be used to specify the method for the density and bandwith estimation. see denmethod
and bwidth. The default are bwmethod="hsheather" and denmethod="fitted"

dfadj request using degrees of freedom adjustment equal to k+absc, where k is the number of variables, including constant, in the model , and
absc the number of absorbed coefficients.

nowarning request showing no warning when the scale function predicts negative values.

nols request not to show the location or scale coefficients

request reporting standard errors that are robust to heteroskedasticty, based on the White Huber estimator/sandwidth estimator. The default is to report standard errors under the assumption of correctly specified Scale model

request reporting clustered standard errors. Only accepts one way clustered cvar

indepvars may contain factor variables; see fvvarlist.

mmqreg does allows for aweight.

Description

mmqreg estimates quantile regressions using the method of moments as described in Machado and Santos Silva (2019), and expanding the methodology to allow for multiple fixed effects.

In contrast with xtqreg, mmqreg adds three features to the estimation of this type of models:

1. It allows the estimation of the Location-Scale quantile regressions when there are no fixed effects.

2. Using the command hdfe it allows the estimation of LS quantile regression absorbing multiple fix effects

3. It reports the estimation of various quantiles jointly, which facilitates testing of coefficients across quantiles, using resampling
methods like Bootstrap. (see bootstrap), or based on analytical standard errors.

Also, in contrast with xtqreg, standard errors for quantiles, location, and scale effects, can be
estimated adjusting for the degrees of freedom.

Furthermore, because this is a GMM estimator, -mmqreg- also provides 3 options for standard errors, the default which is the same as -xtqreg-, robust standard errors, and clustered standard errors.

Remarks

As the command stands, mmqreg provides the asymptotic approximations for the correlations of coefficients across quantiles, and also provides two different standard error options. Their properties derive from it being a GMM estimator. However, you may also wish to consider resampling methods.

I want to thank to J.M.C. Santos Silva for claryfing some of the details regarding the estimation methodology.

All errors are my own.

Examples

Setup

webuse nlswork, clear

You will also need this command to be installed

ssc install xtqreg

ssc install ftools

ssc install hdfe

Median regression with fixed effects for idcode. Using xtqreg

xtqreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, i(idcode) ls

Median regression with fixed effects for idcode. Using mmqreg

mmqreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, abs(idcode)

q25 and q75 regression with fixed effects for idcode. Using mmqreg

mmqreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, abs(idcode) q(25 75)

Comparing mmqreg with and without fixed effects.

use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear

mmqreg lnwage i.female educ exper tenure i.isco, q(25 75)

mmqreg lnwage i.female educ exper tenure , q(25 75) abs(isco)

mmqreg lnwage educ exper tenure , q(25 75) abs(isco female)

References

Machado, J.A.F. and Santos Silva, J.M.C. (2019),
Quantiles via Moments,
Journal of Econometrics, 213(1), pp. 145-173.

Rios-Avila, Fernando (2020),
Extending Quantile regressions via Method of Moments using multiple fixed effects. MIMEO

Also see

xtqreg, hdfe, ftools