help xtnondynthreshsfa

Title

Performs Estimations of Threshold Effects in Non-Dynamic Panel Data Stochastic Frontier Models

Syntax

xtnondynthreshsfa
depvar
[indepvars]
[if] [in]
, options

xthreg_options all options of the command xthreg (if installed) can be used

xtreg_fe_options all options of the command xtreg, fe ([XT] xtreg) can be used

where depvar is the dependent variable and indepvars are the regime-independent variables.

Description

xtnondynthreshsfa performs estimations of threshold effects in non-dynamic panel data stochastic
frontier models. This command estimates fixed-effects non-dynamic panel data stochastic frontier models
with threshold effects. It allows to obtain both single and multiple thresholds estimates alongside the
slope coefficients. It also tests for the existence of threshold effects. After estimation, the command
permits to calculate both the time-invariant technical inefficiency and the individual-specific efficiency
scores. xtnondynthreshsfa is an extension of Wang (The Stata Journal, 2015) xthreg command to
the world of panel data stochastic frontier models in the presence of threshold effects. The theory behind
the command xtnondynthreshsfa is provided by Yelou, Larue and Tran (Economic Modelling, 2010).

Important Advice

The package xtnondynthreshsfa rely on the package xthreg.
Hence you must install xthreg to make xtnondynthreshsfa work.
To install the package xthreg from within Stata, please proceed as follows.
First, connect your computer to the Internet, and second, click on these two lines successively:

`"quietly net from http://www.stata-journal.com/software/sj15-1"'

`"net install st0373, replace"'

Options for xtnondynthreshsfa

xthreg_options all options of the command xthreg (if installed) can be
used. Assuming that you have correctly installed the command xthreg by following the instructions
above, you can view the options for the command xthreg by clicking on: xthreg. You
can form the options for the command xtnondynthreshsfa in exactly the same way as you would do
with the command xthreg. Simply enter them as if you were using the
command xthreg. Please, see xthreg for more details.

xtreg_fe_options all options of the command xtreg, fe ([XT] xtreg) can
be used. In addition to the options of the command xthreg, you can use all the options for
the command xtreg, fe: meaning all options available with the command xtreg with the fixed-effects
estimator option but not the fe option itself. This, because the fe option is already
internally used by the command xtnondynthreshsfa. But all the other ones are allowed to be used
like, for example, the vce(robust) option. The command xtreg, fe is already part
of Official Stata, so you do not have to install it. To view the options of the
command xtreg, fe, please click on: [XT] xtreg.

Syntax for xtnondynthreshsfacomps

xtnondynthreshsfacomps
, stub(string)

Description for xtnondynthreshsfacomps

xtnondynthreshsfacomps allows us to calculate both the time-invariant technical inefficiency and
the individual-specific efficiency scores after we perform the estimations with the command xtnondynthreshsfa.

Options for xtnondynthreshsfacomps

stub(string) designates a string name from which new variable names will be
created. To form this option, you put inside the parentheses a string name (without the
double quotes). Then new variable names will be created from this string. You must
specify this option in order to get a result. Hence this option is required.

Warnings

Since the command xtnondynthreshsfa is based on the command xthreg, it requires strongly
balanced panel data to work. Hence, you need to strongly balance your data before using the
command xtnondynthreshsfa. If you want to balance your panel data in Stata, you can
use, for example, the following commands, if installed: xtbalance and/or xtbalance2.

The command xtnondynthreshsfa, like many panel data threshold effects estimation techniques, is
highly computationally intensive and may for that reason take a very long time to run on a sluggish machine.
So, please, be patient when using this command.

Return values for xtnondynthreshsfa

xtnondynthreshsfa saves the following in e(). The command xtnondynthreshsfa saves all the
Stored Results returned by the commands xthreg and xtreg, fe ([XT] xtreg).
So, I advise you to look at the Stored Results of these two commands to see the descriptions and the
explanations of all the Stored Results returned by the command xtnondynthreshsfa, please.

Examples

Before beginning the estimations, we use the set more off instruction to tell
Stata not to pause when displaying the output.

set more off

We illustrate the use of the command xtnondynthreshsfa with the dataset xtnondynthreshsfadata.dta. This
dataset contains a sample of strongly balanced panel data for developed and developing countries in the World. It contains
yearly panel data for 15 years from 2005 to 2019.

use http://fmwww.bc.edu/repec/bocode/x/xtnondynthreshsfadata.dta, clear

Next we describe the dataset to see the definition of each variable.

describe

