chks

User-written Stata command. Nonlinear index and Zero-Inefficiency Stochastic Frontier Model. This code is a beta version and it’s been developed for the working paper Chancí, Kumbhakar, and Sandoval, 2019.

(Home)

Getting Started

  1. Install. You can choose from one of the following two methods to install:
    • From the Stata command window:

        `net install chks, from("https://luischanci.github.io/chks/")`
       	<!---  `net install chks, from ("https://raw.githubusercontent.com/luischanci/chks/master") replace` --->
      
    • Manual installation: Download, unzip, and locate all the files into the Stata ado folder (for instance, locate the unzipped ado and other files into C:\ado\personal\c\).

  2. Syntaxis.

    The general syntaxis is,

    chks depvariable xregressors, indx(indexvariables) type() estimation() eoption()

where,
  - `indx()` _varlist_ for the index. `indx()` could be empty, which means that the model is linear rather than a nonlinear index.

  - `type()`. Functional form for the nonlinear index. There are two types: CES `type(ces)` and Cobb-Douglas `type(cd)`.

  - `estimation()` is the estimation method: NLS `estimation(nls)`, Stochastic Frontier `estimation(sf)`, or Zero-Stochastic Frontier `estimation(zsf)`.

  - `eoption()` is the estimation option when estimation is ZSF. It could be Maximum Likelihood Estimation `eoption(ml)` or Expectation-Maximization Algorithm `eoption(em)`. EM is the default option.

  - `maxitera()` specifies the maximum number of iterations; the default is 500.
  1. Models.
    • The general model is one in which a nonlinear index (formula) is a function of a vector of explanatory variables (x) and a residual term (formula):

      formula

    where,
     ![formula](https://render.githubusercontent.com/render/math?math=\eta=\left(\sum_{m=1}^M{\delta_mY_m^\rho}\right)^{1/\rho})
    
    thus, the equation to estimate is: formula

Using the code.

chks Y1 x1 x2 ... xk, idx(Y2 Y3) t(ces) es(nls) chks Y1 x1 x2 ... xk, idx(Y2 Y3) t(ces) es(sf) chks Y1 x1 x2 ...xk, idx(Y2 Y3) t(ces) es(zsf) In this case there are two additional options: Maximum Likelihood Extimation (add eo(ml)) or Expectation-Maximization Algorithm (add eo(em)).

Finally, it is possible to report the robust standard errors (add robust) or omit the constant term (add nocons).

Examples.

chks Y1 x1 x2, indx(Y2 Y3) t(ces) es(zsf) eo(em)

```
	------------------------------------------------------------------------------
			Y1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
	------------------------------------------------------------------------------
			x1 |   .0155953   .0005609    27.81   0.000      .014496    .0166946
			x2 |   .0392709   .0007659    51.27   0.000     .0377697    .0407721
		     _cons |   2.935441   .0167206   175.56   0.000     2.902669    2.968213
	  		Y2 |   .2252023   .0124254    18.12   0.000     .2008489    .2495557
	  		Y3 |   .5117927   .0132434    38.65   0.000     .4858362    .5377493
	 		rho|   2.293806   .1025533    22.37   0.000     2.092805    2.494807
		 lnsigma_u |  -2.299401   .0789157   -29.14   0.000    -2.454073   -2.144729
		 lnsigma_v |  -2.340403   .0252419   -92.72   0.000    -2.389876    -2.29093
  	logist_probability |   .5607503   .0657478     8.53   0.000     .4318871    .6896136
	------------------------------------------------------------------------------
  di 1/(1+exp(-.5607503))
  0.63662613
``` ------ </br>

Final notes:

</br>

Website

chks

Author

Luis Chancí

luischanci@santotomas.cl