Announcement

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

  • Help with "initial values not feasible" error in frontier command

    I’m trying to run a code from a paper as part of my analysis, following the steps in a research paper. First, I estimate a model to get the firm effects and errors. Then, in Step 2, I use the frontier command to model the inefficiency on the compustat data.

    Code:
    gen sales_stock = ln(sale)
    gen sga_stock = ln(xsga)
    gen goodwill_stock = ln(gdwl)  
    
    * Changes made here:
    rename fyear year
    destring gvkey, replace force
    duplicates drop gvkey year, force
    
    encode sic, gen(_sic)
    drop sic
    rename _sic sic
    
    * Define the stochastic frontier model using maximum likelihood estimation
    xtset gvkey year
    
    * step1 : 
    xtreg sales_stock sga_stock goodwill_stock i.sic, re
    predict alp , u /* Obtain estimates of alpha( time-invariant firm effect) */
    predict esl , e /* Obtain estimates of the composed error */
    
    * step 2: 
    
    // frontier alp , distribution ( hnormal )
    frontier alp
    predict ineff_pers , u /* Predict persistent inefficiency , E(u|e) */
    predict eff_pers , te /* Predict persistent efficiency , E(exp ( -u)|e) */
    
    * step 3: 
    // frontier esl , distribution ( hnormal )
    
    frontier esl /* This line creates the error */
    predict ineff_trans , u /* Predict transitory inefficiency , E(u|e) */
    predict eff_trans , te /* Predict transitory efficiency , E(exp ( -u)|e) */
    
    gen MC=ineff_pers*ineff_trans
    When I run this code, I get this error:

    Code:
    . frontier esl
    
    initial values not feasible
    r(1400);
    To fix this, I tried modifying the command like this:
    Code:
    frontier esl sales_stock sga_stock goodwill_stock, distribution(hnormal)
    My questions:
    1. Am I using the frontier command correctly in Step 2?
    2. Should I include variables like sales_stock, sga_stock, and goodwill_stock when working with esl?
    I’m new to Stata, and I just want to make sure I’m doing things the right way. Any help would be really appreciated!

    Thanks!

  • #2
    Shivam:
    welcome to this forum.
    Have you taken a look at -help maximize-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X