Announcement

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

  • Technical efficiency analysis

    Hello. I have a problem when I try to analyze technical efficiency.

    I have no problems when I use code:
    xtfrontier ..., ti
    predict te,te

    But when I use tvd model and try to predic te, I see error r133() "unknown egen function max()"

    Can ypu help, what is a problem and how I can calculate te for tvd model?
    Thanks

  • #2
    You'll have to explain more about what your data look like and your syntax you are running. This example runs without error:

    Code:
    webuse xtfrontier1,clear
     xtfrontier lnwidgets lnworkers lnmachines , ti  
    predict te,te
     xtfrontier lnwidgets lnworkers lnmachines , tvd  
     predict te2,te
    Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

    Comment


    • #3
      I use panel data
      My code looks like:

      xtset bankid qtr
      xtfrontier roe loans sec pdep pfixas crrisk liqrisk caprisk as as_sq gov_new for_new federal other_center res_1, ti
      predict te, te

      xtfrontier roe loans sec pdep pfixas crrisk liqrisk caprisk as as_sq gov_new for_new federal other_center res_1, tvd
      predict te1, te
      unknown egen function max()
      r(133)


      So technical efficiency calculated for time-invariant model but there is an error for time-varian

      Comment


      • #4
        In the background, predict is running a command like:

        Code:
        by bankid: egen double var = max(qtr)
        Which gives the error, but I've never seen Stata error on this egen function. What version of Stata are you using; is it up to date? Finally, try running the egen function 'max' outside of -predict- to see if it's a problem with -predict- after xtfrontier or a problem with -egen-.


        Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

        Comment


        • #5
          I use Stata13

          I think that there is a problem with -egen-, because for time-inveriant model command -predict- works perfect. Actually a can male no operation with -egen- command

          Moreover, I try to install a packege

          . ssc install egenmore
          checking egenmore consistency and verifying not already installed...
          all files already exist and are up to date.


          Comment


          • #6
            Actually I even try to use manual about -egen-, so I use special data and code which was written there and

            use http://www.stata-press.com/data/r13/egenxmpl2, clear
            by dcode, sort: egen medstay = median(los)
            generate deltalos = los - medstay


            But my Stata again face wwith errors


            . use http://www.stata-press.com/data/r13/egenxmpl2, clear

            .
            . by dcode, sort: egen medstay = median(los)
            unknown egen function median()
            r(133);


            .
            . generate deltalos = los - medstay
            medstay not found
            r(111);


            Comment


            • #7
              The max and median egen functions are not a part of the SSC package -egenmore- (maybe you are thinking of the function 'rowmedian' which at one time originated from egenmore? ). Regardless, if a canned example like

              Code:
              sysuse auto, clear
              
              bys rep78: egen a = max(price)
              bys rep78: egen b = median(price)
              is failing then my recommendations are to reinstall Stata 13 and/or contact Stata Technical support.
              Last edited by eric_a_booth; 06 Feb 2017, 05:13.
              Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

              Comment


              • #8
                Many thanks for your advices.
                It`s again error, I write to support

                Comment

                Working...
                X