Announcement

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

  • #46
    Dear all,

    I bump this thread just to inform the interested readers that a new version of prodest is available on the SSC. It features a new - and way faster - version of Wooldridge estimator, and the addition of a new estimator - named Robinson/Wooldridge, method(rob) - which is a simple IV implementation of the model presented in equation 2.11 of Wooldridge (2009) paper. Moreover, the new predict command has a number of new features. In Stata, type

    ssc install prodest, replace
    to download it.

    Best,

    Gabriele

    Comment


    • #47
      Dear Gabriele, I am using the prodest command to estimate productivity of firms. I have two questions for you, if you please might consider reply. I am using BEEPS data round IV-V which contain panel data for firms in years 2007 and 2011. I am using the prodest command the value added case as per levinsohn and petrin: prodest ln_y, free(ln_l) state(ln_k) proxy(ln_m) va met(lp) fsresiduals(fs_lp)
      My questions are: (1) could TFP be negative, or do you think I have any problem with my data.. or I am doing something wrong? (2) when I try using the levpet command it is impossible to estimate TFP, in the contrary when using the prodest command for the LP method I get these results: do you think is it possible that the levpet does not produce any results, and the prodest does so?

      here is my code

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input float(fs_lp ln_y ln_k ln_l ln_m) long id2009 int year
               .         .         . 4.3820267         . 229 2007
               .         .         .  2.484907         . 231 2007
       -.1829796   19.2761 10.308952   3.73767 15.376598 237 2007
               . 14.914123         . 2.3025851         . 237 2011
       .13983345  17.36857   13.5117  3.218876 15.440822 240 2007
               . 15.608935         .  2.995732 12.388394 240 2011
       -.3972683 16.012735 17.423721   1.94591 17.509378 244 2007
        .3293381 16.786951  17.61772   1.94591  16.16498 244 2011
       -.8247128 16.047722 13.598108 3.6888795 14.325266 245 2007
      -1.1544895 16.335056 14.814803 3.8286414 16.285557 245 2011
               .         .  15.94363   3.73767  13.01611 250 2007
      end
      thank you very much in advance
      best
      Klodi

      Comment


      • #48
        Dear Klodi,

        thanks for using prodest!

        I do not have enough details on your issue to be precise, but let me stress a couple of points before proceeding:

        1) according to the syntax of the command, and the partial data you plotted, you seem to be concerned by negative values of the fs_lp variable. Let me stress, though, that the fsresiduals() option generates a variable that stores the residuals of the first stage. By definition, the average value of the residuals in an OLS is zero, hence I'd be more than concerned in case you would NOT find negative values in the fs_lp variable. Having said that, a negative value of TFP is possible from a statistical perspective, but it is not meaningful from an economic point of view, hence I would suggest you to carefully review the data, the model, the assumptions.
        2) I do not have enough elements to answer your point. Which error does levpet routine raise? Why is it not working as expected? Lastly, let me stress, for sake of correctness, that issues with levpet should be addressed to the actual authors of the routine (Petrin, Poi and Levinsohn).

        I hope to have clarified.

        Best,

        Gabriele

        Comment


        • #49
          Dear Gabriele,

          Thanks for writing this command.

          I am trying to obtain the coefficients of the following model using prodest:
          Click image for larger version

