Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stochastic Frontier Analysis in STATA with a conditional inefficiency term

    I try to estimate a stochastic frontier model with a cost to sales ratio (variable RATIO) as dependent variable using the following model:

    Code:
    ln(RATIO)i,t = b1*ln(VAR1)i,t + b2*ln(VAR2)i,t +  b3*(VAR3)i,t + vi,t + ui,t where v~N[0,sv²] and u~TN+[b'Fi,t, su2]
    The last term means that the inefficiency term ui,t is again conditional on further explanatory variables (here ln(VAR4) and VAR5).

    Given the above model, the correct command using the STATA build-in frontier would be I guess (I was not able to implement a conditional inefficiency term using xtfrontier):
    Code:
    frontier lnRATIO lnVAR1 lnVAR2 VAR3, cost distribution(tnormal) cm(lnVAR4, VAR5)
    However, the estimation iteration-process always produces log-likelihood values with the additional comment "(backed up)" and then runs forever...

    Alternatively, if I use the user-written command sfpanel (ssc install sfpanel) as follows
    Code:
    sfpanel lnRATIO lnVAR1 lnVAR2 VAR3, cost model(bc95) emean(lnVAR4, VAR5)
    STATA always returns the following error: "could not calculate numerical derivatives -- flat or discontinuous region encountered"..

    What am I doing wrong here? Am I using the wrong STATA commands for the model described above?







    Last edited by Harald Leber; 10 Apr 2016, 10:59.

  • #2
    I found out that in order to get "good" starting values, I should pre-define them using the option ufrom() of STATA's frontier command.

    So I run a simple OLS regression

    Code:
     reg lnRATIO lnVAR1 lnVAR2 VAR3
    and save the coefficients, the natural log of the square of the root mean square error and the value .1 in a matrix called b0 (taken from an old posting here http://www.stata.com/statalist/archi.../msg00519.html

    Code:
    matrix b0 = e(b), ln(e(rmse)^2) , .1
    and run frontier again:

    Code:
    frontier lnRATIO lnVAR1 lnVAR2 VAR3, cost distribution(tnormal) cm(lnVAR4, VAR5) ufrom(b0)
    However, STATA tells me that "ufrom() must specify a 1 x 6 matrix" - what am I missing?
    Last edited by Harald Leber; 11 Apr 2016, 07:20.

    Comment


    • #3
      I am not sure your code statement is what was actually typed - the comma in the conditional mean statement would generate an error. I would expected you need a 1x9 matrix : 4 in the lnRATIO equation (3 variables plus the constant), 3 in the Mu equation (2 variables plus the constant), ilgtgamma, and lnsigma2

      Comment


      • #4
        Hello Harald,

        Two observations:
        1. You describe a panel data model in your original post. So, you should be using -xtfrontier-, not -frontier-.
        2. -sfpanel- gives you many good choices for your panel data frontier model: 7 time-varying efficiency models and 4 time-invariant efficiency models. As a lot of folks have written on this forum many times, good advice is to think hard about which model makes the most sense for your particular problem. Most likely, -sfpanel- will allow you to estimate it.

        I hope this helps,
        Richard

        Comment

        Working...
        X