Skip to main content
Log in

Estimation and testing of stochastic frontier models using variational Bayes

  • Published:
Journal of Productivity Analysis Aims and scope Submit manuscript

Abstract

We show how a wide range of stochastic frontier models can be estimated relatively easily using variational Bayes. We derive approximate posterior distributions and point estimates for parameters and inefficiency effects for (a) time invariant models with several alternative inefficiency distributions, (b) models with time varying effects, (c) models incorporating environmental effects, and (d) models with more flexible forms for the regression function and error terms. Despite the abundance of stochastic frontier models, there have been few attempts to test the various models against each other, probably due to the difficulty of performing such tests. One advantage of the variational Bayes approximation is that it facilitates the computation of marginal likelihoods that can be used to compare models. We apply this idea to test stochastic frontier models with different inefficiency distributions. Estimation and testing is illustrated using three examples.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. Given a sample of MCMC draws θ1,θ2,…,θK, it is also possible to estimate an upper bound for the log of the marginal likelihood using \(\ln \overline {ML} = \frac{1}{K}\sum\limits_{k = 1}^k {\ln } \left( {L(y\vert {\theta ^k})p({\theta ^k})/q({\theta ^k})} \right)\). This may not be a tight bound, however and is calculated by simulation which may be prone to simulation errors (Ji et al. 2010).

  2. See Fruhwirth-Schnatter (2006) for a review of alternative methods.

  3. The same general conclusions can be drawn from the other data sets. Comparable tables and figures are available from the authors on request.

  4. The DIC (deviance information criterion) is a goodness-of-fit with-penalty measure similar in nature to the Akaike and Bayesian information criteria. Because it uses averages rather than maxima as estimates, it is readily computed from MCMC output.

  5. Methods for computing the MSE are described in Chen et al. (2012, pp133–145) and Frühwirth-Schnatter (2006, pp152–154).

  6. It is possible to consider other distributions such as truncated normal. We consider a lognormal distribution because it is more convenient for obtaining conditional distributions for the parameters μ that appear in the inefficiency distribution.

