*! version 1.20 11 July 2022

Title

estquant -- Quantile approach by Combes et al. (2012)

Syntax

estquant varname [if] [in], cat(varname)
[shift dilation truncation initr(#) qrange(#) bvariable([on|off])
breplication(#) bsampling(#) strata optechnique([nr|dfp|bfgs|nm]) opnmsimplexdeltas(#)
maxiteration(#) eps1(#) eps2(#) ci([normal|bootstrap]) level(#) ]

Required Settings
cat(varname) specifies the variable classifying the sample into two categories.

Optional Settings
shift estimates the relative shift parameter A.

dilation estimates the relative dilation parameter D.

truncation estimates the relative truncation parameter S.

initr(#) specifies the initial value of the relative truncation parameter S for numerical optimization.

qrange(#) specifies the range of quantile function.

bvariable([on|off]) specifies whether the bootstrap uses variables prepared beforehand in the dataset.

breplication(#) specifies the number of the bootstrap replications.

bsampling(#) specifies the percentage of the sample size for bootstrap sampling.

strata fixes the number of observations in each category in each bootstrap replication.

optechnique([nr|dfp|bfgs|nm]) sets the optimization technique.

opnmsimplexdeltas(#) sets the values of delta to build the simplex required by the Nelder-Mead method.

maxiteration(#) specifies the maximum number of iterations in numerical optimization.

eps1(#) specifies the convergence tolerance in numerical optimization.

eps2(#) specifies the convergence tolerance in numerical optimization.

ci([normal|bootstrap]) specifies types of confidence interval.

level(#) specifies the level of the confidence interval.

Description

The estquant command implements the quantile approach suggested by Combes et al. (2012).

Options

Required Settings

cat(varname) specifies the variable classifying the sample into two categories.
This category variable must be binary, but it can take any values (e.g., 0 and 1 or 1 and 2).

Optional Settings

shift estimates the relative shift parameter A. When this option is not specified,
the relative shift parameter is constrained as A = 0.

dilation estimates the relative dilation parameter D. When this option is not
specified, the relative dilation parameter is constrained as D = 1.

truncation estimates the relative truncation parameter S. When this option is not
specified, the relative truncation parameter is constrained as S = 0.

initr(#) specifies the initial value of the relative truncation parameter S for numerical optimization. In the default setting, the initial value is automatically selected by the grid search.

qrange(#) specifies the range of quantile function. The quantile range [0,1] is
divided into # ranges. The default value is 1,000.

bvariable([on|off]) specifies whether the bootstrap uses variables prepared beforehand
in the dataset. If this option is on, then the bootstrap replications are conducted using the
varname named in a sequential order at each iteration. If this option is off, then the
bootstrap replications are conducted by resampling varname at each iteration. The default
setting is off.

breplication(#) specifies the number of the bootstrap replications. If this option
takes the value of 0, the bootstrap replication is skipped and bootstrap standard errors
are not calculated. If bvariable(on) is specified, then the breplication(#)
must be the last number of varname named in sequential order. The default value is 50.

bsampling(#) specifies the percentage of the sample size for bootstrap sampling. The
default value is 100(%), meaning that observations of the same sample size are drawn for
bootstrap sampling. This option is ignored when is specified.

strata fixes the number of observations in each category in each bootstrap replication. The strata option is not used in the default setting.

optechnique([nr|dfp|bfgs|nm]) sets the optimization technique from the four choices: nr (modified Newton-Raphson), dfp (Davidon-Fletcher-Powell), bfgs (Broyden-Fletcher-Goldfarb-Shanno), and nm (Nelder-Mead). Try nm if the optimization fails. The default optimization technique is nr. See the manaul "[M-5] optimize() --- Function optimization" for the deails of optimization technique.

opnmsimplexdeltas(#) sets the values of delta to build the simplex required by the Nelder-Mead method. The
default value is 1e-2.

maxiteration(#) specifies the maximum number of iterations in numerical optimization. The
default value is 1e+3.

eps1(#) specifies the convergence tolerance in numerical optimization. The stopping rule
of eps1(#) is shown in Kondo (2017). The default value is 1e-6.

eps2(#) specifies the convergence tolerance in numerical optimization. The stopping rule
of eps2(#) is shown in Kondo (2017). The default value is 1e-6.

ci([normal|bootstrap]) specifies types of confidence interval. The ci() option
allows one to use the normal- and bootstrap-based confidence intervals. If bootstrap-based
confidence interval is constructed, then a large number of bootstrap replications should be
specified in the breplication(#) option. The default setting constructs the normal-based
confidence interval.

level(#) specifies the level of the confidence interval. The default level is 95.0(%).

Examples

Basic command:

. estquant lntfp, cat(cat) sh di tr

In the case in which truncation = 0, truncation option is dropped as follows:

. estquant lntfp, cat(cat) sh di

Estimation with 100 bootstrap replications:

. estquant lntfp, cat(cat) sh di tr brep(100)

Estimation with bootstrap replications using the varname1-varname100 named in a sequential order in the dataset:

. estquant lntfp, cat(cat) sh di tr brep(100) bvar(on)

Estimation by the Nelder-Mead method (if the optimization fails):

. estquant lntfp, cat(cat) sh di tr optech(nm) opnms(1e-2)

Author

Keisuke Kondo

Research Institute of Economy, Trade and Industry (RIETI). Tokyo, Japan.

(URL: https://keisukekondokk.github.io/)

References

Combes, P.P., G. Duranton, L. Gobillon, D. Puga, and S. Roux. (2012) "The productivity advantages of
large cities: Distinguishing agglomeration from firm selection," Econometrica 80(6), pp. 2543-2594.

Kondo, K. (2017) "Quantile approach for distinguishing agglomeration from firm selection in Stata,"
RIETI TP 17-T-001. (GitHub: https://github.com/keisukekondokk/estquant)