Now, we estimate a single threshold model. We start by writing the name of the
command xtnondynthreshsfa, followed by the dependent variable lggdpcstd. Then, we specify the
regime-independent variables: lgcapital and lgpoptot. After that, we indicate the options of
the command: we specify the regime-dependent variable in rx(lgnatresrenlev), the threshold variable
in qx(lgdomcredpslev), the number of thresholds in thnum(1) (one threshold in this case), the
trimming proportion to estimate each threshold in trim(0.01), the number of grid points
in grid(400) and the number of bootstrap replications in bs(300). Please, see the help
file of the command xthreg for further details on how to specify the regressions.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300)

Let us interpret the results we just found in this estimation. As explained in Wang (2015), page 131, the
results given by the command xtnondynthreshsfa are composed of four parts. The first part gives the estimation
and bootstrap results. The second part provides the threshold estimators and their confidence intervals. Th-1
represents the estimator in single threshold models. The third part presents the threshold effect test, including
the RSS, the mean squared error (MSE), the F statistic (Fstat), the probability value of
the F statistic (Prob), and critical values at 10%, 5%, and 1% significance
levels (Crit10, Crit5, and Crit1, respectively). The fourth part exhibits the
fixed-effect regression.

Thus, in this estimation, we see that the single threshold is equal to 22.8782. This threshold is
statistically significant because 0 (zero) is not included in its 95% confidence interval. Remember that
this threshold corresponds to the variable Log of Domestic Credit Private Sector Constant 2015 USD,
meaning financial development. In this estimation, we also see that the threshold effect exists since
the probability value of the F statistic (Prob) is significant at the 5% statistical significance
level. In this estimation, we finally see that the Fixed-effects (within) regression shows that the
coefficients of capital (Log of Physical Capital Stock Constant 2015 USD) and
labor (Log of Population Total) are positive and statistically significant at
the 1% significance level. The next two coefficients are for the
interaction _cat#c.lgnatresrenlev. They show that below the threshold
of 22.8782 for financial development, the
variable Log of Total Natural Resources Rents Constant 2015 USD has a positive and
significant impact on the Log of GDP Constant 2015 USD. We also see that above the
threshold of 22.8782 for financial development, the
variable Log of Total Natural Resources Rents Constant 2015 USD has a positive and significant impact
on the Log of GDP Constant 2015 USD. Both of these impacts are significant at the 1% significance
level. But the magnitude of the impact above the threshold is bigger than that below the threshold.

Next, we demonstrate how to utilize
an xtreg, fe option (please, see the help file of the command [XT] xtreg). In particular
the vce(robust) option.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300) vce(robust)

In the following line, we estimate a triple threshold model directly.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(3) trim(0.01 0.01 0.05) bs(300 300 300) vce(robust)

The probability value of the F statistic (Prob) shows us that there exists a single threshold but
there does not exist a double and triple threshold for our sample of data that we are using in
this Examples section. Hence, in the subsequent regressions, we will stick to the single threshold model.

Now, we illustrate how to calculate both the time-invariant technical inefficiency and
the individual-specific efficiency scores. First, we run the following regression.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300)

Second, we use the command xtnondynthreshsfacomps to compute the both the time-invariant technical
inefficiency and the individual-specific efficiency scores. In this command, we put the string mesc without
the double quotes in the option stub().

xtnondynthreshsfacomps, stub(mesc)

We describe all the previously created variables to see their labels.

describe Inefficiency_mesc Efficiency_mesc

We summarize these variables.

summarize Inefficiency_mesc Efficiency_mesc

We observe that, estimated average inefficiency is 152.09% and estimated average efficiency is 27.81%. Keep in
mind that, by construction, one country is 100% efficient and therefore efficiency scores are dependent
to dropping or adding outlier countries.

Third, we plot a histogram of the efficiency scores.

histogram Efficiency_mesc, bin(100) normal

We notice that, we have a right-skewed or positively-skewed distribution for the efficiency
scores. Hence, the mean efficiency is greater than the median efficiency scores.

Fourth, we only keep the World Bank codes, the countries and the efficiency scores.

keep pbm lbpbm Efficiency_mesc

Fifth, we keep only the first observation in each country.

bysort pbm lbpbm: keep if _n == 1

Sixth, we sort by descending order of the efficiency sores and by ascending order of the World Bank codes and
the countries.

gsort -Efficiency_mesc pbm lbpbm

Seventh, we list the World Bank codes, the countries and the efficiency sores from the most efficient
country and the least efficient country in our dataset.

list pbm lbpbm Efficiency_mesc, separator(0)

We see that the classification of the efficiency scores is, generally, plausible and close to what
is expected, with developed countries or developed administrative areas ranked first, followed by developing
countries ranked second.