References

  • Aigner D, Lovell CK, Schmidt P (1977) Formulation and estimation of stochastic frontier production function models. J Econ 6(1):21–37

    Article  Google Scholar 

  • Alvarez A, Amsler C, Orea L, Schmidt P (2006) Interpreting and testing the scaling property in models where inefficiency depends on firm characteristics. J Product Anal 25(3):201–212

    Article  Google Scholar 

  • Attias H (1999) Inferring parameters and structure of latent variable models by variational Bayes. In: Proceedings of the Fifteenth conference on Uncertainty in artificial intelligence, Morgan Kaufmann Publishers Inc., pp 21–30

  • Battese GE, Coelli TJ,1992 Frontier production functions, technical efficiency and panel data: with application to paddy farmers in India. J Product Anal 3:153–169

    Article  Google Scholar 

  • Battese GE, Coelli TJ (1995) A model for technical inefficiency effects in a stochastic frontier production function for panel data. Empir Econ 20(2):325–332

    Article  Google Scholar 

  • Beckers DE, Hammond CJ (1987) A tractable likelihood function for the normal-gamma stochastic frontier model. Econ Lett 24(1):33–38

    Article  Google Scholar 

  • Bishop CM (2006) Pattern recognition and machine learning. Springer New York

  • Braun M, McAuliffe J (2010) Variational inference for large-scale models of discrete choice. J Am Stat Assoc 105(489):324–335

    Article  Google Scholar 

  • Chen MH, Shao QM, Ibrahim JG (2012) Monte Carlo methods in Bayesian computation. Springer New York

  • Christensen LR, Greene WH (1976) Economies of scale in US electric power generation. J Political Econ 84(4, Part1):655–676

    Article  Google Scholar 

  • Coelli TJ, Rao DSP, O’Donnell CJ, & Battese GE (2005) An introduction to efficiency and productivity analysis. Springer New York

  • Cornwell C, Schmidt P, Sickles RC (1990) Production frontiers with cross-sectional and time-series variation in efficiency levels. J Econ 46(1-2):185–200

    Article  Google Scholar 

  • Ehlers RS (2011) Comparison of Bayesian models for production efficiency. J Appl Stat 38(11):2433–2443

    Article  Google Scholar 

  • Frühwirth-Schnatter S (2006) Finite mixture and Markov switching models. Springer New York

  • Gelfand AE, Dey DK (1994) Bayesian model choice: asymptotics and exact calculations. J R Stat Soc. Series B (Methodological), 56:501–514

  • Greene WH (1990) A gamma-distributed stochastic frontier model. J Econ 46(1-2):141–163

    Article  Google Scholar 

  • Griffin JE, Steel MF (2004) Semiparametric Bayesian inference for stochastic frontier models. J Econ 123(1):121–152

    Article  Google Scholar 

  • Griffin JE, Steel MF (2007) Bayesian stochastic frontier analysis using WinBUGS. J Product Anal 27(3):163–176

    Article  Google Scholar 

  • Griffin JE, Steel MF (2008) Flexible mixture modelling of stochastic frontiers. J Product Anal 29(1):33–50

    Article  Google Scholar 

  • Ji C, Shen H, West M (2010) Bounded approximations for marginal likelihoods. Technical report

  • Jordan MI, Ghahramani Z, Jaakkola TS, Saul LK (1998) An introduction to variational methods for graphical models. Mach Learn 89:105–162

    Google Scholar 

  • Koop G, Osiewalski J, Steel MF (1997) Bayesian efficiency analysis through individual effects: hospital cost frontiers. J Econ 76(1):77–105

    Article  Google Scholar 

  • Koop G, Steel MF (2001) Bayesian analysis of stochastic frontier models. a companion to theoretical econometrics. Blackwell, Oxford, pp520–573

    Google Scholar 

  • Kucukelbir A, Ranganath R, Gelman A, Blei D (2015) Automatic variational inference in Stan. In: (Cortes C, Lawrence ND, Lee DD, Sugiyama M, Garnett R eds.) Advances in neural information processing systems, NIPS Proceedings, Curran Associates Inc., Red Hook NY pp 568–576

  • Kumbhakar SC (1990) Production frontiers, panel data, and time-varying technical inefficiency. J Econ 46(1–2):201–211

    Article  Google Scholar 

  • Kumbhakar SL, Lovell K (2000) Stochastic frontier analysis. Cambridge University Press, Cambridge

    Book  Google Scholar 

  • Lee YH, Schmidt P (1993) A production frontier model with flexible temporal variation in technical efficiency. In: Fried HO, Schmidh SS (eds) The measurement of productive efficiency: Techniques and applications, Oxford, UK, pp 237–255

  • McGrory CA, Titterington DM (2007) Variational approximations in Bayesian model selection for finite mixture distributions. Comput Stat Data Anal 51(11):5352–5367

    Article  Google Scholar 

  • Meeusen W,van den Broek J, (1977) Efficiency Estimation from Cobb-Douglas production functions with composed error. Int Econ Rev 18:435–444

    Article  Google Scholar 

  • Minka T, Winn J, Guiver G, Kannan A (2010) Infer.Net 2.3. Microsoft Research Cambridge, Cambridge

    Google Scholar 

  • Nott DJ, Tan SL, Villani M, Kohn R (2012) Regression density estimation with variational methods and stochastic approximation. J Comput Graph Stat 21(3):797–820

    Article  Google Scholar 

  • Nychka D, Haaland PD, O’Connell MA, Ellner S (1998) Appendix A: FUNFITS, data analysis and statistical tools for estimating functions. Case Stud Environ Stat 132:159

    Google Scholar 

  • Ormerod JT, Wand MP (2010) Explaining variational approximations. Am Stat 64(2):140–153

    Article  Google Scholar 

  • Parisi G (1988) Statistical field theory. Addison-Wesley New York

  • Parmeter CF, Kumbhakar SC (2014) Efficiency analysis: a primer on recent advances. Found Trends® Econ 7(3–4):191–385

    Article  Google Scholar 

  • Ruppert D, Wand MP, Carroll RJ (2003) Semiparametric regression (No. 12). Cambridge University Press, Cambridge

  • Sickles RC (2005) Panel estimators and the identification of firm-specific efficiency levels in parametric, semiparametric and nonparametric settings. J Econ 126(2):305–334

    Article  Google Scholar 

  • Stevenson RE (1980) Likelihood functions for generalized stochastic frontier estimation. J Econ 13(1):57–66

    Article  Google Scholar 

  • Tsionas EG (2007) Efficiency measurement with the Weibull stochastic frontier. Oxf Bull Econ Stat 69(5):693–706

    Article  Google Scholar 

  • Tsionas EG (2012) Maximum likelihood estimation of stochastic frontier models by the Fourier transform. J Econ 170(1):234–248

    Article  Google Scholar 

  • Van den Broeck J, Koop G, Osiewalski J, Steel MF (1994) Stochastic frontier models: a Bayesian perspective. J Econ 61(2):273–303

    Article  Google Scholar 

  • Wainwright MJ, Jordan MI (2008) Graphical models, exponential families, and variational inference. Found Trends® Mach Learn 1(1–2):1–305

    Google Scholar 

  • Wand MP, Ormerod JT, Padoan SA, Fuhrwirth R (2011) Mean field variational Bayes for elaborate distributions. Bayesian Anal 6(4):847–900

    Article  Google Scholar 

  • Wang B, Titterington DM (2005) Inadequacy of interval estimates corresponding to variational Bayesian approximations. In: AISTATS, Society for Artificial Intelligence and Statistics

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to William E. Griffiths.

