Announcement

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

  • could not calculate numerical derivatives -- flat or discontinuous region encountered

    Dear all,

    I am trying to run the stochastic frontier model based on Battese and Coelli (1995), which looks like:
    sfpanel logYield logFertilizer logLabor logOxen logSeed year, model(bc95)/
    The data is two-year panel data. It doesn't work rather it gives an error message "could not calculate numerical derivates .. flat or discontinuous region encountered. I used Stata version 14.
    However, I run this function based on Kumbhakar (1990), it is fine!
    sfpanel logYield logFertilizer logLabor logOxen logSeed, model(kumb90) rescale difficult
    Does somebody know what goes wrong here? could you please help me?

    Thanks in Advance!
    @Asmiro


  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Remember, we're mostly not from your area so referring to the Battsese and Coelli tells us little. The FAQ asks for full citations for papers you refer to, but explaining the issue in your posting is much better than referring to a paper. It also asks you to specify where you got a user written procedure so folks know exactly what you're running.

    As for your problem, there is no general answer. "could not calculate numerical derivatives" usually refers to a problem that depends on the model, the data and the optimization path. I note that you include year in the first but not the second model. Does that make a difference?

    If you can change the model at all legitimately, that may help. With this kind of optimization problem, there are alternative optimization methods generally available - look at the documentation on ml or maximize. Sometimes it helps to give it different start values. If all else fails, ask the program's author.

    Comment

    Working...
    X