Command Reference : Command Reference
  
 
qreg
Estimate a quantile regression specification.
Syntax
qreg(options) y x1 [x2 x3 ...]
qreg(options) linear_specification
Options
 
quant=number (default = 0.5)
Quantile to be fit (where number is a value between 0 and 1).
w=arg
Weight series or expression.
Note: we recommend that, absent a good reason, you employ the default settings Inverse std. dev. weights (“wtype=istdev”) with EViews default scaling (“wscale=eviews”) for backward compatibility with versions prior to EViews 7.
wtype=arg (default=“istdev”)
Weight specification type: inverse standard deviation (“istdev”), inverse variance (“ivar”), standard deviation (“stdev”), variance (“var”).
wscale=arg
Weight scaling: EViews default (“eviews”), average (“avg”), none (“none”).
The default setting depends upon the weight type: “eviews” if “wtype=istdev”, “avg” for all others.
cov=arg (default=“sandwich”)
Method for computing coefficient covariance matrix: “iid” (ordinary estimates), “sandwich” (Huber sandwich estimates), “boot” (bootstrap estimates).
When “cov=iid” or “cov=sandwich”, EViews will use the sparsity nuisance parameter calculation specified in “spmethod=” when estimating the coefficient covariance matrix.
bwmethod=arg (default = “hs”)
Method for automatically selecting bandwidth value for use in estimation of sparsity and coefficient covariance matrix: “hs” (Hall-Sheather), “bf” (Bofinger), “c” (Chamberlain).
bw =number
Use user-specified bandwidth value in place of automatic method specified in “bwmethod=”.
bwsize=number (default = 0.05)
Size parameter for use in computation of bandwidth (used when “bw=hs” and “bw=bf”).
spmethod=arg (default=“kernel”)
Sparsity estimation method: “resid” (Siddiqui using residuals), “fitted” (Siddiqui using fitted quantiles at mean values of regressors), “kernel” (Kernel density using residuals)
Note: “spmethod=resid” is not available when “cov=sandwich”.
btmethod=arg (default= “pair”)
Bootstrap method: “resid” (residual bootstrap), “pair” (xy-pair bootstrap), “mcmb” (MCMB bootstrap), “mcmba” (MCMB-A bootstrap).
btreps=integer (default=100)
Number of bootstrap repetitions
btseed=positive integer
Seed the bootstrap random number generator.
If not specified, EViews will seed the bootstrap random number generator with a single integer draw from the default global random number generator.
btrnd=arg (default=“kn” or method previously set using rndseed).
Type of random number generator for the bootstrap: improved Knuth generator (“kn”), improved Mersenne Twister (“mt”), Knuth’s (1997) lagged Fibonacci generator used in EViews 4 (“kn4”) L’Ecuyer’s (1999) combined multiple recursive generator (“le”), Matsumoto and Nishimura’s (1998) Mersenne Twister used in EViews 4 (“mt4”).
btobs=integer
Number of observations for bootstrap subsampling (when “bsmethod=pair”).
Should be significantly greater than the number of regressors and less than or equal to the number of observations used in estimation. EViews will automatically restrict values to the range from the number of regressors and the number of estimation observations.
If omitted, the bootstrap will use the number of observations used in estimation.
btout=name
(optional) Matrix to hold results of bootstrap simulations.
k=arg (default=“e”)
Kernel function for sparsity and coefficient covariance matrix estimation (when “spmethod=kernel”): “e” (Epanechnikov), “r” (Triangular), “u” (Uniform), “n” (Normal–Gaussian), “b” (Biweight–Quartic), “t” (Triweight), “c” (Cosinus).
m=integer
Maximum number of iterations.
s
Use the current coefficient values in “C” as starting values (see also param).
s=number (default =0)
Determine starting values for equations. Specify a number between 0 and 1 representing the fraction of preliminary least squares coefficient estimates.
Note that out of range values are set to the default.
showopts / ‑showopts
[Do / do not] display the starting coefficient values and estimation options in the estimation output.
coef=arg
Specify the name of the coefficient vector (if specified by list); the default behavior is to use the “C” coefficient vector.
prompt
Force the dialog to appear from within a program.
p
Print estimation results.
Examples
qreg y c x
estimates the default least absolute deviations (median) regression for the dependent variable Y on a constant and X. The 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.
qreg(quant=0.6, cov=boot, btmethod=mcmba) y c x
estimates the quantile regression for the 0.6 quantile using MCMB-A bootstrapping to obtain estimates of the coefficient covariance matrix.
Cross-references
See “Quantile Regression” for a discussion of the quantile regression.