Appendices

Appendix A: Models with other inefficiency distributions

Half Normal Inefficiency

$$\begin{array}{*{20}{c}} {\mathrm{Model}} & {y_{it}{\mathrm{ = }}{\mathbf{x}}_{it}{\mathbf{\beta }} \mp u_i{\mathrm{ + }}v_{it},} & {u_i{\mathrm{\sim }}N^ + \left( {0,\lambda ^2} \right)} \end{array}$$
$$\begin{array}{*{20}{c}} {\mathrm{Priors}} & {{\mathbf{\beta }}\sim N\left( {\underline {\mathbf{\beta }} ,\underline {\mathbf{V}} _{\mathbf{\beta }}} \right)} & {\sigma ^{ - 2}{\mathrm{\sim }}G\left( {\underline A _\sigma ,\underline B _\sigma } \right)} & {\lambda ^{ - 2}{\mathrm{\sim }}G\left( {\underline A _\lambda ,\underline B _\lambda } \right)} \end{array}$$

Optimal Densities

$$\left\{ \begin{array}{ccccc}\cr & q({\mathbf{\beta }}) \leftarrow N\left( {\overline {\mathbf{\beta }} ,{\mathbf{V}}_{\mathbf{\beta }}} \right)\quad \overline {\mathbf{\beta }} = {\mathbf{V}}_{\mathbf{\beta }}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\underline {\mathbf{\beta }} + \overline {\sigma ^{ - 2}} {\bf{x}}\prime ({\mathbf{y}} \pm \overline {\mathbf{u}} \otimes {\mathbf{i}}_T)} \right)\\\cr & {\mathbf{V}}_{\mathbf{\beta }} = \left( {\overline {\sigma ^{ - 2}} {\bf{x}}\prime {\bf{x}} + \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}} \right)^{ - 1}\\\cr & q\left( {\sigma ^{ - 2}} \right) \leftarrow G\left( {A_\sigma ,B_\sigma } \right)\quad A_\sigma = \underline A _\sigma + \frac{{NT}}{2}\\\cr & B_\sigma = \underline B _\sigma + \frac{1}{2}\left( {\mathop {\sum}\limits_{i = 1}^N {\mathop {\sum}\limits_{t = 1}^T {\left[ {\left( {y_{it} - {\mathbf{x}}_{it}\overline {\mathbf{\beta }} \pm \overline u _i} \right)^2 + V\left[ {u_i} \right]} \right] + {\mathrm{tr}}\left( {{\bf{x}}\prime {\bf{x}}\,{\mathbf{V}}_{\mathbf{\beta }}} \right)} } } \right)\\\cr & q\left( {\lambda ^{ - 2}} \right) \leftarrow G\left( {A_\lambda ,B_\lambda } \right)\quad A_\lambda = \frac{N}{2} + \underline A _\lambda \quad B_\lambda = \frac{1}{2}\mathop {\sum}\limits_{i = 1}^N {\overline {u_i^2} + \underline B _\lambda } \\\cr & q\left( {u_i} \right) \leftarrow TN\left( {\mu _i,\upsilon ^2} \right)\quad \mu _i = \pm \frac{{\overline {\sigma ^{ - 2}} \mathop {\sum}\nolimits_t {\left( {{\mathbf{x}}_{{\mathbf{i}}t}\overline {\mathbf{\beta }} - y_{it}} \right)} }}{{T\overline {\sigma ^{ - 2}} + \overline {\lambda ^{ - 2}} }}\\\cr & \upsilon ^2 = \frac{1}{{T\overline {\sigma ^{ - 2}} + \overline {\lambda ^{ - 2}} }}\cr \end{array} \right.$$

Coordinate ascent algorithm

Iterate the following quantities until the change in \({\mathrm{ln}}\underline {ML}\) is negligible

$$\begin{array}{ccccc}\cr \overline {\mathbf{\beta }} \quad {\mathbf{V}}_{\mathbf{\beta }}\quad \overline {\sigma ^{ - 2}} = & \frac{{A_\sigma }}{{B_\sigma }}\quad \overline {\lambda ^{ - 2}} = \frac{{A_\lambda }}{{B_\lambda }}\quad \overline u _i = \mu _i + \upsilon m\left( {\alpha _i} \right)\quad V\left[ {u_i} \right]\\\cr = & \upsilon ^2\left\{ {1 - m\left( {\alpha _i} \right)\left[ {m\left( {\alpha _i} \right) + \alpha _i} \right]} \right\}\cr \end{array}$$

