help qregpd
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Title
qregpd -- Quantile Regression for Panel Data (QRPD)
qregpd can be used to fit the quantile regression for panel data (QRPD) estimator developed in Powell (2015). The estimator addresses a fundamental
problem posed by alternative fixed-effect quantile estimators: inclusion of indiviudal fixed effects alters the interpretation of the estimated
coefficient on the treatment variable. As detailed in Powell (2016), the QRPD estimator is a special case of the generalized quantile estimator
implemented by genqreg.
Numerical optimization proceeds via a Nelder-Mead algorithm. As estimation and calculation of standard errors can sometimes pose numerical
challenges, the user can estimate generalized quantile regressions using Markov Chain Monte Carlo methods or grid-search methods.
Syntax
genqreg is invoked in the usual way - the command name, followed by the dependent variable, followed by control variables. One can then specify
options after a comma.
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.
instruments(varlist) All exogenous explanitory variables and any addtional instrumental variables must be included in instruments(varlist). If no
variables are included in instruments(varlist), then it is assumed all the RHS variables are exogenous.
identifier(varlist) This option must be specified as it defines the unit of observation that we observe over multiple time periods. Think of
identifier(varlist) as the panelvar in xtset. "Time" is defined in fix(varlist).
fix(varlist) This is the "time" fixed effect. Think of fix(varlist) as the timevar in xtset.
optimize(string) Three optimization techniques can be used to estimate qregpd: Nelder-Mead (default), adaptive MCMC and Grid-search.
Nelder-Mead Options
nmsimplex(string) A Stata matrix for the NM simplex. See moptimize Nelder-Mead
MCMC Options
To use the adaptive MCMC optimization procedure specify optimize("mcmc"). For further help see help mf_amcmc if installed.
draws(#) tells the algorithm how many draws to perform
burn(#) tells the algorithm how many draws to drop as a burn-in period; accordingly, the algorithm returns only the last draws(#)-burn(#) draws.
arate(#) acceptance rates of the algorithm. Must be between 0 and 1. The default is 0.234.
sampler(string) a string scalar specifying the drawing scheme desired by the user. sampler("mwg") is Metropolis-within-Gibbs sampling (each
component of the function is sampled alone and in order). sampler("global") is global, all-at-once sampling (defualt).
dampparm(#) is an adjustment parameter telling the algorithm how agressively or conservatively to adapt the proposal distribution to achieve the
acceptance rate specified by the user in arate(#). dampparm(#) should lie between zero and one, with values closer to zero corresponding with slower
adaptation, and values closer to one corresponding to more rapid adaptation to the proposal history. The defualt is 0.234.
from(string) initial parameter values EXCLUDING the constant. This must be a Stata matrix. If left blank, starting values are from qreg.
fromvariance(#) initial covariance matrix EXCLUDING the constant. This must be a Stata matrix. If left blank, starting values are from qreg.
saving(string) specifies a location to store the draws of the parameters. The file will contain just the draws after any burn-in period or thinning
of values is applied.
replace specifies that an existing file is to be overwritten with parameter draws.
append specifies that an existing file is to be appended with parameter draws.
thin(int) specifies that only every #th draw is to be retained, so if thin(3) is specified, only every third draw is retained. This option is
designed to help ease autocorrelation in the resulting draws, as is the option jumble, which randomly mixes draws. Both options may be applied.
jumble specifies that retained draws are to be jumbled. This helps reduce autocorrelation between draws.
noisy If specified, the algorithm produces feedback - each time the target distribution is evaluated, it produces a "." as output, while after 50
calls, it produces the value of the target distribution.
usemax By default, the mean of the MCMC draws are reported as the coefficient "estimates" to match Stata conventional output. By specifying the
option usemax, the set of draws that correspond to the maximum objective function value are reported.
analytic By default, the variance of the MCMC draws are used to calculate the standard errors to match Stata conventional output. By specifying the
option analytic, analytic standard errors are reported (See, Powell (2014b)).
Grid-search Options
To use the grid-search optimization procedure specify optimize("grid"). A maximum of two RHS variables may be used with the grid-search optimization
procedure. As such, you will need to specify the minimum, maximum and interval for each variable's grid.
grid1(numlist) Grid for first independent variable.
grid2(numlist) Grid for second independent variable.
Robust quantile regression for panel data
. qregpd ln_wage tenure union, id(idcode) fix(year)
Same as above, but using MCMC methods
. qregpd ln_wage tenure union, id(idcode) fix(year) optimize(mcmc) noisy draws(1000) burn(100) arate(.5)
. mat list e(gamma)
Robust instrumental variable quantile regression for panel data. MCMC optimization.
. qregpd ln_wage tenure union, id(idcode) fix(year) optimize(mcmc) noisy draws(1000) burn(100) arate(.5) instruments(ttl_exp wks_work union)
. mat list e(gamma)
Macros
e(cmd) "qregpd"
e(title) "Quantile Regression for Panel Data"
e(indepvars) Righ-hand side variables
e(depvar) Left-hand side variable
e(gamma) Values on the gamma vector
Matrices
e(b) Parameter values
e(V) Variance-covariance matrix of parameters
e(solutions) Parameter values from grid search; may contain multiple solutions.
Functions
e(sample) marks estimation sample
Reference
Powell, David. 2015. Quantile Regression with Nonadditive Fixed Effects. RAND Labor and Population Working Paper.
Powell, David. 2016. Quantile Treatment Effects in the Presence of Covariates. RAND Labor and Population Working Paper.
Powell, David. 2014b. Did the Economic Stimulus Payments of 2008 Reduce Labor Supply? Evidence from Quantile Panel Data Estimation. RAND Labor and
Population Working Paper 710-3.
Authors
This command was written by Matthew J. Baker (matthew.baker@hunter.cuny.edu), David Powell (dpowell@rand.org), and Travis Smith (tasmith@uga.edu).
Comments, criticisms, and suggestions for improvement are welcome.
Also see
Manual: quantile
Other: Generalized Quantile Regression (GQR), if installed: genqreg