Name:	screenshot.png
Views:	1
Size:	5.5 KB
ID:	1446119

          and my code is basically like:
          Code:
          prodest y if year>=2004, free(l) state(k) proxy(m) met(lp) control($pcons) acf fsresiduals(fs_acf_lp)
          where y,l,k,m are already in log and $pcons contains all the higher-order terms of l,k,m.

          My problem is that an error always comes out saying "insufficient observations r(2001)" . Reading the stata help file wasn't very helpful on this issue.
          So could you see what might be wrong here with the code/data. Anything would be appreciated!

          Best Regards,
          Erik

          Comment


          • #50
            Originally posted by Erik Zhang View Post
            Dear Gabriele,

            Thanks for writing this command.

            I am trying to obtain the coefficients of the following model using prodest:
            [ATTACH=CONFIG]n1446119[/ATTACH]
            and my code is basically like:
            Code:
            prodest y if year>=2004, free(l) state(k) proxy(m) met(lp) control($pcons) acf fsresiduals(fs_acf_lp)
            where y,l,k,m are already in log and $pcons contains all the higher-order terms of l,k,m.

            My problem is that an error always comes out saying "insufficient observations r(2001)" . Reading the stata help file wasn't very helpful on this issue.
            So could you see what might be wrong here with the code/data. Anything would be appreciated!

            Best Regards,
            Erik
            hmm just ignore it, I think i have solved it somehow.
            It seems to work while setting a greater number of bootstrap repetitions and adding id and t option instead of simply xtsetting the data.

            Thanks again,
            Erik

            Comment


            • #51
              Dear Erik,

              I am glad that you found prodest useful.

              Let me frame your question for clarity: the model in your first comment should be a gross output translog production function model. Now, you could in principle estimate such a model with prodest using acf and translog options.

              However, estimating gross output models with ACF is strongly disencouraged (see the discussion in the original acf paper), hence I would suggest - where possible - to switch to a value added, or even to the so-called structural value added models.

              Having said that, as you correctly pointed out you need at least 3 bootstrap repetitions for the command to work (otherwise you will receive an 'insufficient observations' error. However, as for the id() and t() options, you can choose to xtset the data and that should work as well (after all, prodest xtsets the data when id and t are specified).

              I hope to have clarified,

              Gabriele

              Comment


              • #52
                Originally posted by Gabriele Rovigatti View Post
                Dear Eduardo,

                thanks for your message.

                You found a bug in the predict_p.ado command for prodest postestimation: we did not account for gross output models in translog ACF estimation, thanks for pointing that out!

                We are in the process of issuing a new version of the command - hopefully in the next few weeks - however, I enclose a debugged version of the predict_p.ado file (!CAREFUL, NOT SERIOUSLY TESTED!) in case you may want to give it a try.

                Let me know if that works for you.

                Best,

                Gabriele
                Dear Gabriele,

                Thanks for writing this command.This command is especially useful to me.

                Recently, I have tried out prodest in my project ,then I try to calculate the elasticity of labor output of each company.I have tried using predict, parameters but that only reports elasticities not for each company.
                Do you have any idea how to get the elasticity of labor of each company as well?


                Your answer would be much appreciated.

                Best,
                Hope Ran

                Comment


                • #53
                  Dear Ran,

                  I have answered to your questions via email.

                  As said, at the moment there is no post-estimation command for generating the variable of labor elasticities. Hopefully, I will be able to issue a new version of the command soon featuring such addition.

                  Best,

                  Gabriele

                  Comment


                  • #54
                    Dear Gabrielle,


                    Thank you very much for your reply. I will try to calculate the elasticity of labor output of each company based on your suggestions , Looking forward to your new version of the command with such feature.


                    Best,
                    Hope Ran

                    Comment


                    • #55
                      Dear Gabriele,
                      Thank you for your email. I have some questions concern with ACF method. You introduce with prodeset command as following for ACF:
                      prodest lnva, free(lnL) state(lnK) proxy(lnM) va met(lp) acf reps(50) id(id) t(year)
                      predict TFPACF_one, residual

                      Another command for TFP_ACF calculation is as following:
                      acfest lnva, free(lnL) proxy(inM) state(lnK) nbs(200) robust i(id) t(year)
                      predict TFPACF_, two, omega

                      The value of TFPACF_one and TFPACF_two is different and which one we should take for appropriate results? The second question is TFPACF_one value is log value and how about for TFPACF_two?

                      Comment


                      • #56
                        Dear Gabriele,

                        Thanks for writing this command.

                        I am trying to obtain the elasticity of material using the translog production function model:
                        function.png


                        And my code is
                        Code:
                        prodest lnY_add, free(lnL) state(lnK) proxy(lnM) va met(lp) acf id(id) t(year) translog
                        My result is

                        ------------------------------------------------------------------------------
                        lnY_add | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                        -------------+----------------------------------------------------------------
                        lnL | .0015056 .0000115 130.73 0.000 .001483 .0015281
                        lnK | -.3101797 .0000158 -2.0e+04 0.000 -.3102108 -.3101487
                        var_1_1 | .0343946 .0000125 2743.53 0.000 .03437 .0344192
                        var_1_2 | .0349731 3.04e-06 1.2e+04 0.000 .0349672 .0349791
                        var_2_2 | .0162172 .0000573 282.99 0.000 .0161049 .0163295
                        ------------------------------------------------------------------------------

                        Then
                        Code:
                        .predict, parameters
                        Translog elasticity estimates prodest postestimation
                        ---------------------------------------------------------------------------
                        Elasticity Parameter Value
                        ---------------------------------------------------------------------------
                        beta_lnL 0.620
                        beta_lnK -0.035
                        ---------------------------------------------------------------------------

                        I want to obtain the elasticity of material.Do you have any idea how to get the elasticity of material as well?

                        Best Regards,

                        Yuchen

                        Comment


                        • #57
                          Dear Gabriele Rovigatti I have got the stata version of prodest and read its application in estimating the production function (and hence productivity prediction). I very much impressed with it. how ever, when I try it to my data, I got an error message stating that initial weights are required. would you please, how can I do it.

                          Comment


                          • #58
                            Dear Gabriele

                            I tried to replicate your example in the help file to learn how to exactly use prodest
                            because I would like to apply your method to my current work.
                            So, I installed prodest and completely copy your example in a log file.
                            Tha data was successfully imported when I run the log.
                            But the module stopped in estimating the model by any method,(OP, LP, Wooldridge, MrEst)
                            The error was as follows,

                            invalid '###'

                            where ### is my family name.

                            Do you know what mistakes I committed?

                            Best

                            Atsuyuki KATO


                            Comment


                            • #59
                              Dear Atsuyuki,

                              without being able to see and reproduce the error is very unlikely that I will be able to solve the issue. If you could send me an email ([email protected]) with the logfile reproducing the error I'll be able to help more effectively.

                              If I had to guess, however, I'd say that the error has to do with the PATH in your Stata system, and very likely with spaces in your local path (type sysdir to see the default directories of your Stata). If we assume a path like

                              /home/Atsuyuki KATO/Desktop

                              running

                              Code:
                              save /home/Atsuyuki KATO/Desktop/foo.dta
                              would end up in a

                              Code:
                              invalid KATO
                              error. In that case, wrapping the path in quotes (i.e., save "/home/Atsuyuki KATO/Desktop/foo.dta") would solve the issue. Without looking at your code, though, I would not be able to do more than guessing.

                              Best,

                              Gabriele

                              Comment


                              • #60
                                Dear Gabriele,

                                I am new to this forum and extremely impressed when using prodest, as I am also using opreg and levpet which are too much time consuming.

                                I have questions involving estimating production function at firm level. I have unbalanced panel data from 2002 to 2015. My question is: can I add dummy variables for year, region, industry or firm's ownership, or a dummy, say, to identify before and after an event or big economic policy (like before or after trade liberalization) in option control(.)?

                                Also, some people treat variable "age of firm" as a state variable, but I want to treat "age of firm" as a control variable instead of state variable, is it ok? (I also add variable "share of female worker" as a control variable)

                                Hope you will help educate me on the above issues.
                                Thank you and kind regards,

                                Hoi

                                Comment

                                Working...
                                X