where αi = μi/υ and m(·) = ?(·)/Φ(·).

Lower bound for marginal likelihood

$$\begin{array}{ccccc}\cr \ln \underline {ML} = & \frac{{\left( { - NT} \right)\ln 2\pi {\mathrm{ + }}k{\mathrm{ + }}N{\mathrm{ + }}2N\ln 2}}{2}{\mathrm{ + }}\ln \left( {\frac{{\Gamma \left( {A_\sigma } \right)\Gamma \left( {A_\lambda } \right)\underline B _\sigma ^{\underline A _\sigma }\underline B _\lambda ^{\underline A _\lambda }}}{{\Gamma \left( {\underline A _\sigma } \right)\Gamma \left( {\underline A _\lambda } \right)B_\lambda ^{A_\lambda }B_\sigma ^{A_\sigma }}}} \right)\\\cr - & \frac{{\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right)\prime \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right) + {\mathrm{tr}}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}{\mathbf{V}}_{\mathbf{\beta }}} \right)}}{2}\; + \frac{1}{2}\ln \left( {\frac{{|{\mathbf{V}}_{\mathbf{\beta }}|}}{{|\underline {\mathbf{V}} _{\mathbf{\beta }}|}}} \right) + N\ln \upsilon + \mathop {\sum}\limits_{i = 1}^N {\left\{ {\ln \;{\mathrm{\Phi }}\left( {\alpha _i} \right) - \frac{{\alpha _i\phi \left( {\alpha _i} \right)}}{{2{\mathrm{\Phi }}\left( {\alpha _i} \right)}}} \right\}} \cr \end{array}$$

Truncated-Normal Inefficiency

$$\begin{array}{*{20}{c}} {{Model}} & {y_{it}{\mathrm{ = }}{\mathbf{x}}_{it}{\mathbf{\beta }} \mp u_i{\mathbf{ + }}v_{it}} & {u_i{\mathrm{\sim }}N^ + \left( {\lambda \mu ,\lambda ^2} \right)} \end{array}$$
$$\begin{array}{ccccc}\cr & \begin{array}{*{20}{c}} {Priors} & {{\mathbf{\beta }}{\mathrm{\sim }}N\left( {\underline {\mathbf{\beta }} ,\underline {\mathbf{V}} _{\mathbf{\beta }}} \right)} & {\sigma ^{ - 2}{\mathrm{\sim }}G\left( {\underline A _\sigma ,\underline B _\sigma } \right)} & {} & {} \end{array}\\\cr & \mu {\mathrm{\sim }}N\left( {\underline A _\mu ,\underline B _\mu ^2} \right)\quad \lambda ^{ - 1}{\mathrm{\sim }}G\left( {\underline A _\lambda ,\underline B _\lambda } \right)\cr \end{array}$$

Optimal densities