Now, we show how to plot the confidence interval using the likelihood-ratio (LR) statistics. We start, by
reloading our examples dataset we described above.

use http://fmwww.bc.edu/repec/bocode/x/xtnondynthreshsfadata.dta, clear

Then, we run the following regression.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300)

Finally, we use the Stata command _matplot to plot the confidence interval using the
likelihood-ratio (LR) statistics stored in e(LR) for the single threshold model. The quantile for which
we plot the confidence interval is equal to 7.35 corresponding to the 5% critical value in this
regression. These quantiles are tabulated by Hansen (1999) and Wang (2015). Please, see these references and
the help file of the command _matplot for further details.

`"_matplot e(LR), columns(1 2) yline(7.35, lpattern(dash)) connect(direct) msize(small) mlabp(0) mlabs(zero) ytitle("LR Statistics") xtitle("First Threshold") recast(line)"'

The graphic indicates the confidence interval construction for the single threshold model. In this
graphic, the blue curve represents the likelihood-ratio (LR) statistics. The red dashed horizontal line
represents the quantile 7.35. The intersection of the two curves in this graphic correspond to the
confidence interval. The point at which the blue curve touches the x-axis corresponds to the estimated
threshold parameter.

Let us explain how to use the xtnondynthreshsfa command with the [U] if
qualifier. We run the regressions for year >= 2006.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot if year >= 2006 , rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300)

To finish this Examples section, we now illustrate how to include a Time Trend when using the
command xtnondynthreshsfa. For this, we include the variable trend in our usual Cobb-Douglas production
function with threshold effects specification.

xtnondynthreshsfa lggdpcstd lgcapital lgpoptot trend, rx(lgnatresrenlev) qx(lgdomcredpslev) thnum(1) trim(0.01) grid(400) bs(300) vce(robust)

The coefficient of the variable trend (0.0100663) indicates that total factor
productivity (meaning, GDP for a given level of capital and labor) has augmented in real
terms by 1% annually, on average, through all countries in the period 2005-2019.

EPILOGUE

In writing this Examples section, we had two goals. The first, was to show how to
effectively use the command xtnondynthreshsfa through simple and clear examples. The second, was to
undertake an original study on stochastic frontier models with threshold effects for panel data and
contribute to this literature. But, despite our efforts, we have only scratched the surface of what can be
done with the commands xtnondynthreshsfa and xtnondynthreshsfacomps, the accompanying
dataset, and the use of the command xtnondynthreshsfa in conjunction with
other Stata commands. We leave these avenues of research to the reader/user to explore
at her/his will !

References

Hansen Bruce E.: 1999, "Threshold Effects in Non-Dynamic Panels: Estimation, Testing, and Inference", Journal of Econometrics 93(2), 345-368.

Wang Qunyong: 2015, "Fixed-Effect Panel Threshold Model using Stata", The Stata Journal 15(1), 121-134.

Yelou Clement, Larue Bruno and Tran Kien C.: 2010, "Threshold Effects in Panel Data Stochastic Frontier Models of Dairy Production in Canada", Economic Modelling 27(3), 641-647.

Citation

The commands xtnondynthreshsfa and xtnondynthreshsfacomps are not Official Stata
commands. Like a paper, they are a free contribution to the research community. If you find the
commands xtnondynthreshsfa and xtnondynthreshsfacomps and their accompanying dataset
useful and utilize them in your works, please cite them like a paper as it is explained in
the Suggested Citation section of the IDEAS/RePEc webpage of the
commands. Please, also cite Hansen (1999), Wang (2015) and Yelou, Larue and Tran (2010) in your
works.Thank you infinitely, in advance, for doing all these gestures! Please, note that citing these
commands and these references are a good way to disseminate their use and their discovery by other
researchers and analysts. Doing these actions, could also, potentially, help us, as a community, to solve
challenging current problems and those that lie ahead in the future.

Acknowledgements

I thank Bruce E. Hansen; Qunyong Wang; Clement Yelou, Bruno Larue and Kien C. Tran; and StataCorp LLC for writing
and making their programs, data and articles available through official and commercial
channels. This current Stata package is based and inspired by their works. The usual disclaimers
apply: all errors and imperfections in this package are mine and all comments are very welcome.

Author

Diallo Ibrahima Amadou

FERDI (Fondation pour les Etudes et Recherches sur le Developpement International)

63 Boulevard Francois Mitterrand

63000 Clermont-Ferrand

France

E-Mail: zavren@gmail.com

Also see

Online: help for [XT] xtreg, [XT] xtfrontier, _matplot,
xthreg (if installed), xtendothresdpd (if installed), xthenreg (if installed),
xtbalance (if installed), xtbalance2 (if installed)