Announcement

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

  • Random effect

    Dear Sir,


    I am passing frontier(bre) command [random effects] in Stata 10.1 but it is giving me error as "invalid frontier". Can you please suggest where have I mistaken. I have changed my excel according to the command and already generated all the prerequisites such as $xvar etc.


    Thank you
    Warm Regards
    Mahak

  • #2
    Manak:
    welcome to the list.
    Please note that your chances of getting helpful replies are conditional on posting what you typed and what Stata gave you back (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      I am trying to execute a stochastic frontier analysis as per Battesse and Coelli 1995. i have installed already installed the appropriate packages like sfpan, sfcross etc. I have successfully ran the ols model and random effects model. I am trying to generate initial values for frontier by passing random effects matrix as input under sfpan command. The problem i am facing is every time i am running a stochastic frontier analysis it is saying invalid frontier. pls suggest solution

      Comment


      • #4
        While your attempt to explain in more detail in #3 is of some help, I doubt anybody will be able to answer your question unless you post the exact code that you ran and show the exact output that Stata gave you, as Carlo suggested in #2. To assure that you correctly post the exact code and output, do it by copy/pasting from your log file or Stata's Results window. Be sure to surround it by code delimters. (See FAQ #12 for instructions on use of code delimiters if you do not already know about them.)

        Comment


        • #5
          Dear sir,

          I am copying exact command which I tried

          quietly tab id, gen(dum)

          . drop dum1

          . global xvar x1 x2

          . global dvar dum*

          .
          . global zvar z1

          . quietly generate time2 = time^2

          . quietly regress y $xvar

          .
          . matrix b0 = e(b)

          . version 10.1

          . sfpan y, dist(h) prod frontier($xvar) usigmas vsigmas i(id) inv sf_init, frontier(b0) usigmas(0) vsigmas(0) ml max, difficult nrtol(0.00
          > 1) gtol(0.001)
          invalid 'frontier'
          r(198);

          Comment


          • #6
            -sfpan- is not part of official Stata and I cannot find this command. The closest to it I can find is -sfpanel-, but the syntax of that command does not look at all like what you have shown.

            That said there are some general principles of Stata syntax that apply to nearly all commands, and it looks like you have violated one of them here. I think the problem is that you should not have a comma after sf_init. In standard Stata syntax, once you begin the options, no further commas are allowed within the list of options. Similarly, you will also need to get rid of the comma after max.

            Comment


            • #7
              I am tryingBattesse and Coelli 1995 model in which single equation approach is used to capture inefficiency through Z variables along with standard x variables.
              I am following the book " a practitioner's guide to stochastic frontier analysis in stata". The command sfpan can be used by installing .ado files available on the book's website. I have tried removing the commas but the problem is unresolved as the command is sf_init can not be read by stata. sf_init and sf_srch are used to find initial values and refine them.

              Comment


              • #8
                Mahak:
                as per FAQ and previous comments:
                - please state where you got user-written programmes from;
                - please report full reference of the contributions you quote, as this one is a multidisciplinary list; hence, nobody knows the literature topics of any research field;
                - please post what you typed and what Stata gave you back via CODE delimiters (it worths far more than tons of words aimed, often unsuccessfully, at explaining what is the matter with your analysis). Thanks.
                Last edited by Carlo Lazzaro; 06 Feb 2017, 01:05.
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment


                • #9
                  Dear sir,

                  I have got these commands from the book " a practitioner's guide to stochastic frontier analysis in stata" (2015) written bu Kumbhakar and wang. i have already posted the commands which I used. I am also enclosing the data file.

                  I am copying exact command which I tried

                  quietly tab id, gen(dum)

                  . drop dum1

                  . global xvar x1 x2

                  . global dvar dum*

                  .
                  . global zvar z1

                  . quietly generate time2 = time^2

                  . quietly regress y $xvar

                  .
                  . matrix b0 = e(b)

                  . version 10.1

                  . sfpan y, dist(h) prod frontier($xvar) usigmas vsigmas i(id) inv sf_init, frontier(b0) usigmas(0) vsigmas(0) ml max, difficult nrtol(0.00
                  > 1) gtol(0.001)
                  invalid 'frontier'
                  r(198);
                  Attached Files

                  Comment


                  • #10
                    hi
                    I am trying to run following code to estimate cost efficiency while capturing inefficiency through z(exogenous variables) for banks with 143 observations:

                    sfpanel lntcost lnx1 lnx2 hflnx1lnx1 lnx1lnx2 hflnx2lnx2 lny1 lny2 lny3 hflny1lny1 lny1lny2 lny1lny3 hflny2lny2 lny2lny3 hflny3lny3 lnx1lny1 lnx1lny2 lnx1lny3 lnx2lny1 lnx2lny2 lnx2lny3 t, model(bc95) usigma(lngdp lnmargn lnadq lnrate lndposit) cost

                    STATA run this code but give most of the result's table blank and similarly "predict ce, bce" didn't give any score of cost efficiency.
                    Please, can someone advice on this?

                    Thanks
                    Salah

                    Comment


                    • #11
                      Regarding this issue, I offer these solutions:

                      i) make sure you run
                      Code:
                      net install sfbook_install, from(https://sites.google.com/site/sfbook2014/home/install/) replace
                      and
                      Code:
                      sfbook_install
                      to install the package in the practitioner textbook.
                      ii) the reason why the command does not work is because you should run
                      Code:
                      sfpan y, dist(h) prod frontier($xvar) usigmas vsigmas i(id) inv
                      ;
                      Code:
                      sf_init, frontier(b0) usigmas(0) vsigmas(0)
                      and
                      Code:
                      ml max, difficult nrtol(0.001) gtol(0.001)
                      in three separate lines.
                      iii) however, the results of your fixed effect model and the ML method may be very different, depending on your model.

                      I suggest using sfpanel, as it's more widely applied.

                      Comment


                      • #12
                        Originally posted by mahak sharma View Post
                        Dear sir,

                        I have got these commands from the book " a practitioner's guide to stochastic frontier analysis in stata" (2015) written bu Kumbhakar and wang. i have already posted the commands which I used. I am also enclosing the data file.

                        I am copying exact command which I tried

                        quietly tab id, gen(dum)

                        . drop dum1

                        . global xvar x1 x2

                        . global dvar dum*

                        .
                        . global zvar z1

                        . quietly generate time2 = time^2

                        . quietly regress y $xvar

                        .
                        . matrix b0 = e(b)

                        . version 10.1

                        . sfpan y, dist(h) prod frontier($xvar) usigmas vsigmas i(id) inv sf_init, frontier(b0) usigmas(0) vsigmas(0) ml max, difficult nrtol(0.00
                        > 1) gtol(0.001)
                        invalid 'frontier'
                        r(198);
                        can you please share the code book from you device

                        Comment

                        Working...
                        X