$$\left\{ \begin{array}{ccccc}\cr & q\left( {\mathbf{\beta }} \right) \leftarrow N\left( {\overline {\mathbf{\beta }} ,{\mathbf{V}}_{\mathbf{\beta }}} \right)\quad \overline {\mathbf{\beta }} = {\mathbf{V}}_{\mathbf{\beta }}^{ - 1}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\underline {\mathbf{\beta }} + \overline {\sigma ^{ - 2}} {\mathbf{y}} \pm \overline {\mathbf{u}} \otimes {\mathbf{i}}_T} \right)\\\cr & {\mathbf{V}}_{\mathbf{\beta }} = \left( {\overline {\sigma ^{ - 2}} {\bf{x}}\prime {\bf{x}} + \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}} \right)^{ - 1}\\\cr & q\left( {\sigma ^{ - 2}} \right) \leftarrow G\left( {A_\sigma ,B_\sigma } \right)\quad A_\sigma = \underline A _\sigma + \frac{{NT}}{2}\\\cr & B_\sigma = \underline B _\sigma + \frac{1}{2}\left( {\mathop {\sum}\limits_{i = 1}^N {\mathop {\sum}\limits_{t = 1}^T {\left[ {\left( {y_{it} - {\mathbf{x}}_{it}\overline {\mathbf{\beta }} \pm \overline u _i} \right)^2 + V\left[ {u_i} \right]} \right] + {\mathrm{tr}}\left( {{\bf{x}}\prime {\bf{x}}\,{\mathbf{V}}_{\mathbf{\beta }}} \right)} } } \right)\\\cr & q\left( \mu \right) \leftarrow C\exp \\\cr & \left\{ {\left( {\overline {\lambda ^{ - 1}} \mathop {\sum}\limits_{i = 1}^N {\overline u _i + \underline A _\mu \underline B _\mu ^{ - 2}} } \right)\mu - \left( {\frac{{N + \underline B _\mu ^{ - 2}}}{2}} \right)\mu ^2 - N\ln {\mathrm{\Phi }}\left( \mu \right)} \right\}\\\cr & q\left( {\lambda ^{ - 1}} \right) \leftarrow \frac{{\lambda ^{ - (N + \underline A _\lambda - 1)}{\mathrm{exp}}\left\{ { - s^2\lambda ^{ - 2}/2 - \gamma \lambda ^{ - 1}} \right\}}}{{s^{ - \overline A _\lambda }\exp \left( {\gamma ^2/4s^2} \right)\Gamma \left( {A_\lambda } \right)D_{ - A_\lambda }\left( {\gamma /s} \right)}}\\\cr & A_\lambda = N + \underline A _\lambda s^2 = \mathop {\sum}\limits_{i = 1}^N {\overline {u_i^2} } \quad \gamma = - \left( {\overline \mu \mathop {\sum}\limits_{i = 1}^N {\overline u _i + \underline B _\lambda } } \right)\\\cr & q\left( {u_i} \right) \leftarrow TN\left( {\mu _i,\upsilon ^2} \right)\\\cr & \mu _i = \frac{{ \pm \overline {\sigma ^{ - 2}} \mathop {\sum}\nolimits_t {\left( {{\mathbf{x}}_{it}\overline {\mathbf{\beta }} - y_{it}} \right) + \overline {\lambda ^{ - 1}} \overline \mu } }}{{T\overline {\sigma ^{ - 2}} + \overline {\lambda ^{ - 2}} }}\quad \upsilon ^2 = \frac{1}{{T\overline {\sigma ^{ - 2}} + \overline {\lambda ^{ - 2}} }}\cr \end{array} \right.$$

Coordinate ascent algorithm

Iterate the following quantities until the change in \(\ln \underline {ML}\) is negligible.

$$\begin{array}{ccccc}\cr & \overline {\mathbf{\beta }} \quad {\mathbf{V}}_{\mathbf{\beta }}\quad \overline {\sigma ^{ - 2}} = \frac{{A_\sigma }}{{B_\sigma }}\quad \frac{1}{C} = \mathop {\int}\limits_{ - \infty }^\infty {q^ \ast \left( \mu \right)d\mu } \quad \overline \mu = \mathop {\int}\limits_0^\infty \mu q\left( \mu \right)d\mu \\\cr & \overline {\lambda ^{ - 1}} = \frac{{A_\lambda D_{ - \left( {A_\lambda + 1} \right)}\left( {\gamma /s} \right)}}{{sD_{ - A_\lambda }\left( {\gamma /s} \right)}}\\\cr & \overline {\lambda ^{ - 2}} = \frac{{A_\lambda \left( {A_\lambda + 1} \right)D_{ - (A_\lambda + 2)}\left( {\gamma /s} \right)}}{{s^2D_{ - A_\lambda }\left( {\gamma /s} \right)}}\quad \overline u _i = \mu _i + \upsilon m\left( {\alpha _i} \right)\\\cr & V\left[ {u_i} \right] = \upsilon ^2\left\{ {1 - m\left( {\alpha _i} \right)\left[ {m\left( {\alpha _i} \right) + \alpha _i} \right]} \right\}\cr \end{array}$$

where \(q^ \ast \left( \mu \right) = q\left( \mu \right)/C\), αi = μi/υ and m(·) = ?(·)/Φ(·).

Lower bound for marginal likelihood

$$\begin{array}{ccccc}\cr \ln \underline {ML} = & \frac{{\left( { - NT} \right)\ln 2\pi {\mathrm{ + }}k{\mathrm{ + }}N{\mathrm{ + }}2N\ln 2}}{2}\\\cr & \quad {\mathrm{ + }}\ln \left( {\frac{{\Gamma \left( {A_\sigma } \right)\Gamma \left( {A_\lambda } \right)\underline B _\sigma ^{\underline A _\sigma }\underline B _\lambda ^{\underline A _\lambda }}}{{\Gamma \left( {\underline A _\sigma } \right)\Gamma \left( {\underline A _\lambda } \right)B_\lambda ^{A_\lambda }B_\sigma ^{A_\sigma }}}} \right)\\\cr & \quad - \frac{{\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right)\prime \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right) + {\mathrm{tr}}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}{\mathbf{V}}_{\mathbf{\beta }}} \right)}}{2}\; + \frac{1}{2}\ln \left( {\frac{{|{\mathbf{V}}_{\mathbf{\beta }}|}}{{|\underline {\mathbf{V}} _{\mathbf{\beta }}|}}} \right)\\\cr & \quad + N\ln \upsilon + \mathop {\sum}\limits_{i = 1}^N {\left\{ {\ln \,{\mathrm{\Phi }}\left( {\alpha _i} \right) - \frac{{\alpha _i\phi \left( {\alpha _i} \right)}}{{2{\mathrm{\Phi }}\left( {\alpha _i} \right)}}} \right\}} \cr \end{array}$$

