Announcement

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

  • sfpanel postestimation

    Dear Stata Users,

    I'm trying to estimate technical efficiency with -sfpanel post estimation command predict, bc. sfpanel y x1 x2 x3, model(bc95) command works out fine and provides me with estimation results however after the estimation when I try to estimate technical efficiency using predict technicaleff, bc I get this: (201 missing values generated)

    when I browse technicaleff there are no estimation results. What could be the problem here?

    Thanks in advance.

  • #2
    After doing
    Code:
    . net install st0315_2.pkg, from(http://www.stata-journal.com/software/sj15-4/)
    checking st0315_2 consistency and verifying not already installed...
    installing into /Users/lisowskiw/Library/Application Support/Stata/ado/plus/...
    installation complete.
    
    . which sfpanel
    /Users/lisowskiw/Library/Application Support/Stata/ado/plus/s/sfpanel.ado
    *! version 1.2.3 22may2015
    *! version 1.0.1  23aug2010
    *! version 1.0.2  15dec2010
    *! version 1.1.0  15sep2011
    *! version 1.1.1  22sep2011
    *! version 1.1.2  20dec2011
    *! version 1.2.0  30mar2012
    *! version 1.2.1  20may2012
    *! version 1.2.2  19aug2012
    *! version 1.2.3  25may2015 Corrected a bug that caused different results depending wether the -
    > if var==1- restriction was in the command syntax or the obs were selected using a -keep if var
    > ==1- before the command syntax
    
    . which sfcross
    /Users/lisowskiw/Library/Application Support/Stata/ado/plus/s/sfcross.ado
    *! version 1.0.0  01jul2010
    *! version 1.0.2  15dec2010
    *! version 1.1.1  16nov2011
    *! version 1.1.2  25nov2011
    *! version 1.2.0  19aug2012
    I ran the example from the help file that seemed closest to what you did
    Code:
    webuse xtfrontier1, clear
    sfpanel lnwidgets lnmachines lnworkers, model(bc95)
    predict technicaleff, bc
    and it successfully produced the requested predictions. I'm not a user of sfpanel, so I cannot comment on the accuracy of what was done. But I would suggest you (a) confirm that you have the same version of sfpanel and sfcross that I show above and then (b) try to reproduce the example I ran. If the example fails it suggests there is something wrong with your installation of sfpanel. Otherwise, it suggests your problem may be in your application of the methodology. Perhaps if you posted the results from your sfpanel command a Statalist member experienced with sfpanel would see something that would illuminate the source of your problem.

    Please don't post results as a screen shot. To assure maximum readability of results that you post, please copy them from the Results window or your log file into a code block in the Forum editor using code delimiters [CODE] and [/CODE], as explained in section 12 of the Statalist FAQ linked to at the top of the page. For example, the following:

    [CODE]
    . sysuse auto, clear
    (1978 Automobile Data)

    . describe make price

    storage display value
    variable name type format label variable label
    -----------------------------------------------------------------
    make str18 %-18s Make and Model
    price int %8.0gc Price
    [/CODE]

    will be presented in the post as the following:
    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . describe make price
    
                  storage   display    value
    variable name   type    format     label      variable label
    -----------------------------------------------------------------
    make            str18   %-18s                 Make and Model
    price           int     %8.0gc                Price

    Comment


    • #3
      Thank you William, I've did what you suggested and I got efficiency predictions using xtfrontier1 data so I'm assuming the problem is not my version or any other software related issue.

      Code:
       sfpanel PctofPoints pctDefMV pctMidMV pctAttMV, model(bc95)
      
      Inefficiency effects model (truncated-normal)        Number of obs =       200
      Group variable: Team                              Number of groups =        36
      Time variable: Year                             Obs per group: min =         1
                                                                     avg =       5.6
                                                                     max =        10
      
                                                           Prob > chi2   =    0.0000
      Log likelihood =   203.9725                          Wald chi2(3)  =    398.07
      
      ------------------------------------------------------------------------------
       PctofPoints |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      Frontier     |
          pctDefMV |   1.817299   .4068427     4.47   0.000     1.019902    2.614696
          pctMidMV |    1.01863   .3508849     2.90   0.004     .3309078    1.706351
          pctAttMV |   .6765323   .3377482     2.00   0.045     .0145579    1.338507
             _cons |   .2824171   .1739944     1.62   0.105    -.0586056    .6234398
      -------------+----------------------------------------------------------------
      Mu           |
             _cons |  -1.358633          .        .       .            .           .
      -------------+----------------------------------------------------------------
      Usigma       |
             _cons |  -6.824773   217.6498    -0.03   0.975    -433.4105    419.7609
      -------------+----------------------------------------------------------------
      Vsigma       |
             _cons |  -4.877747   .1063281   -45.87   0.000    -5.086146   -4.669348
      -------------+----------------------------------------------------------------
           sigma_u |   .0329624   3.587135     0.01   0.993     7.69e-95    1.41e+91
           sigma_v |   .0872591    .004639    18.81   0.000     .0786244    .0968421
            lambda |   .3777537   3.588713     0.11   0.916    -6.655995    7.411502
      ------------------------------------------------------------------------------

      These are my estimation results. All of my variables are percentage variables meaning that they are between 0 and 1 could that be the issue? I've tried estimating the model with -xttobit and later try to estimate efficiency results manually but -xttobit has no residual prediction option so I couldn't.

      Comment


      • #4
        As I mentioned, I am not a user of sfpanel and I do not understand the assumptions of stochastic frontier modeling.

        I suspect your immediate problem is that the formula for the quantity that predict is calculating includes the standard error of mu, which is missing for your model but was present in the output of the example I recommended. This suggests that the methodology is not entirely appropriate for your data.

        With that said, I was struck by the fact that in the example code all the variables were logged. Is that somehow a requirement for the results of sfpanel to be interpretable as elasticities?

        In any event, having bounded variables in a setting where boundedness is not built into the methodology is often a recipe for problems. I would encourage you to seek guidance from the literature and from colleagues. As a distant third, my advice is that I would not be surprised to learn that your percentage variables, which are in essence empirical probabilities, would benefit from being transformed to a log-odds scale using the logit() function (assuming none of them are precisely 0 or 1). But then, I have no idea how you would interpret efficiency with the data constructed that way.

        So the bottom line is that this is likely a problem of methodology rather than of software.

        Comment


        • #5
          Thank you William. The interesting thing is that -xtfrontier provides very similar estimation results and predicts technical efficiency. Thank you again for trying to help me out.

          Comment

          Working...
          X