Lognormal inefficiency

Model \(y_{it} = {\mathbf{x}}_{it}{\mathbf{\beta }} \mp u_i{\mathbf{ + }}v_{it}\)

Priors \({\mathbf{\beta }} \sim N\left( {\underline {\mathbf{\beta }} ,\underline {\mathbf{V}} _{\mathbf{\beta }}} \right)\quad \sigma ^{ - 2} \sim G\left( {\underline A _\sigma ,\underline B _\sigma } \right)\quad \mu \sim N\left( {\underline \mu ,\underline V {\kern 1pt} _\mu } \right)\quad \lambda ^{ - 2} \sim G\left( {\underline A _\lambda ,\underline B _\lambda } \right)\)

Optimal densities

$$\left\{ \begin{array}{ccccc}\cr & q\left( {\mathbf{\beta }} \right) \leftarrow N\left( {\overline {\mathbf{\beta }} ,{\mathbf{V}}_{\mathbf{\beta }}} \right)\quad \overline {\mathbf{\beta }} = {\mathbf{V}}_{\mathbf{\beta }}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\underline {\mathbf{\beta }} + \overline {\sigma ^{ - 2}} {\bf{x}}\prime \left( {{\mathbf{y}} \pm {\bar{\mathbf u}} \otimes {\mathbf{i}}_T} \right)} \right)\\\cr & {\mathbf{V}}_{\mathbf{\beta }} = \left( {\overline {\sigma ^{ - 2}} {\bf{x}}\prime {\bf{x}} + \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}} \right)^{ - 1}\\\cr & q\left( {\sigma ^{ - 2}} \right) \leftarrow G\left( {A_\sigma ,B_\sigma } \right)\quad A_\sigma = \underline A _\sigma + \frac{{NT}}{2}\\\cr & B_\sigma = \underline B _\sigma + \frac{1}{2}\left( {\mathop {\sum}\limits_{i = 1}^N {\mathop {\sum}\limits_{t = 1}^T {\left[ {\left( {y_{it} - {\mathbf{x}}_{it}\overline {\mathbf{\beta }} \pm \overline u _i} \right)^2 + V\left[ {u_i} \right]} \right] + {\mathrm{tr}}\left( {{\bf{x}}\prime {\bf{x}}\,{\mathbf{V}}_{\mathbf{\beta }}} \right)} } } \right)\\\cr & q\left( \mu \right) \leftarrow N\left( {\overline \mu ,V_\mu } \right)\quad \overline \mu = \frac{{\overline {\lambda ^{ - 2}} \mathop {\sum}\nolimits_{i = 1}^N {\overline {\ln u} _i} + \underline \mu \underline V {\kern 1pt} _\mu ^{ - 1}}}{{N\overline {\lambda ^{ - 2}} + \underline V {\kern 1pt} _\mu ^{ - 1}}}\\\cr & V_\mu = \frac{1}{{N\overline {\lambda ^{ - 2}} + \underline V {\kern 1pt} _\mu ^{ - 1}}}\\\cr & q\left( {\lambda ^{ - 2}} \right) \leftarrow G\left( {A_\lambda ,B_\lambda } \right)\quad A_\lambda = \frac{N}{2} + \underline A _\lambda \\\cr & B_\lambda = \frac{1}{2}\left( {\mathop {\sum}\limits_{i = 1}^N {\overline {\left( {\ln u_i} \right)^2} + N\overline {\mu ^2} - 2\overline \mu } \mathop {\sum}\limits_{i = 1}^N {\overline {\ln u} _i} } \right) + \underline B _\lambda \\\cr & q\left( {u_i} \right) \leftarrow C_{1i}\exp \\\cr & \left\{ {\left( {\overline {\lambda ^{ - 2}} \overline \mu - 1} \right)\ln u_i - 0.5\overline {\lambda ^{ - 2}} \left( {\ln u_i} \right)^2 - 0.5\overline {\sigma ^{ - 2}} \left[ {Tu_i^2 \mp 2u_i\mathop {\sum}\limits_{i = 1}^T {\left( {{\mathbf{x}}_{{\it{i}}t}\overline {\mathbf{\beta }} - y_{it}} \right)} } \right]} \right\}\cr \end{array} \right.$$

Coordinate ascent algorithm

Iterate the following quantities until the change in \(\ln \underline {ML}\) is negligible.

$$\begin{array}{l}\begin{array}{*{20}{c}} {\overline {\mathbf{\beta }} \quad \;{\mathbf{V}}_{\mathbf{\beta }}} & {\overline {\sigma ^{ - 2}} = \frac{{A_\sigma }}{{B_\sigma }}} & {\overline {\lambda ^{ - 2}} = \frac{{A_\lambda }}{{B_\lambda }}\;\quad \;\overline \mu } & {\overline {\mu ^2} = \overline \mu ^2 + V_\mu } & {\frac{1}{{C_{1i}}} = \mathop {\int}\limits_0^\infty {q^ \ast \left( {u_i} \right)du_i} } & {\overline u _i = \mathop {\int}\limits_0^\infty {u_i^2} q\left( {u_i} \right)du_i} \end{array}\cr \begin{array}{*{20}{c}} {V\left[ {u_i} \right] = \mathop {\int}\limits_0^\infty {u_i^2} q\left( {u_i} \right)du_i - \overline u _i^2} & {\overline {\ln u_i} = \mathop {\int}\limits_0^\infty {\ln u_i} q\left( {u_i} \right)du_i} & {\overline {\left( {\ln u_i} \right)^2} = \mathop {\int}\limits_0^\infty {\left( {\ln u_i} \right)^2} q\left( {u_i} \right)du_i} \end{array}\end{array}$$

Lower bound for marginal likelihood

$$\begin{array}{ccccc}\cr \ln \underline {ML} = & \frac{{\left( { - NT - N} \right)\ln 2\pi + k + 1}}{2} + \ln \left( {\frac{{\Gamma \left( {A_\sigma } \right)\Gamma \left( {A_\lambda } \right)\underline B _\sigma ^{\underline A _\sigma }\underline B _\lambda ^{\underline A _\lambda }}}{{\Gamma \left( {\underline A _\sigma } \right)\Gamma \left( {\underline A _\lambda } \right)B_\lambda ^{A_\lambda }B_\sigma ^{A_\sigma }}}} \right)\\\cr & \quad - \frac{{\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right)^\prime \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}(\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} ) + {\mathrm{tr}}(\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}{\mathbf{V}}_{\mathbf{\beta }})}}{2}\\\cr & \quad + \frac{1}{2}\ln \left( {\frac{{|{\mathbf{V}}_{\mathbf{\beta }}|}}{{|\underline {\mathbf{V}} _{\mathbf{\beta }}|}}} \right) + \frac{1}{2}\ln \left( {\frac{{V_\mu }}{{\underline V {\kern 1pt} _\mu }}} \right)\\\cr & \quad - \frac{{\left[ {\left( {\overline \mu - \underline \mu } \right)^2 + V_\mu } \right]\underline V {\kern 1pt} _\mu ^{ - 1}}}{2} - \mathop {\sum}\limits_{i = 1}^N {\overline {\ln u_i} } - \mathop {\sum}\limits_{i = 1}^N {\overline {\ln q\left( {u_i} \right)} } \cr \end{array}$$

Appendix B: Model with zero-one environmental variables

Here we return to model Eq. (2.1), \(y_{it} = {\mathbf{x}}_{it}{\mathbf{\beta }} \mp u_i{\mathbf{ + }}v_{it}\) as suggested by Koop et al. (1997), we can derive the following optimal densities:

$$\left\{ \begin{array}{ccccc}\cr & q\left( {\mathbf{\beta }} \right) \leftarrow N\left( {\overline {\mathbf{\beta }} ,{\mathbf{V}}_{\mathbf{\beta }}} \right)\quad \overline {\mathbf{\beta }} = {\mathbf{V}}_{\mathbf{\beta }}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\underline {\mathbf{\beta }} + \overline {\sigma ^{ - 2}} {\bf{x}}\prime ({\mathbf{y}} \pm \overline {\mathbf{u}} \otimes {\mathbf{i}}_T)} \right)\\\cr & {\mathbf{V}}_{\mathbf{\beta }} = \left( {\overline {\sigma ^{ - 2}} {\bf{x}}\prime {\bf{x}} + \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}} \right)^{ - 1}\\\cr & q\left( {\sigma ^{ - 2}} \right) \leftarrow G\left( {A_\sigma ,B_\sigma } \right)\quad A_\sigma = \underline A _\sigma + \frac{{NT}}{2}\\\cr & B_\sigma = \underline B _\sigma + \frac{1}{2}\left( {\mathop {\sum}\limits_{i = 1}^N {\mathop {\sum}\limits_{t = 1}^T {\left[ {\left( {y_{it} - {\mathbf{x}}_{it}\overline {\mathbf{\beta }} \pm \overline u _i} \right)^2 + V\left[ {u_i} \right]} \right] + {\mathrm{tr}}\left( {{\bf{x}}\prime {\bf{x}}{\mathbf{V}}_{\mathbf{\beta }}} \right)} } } \right)\\\cr & q\left( {\phi _j} \right) \leftarrow G\left( {A_j,B_j} \right)\quad A_j = \mathop {\sum}\limits_{i = 1}^N {z_{ij} + \underline A _j} \\\cr & B_j = \underline B _j + \mathop {\sum}\limits_{i = 1}^N {z_{ij}\overline u _i} \mathop {\sum}\limits_{s \ne j}^m {\overline \phi _s^{z_{is}}} \\\cr & q\left( {u_i} \right) \leftarrow TN\left( {\mu _i,\upsilon ^2} \right)\quad \mu _i = \frac{1}{T}\left( { \pm \mathop {\sum}\limits_{t = 1}^T {\left( {{\mathbf{x}}_{it}\overline {\mathbf{\beta }} - y_{it}} \right)} - \mathop {\prod}\limits_{j = 1}^m {\overline \phi _j^{z_{ij}}/\overline {\sigma ^{ - 2}} } } \right)\\\cr & \upsilon ^2 = \frac{1}{{T\overline {\sigma ^{ - 2}} }}\cr \end{array} \right.$$

Interestingly, all these densities are standard forms; we therefore can easily set-up a coordinate ascent algorithm by iterating over

$$\begin{array}{ccccc}\cr & \left\{ {\overline {\mathbf{\beta }} ,\,V_{\mathbf{\beta }},\quad } \right.\overline {\sigma ^{ - 2}} = \frac{{A_\sigma }}{{B_\sigma }},\quad \overline {\phi _j} = \frac{{A_j}}{{B_j}},\quad \overline u _i = \mu _i + \upsilon m\left( {\alpha _i} \right),\\\cr & \left. {V\left[ {u_i} \right] = \upsilon ^2\left( {1 - m\left( {\alpha _i} \right)\left[ {m\left( {\alpha _i} \right) + \alpha _i} \right]} \right)} \right\}\cr \end{array}$$

where \(\alpha _i = \overline \mu _i{\mathrm{/}}\upsilon\). The marginal likelihood lower bound used to assess convergence is

$$\begin{array}{ccccc}\cr \ln \underline {ML} = & \frac{{\left( { - NT + N} \right)\ln 2\pi {\mathrm{ + }}N{\mathrm{ + }}k}}{2} + \ln \left( {\frac{{\Gamma \left( {A_\sigma } \right)\underline B _\sigma ^{\underline A _\sigma }\mathop {\prod}\nolimits_{j = 1}^m {\Gamma \left( {A_j} \right)\underline B _j^{\underline A _j}} }}{{\Gamma \left( {\underline A _\sigma } \right)B_\sigma ^{A_\sigma }\mathop {\prod}\nolimits_{j = 1}^m {\Gamma \left( {\underline A _j} \right)B_j^{A_j}} }}} \right) + \frac{1}{2}\ln \left( {\frac{{|{\mathbf{V}}_{\mathbf{\beta }}|}}{{|\underline {\mathbf{V}} _{\mathbf{\beta }}|}}} \right)\\\cr - & \frac{{\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right)\prime \underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}\left( {\overline {\mathbf{\beta }} - \underline {\mathbf{\beta }} } \right) + {\mathrm{tr}}\left( {\underline {\mathbf{V}} _{\mathbf{\beta }}^{ - 1}{\mathbf{V}}_{\mathbf{\beta }}} \right)}}{2} + N\ln \upsilon + \mathop {\sum}\limits_{i = 1}^N {\left\{ {\ln \,{\mathrm{\Phi }}\left( {\alpha _i} \right) - \frac{{\alpha _i\phi \left( {\alpha _i} \right)}}{{2{\mathrm{\Phi }}\left( {\alpha _i} \right)}}} \right\}} \cr \end{array}$$

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hajargasht, G., Griffiths, W.E. Estimation and testing of stochastic frontier models using variational Bayes. J Prod Anal 50, 1–24 (2018). https://doi.org/10.1007/s11123-018-0531-0

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11123-018-0531-0

Keywords

JEL classification

Navigation