Announcement

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

  • Hi Gabriele Rovigatti,
    Thank you for the useful prodest command.
    Currently, I am estimating the production function at sector level using GMM method of Wooldridge(2009). However, my dataset does not include information on Material, but I do have investment data. So my question is: Can I use ln investment as proxy variable in prodest command?
    I have used this code:
    Code:
    xtset newid year
    set more off
    statsby _b, by(isic2) saving(WRDG_prod, replace): prodest lnva, free(lnl) state(lnk) proxy(lninv) met(wrdg) control(year) va acf attr
    Also, as i already defined id and time in xtset command, do I need to add id(varname) and t(varname) in the prodest command?

    Thank you so much and I look forward to having your response.

    Best regards,
    Yen

    Comment


    • Dear Gabriele,

      like others, I also want to thank you for your great package.

      I've got a question on the control argument in prodest. I want to include dummies for firms and years.
      When only including dummies for firms, I've found 2 of your already posted solutions:
      1) tab idnr, gen(idnr_) and use idnr_* in the control argument in prodest
      2) xi: prodest ..., control(i.idnr)

      The second one works (coefficients and cluster robust standard errors are provided for output and input variables and some other controls). The first one does not (for some inputs and other controls, the standard errors are not provided. Dropping one firm dummy to include it in the baseline, does not change the result). Shouldn't both options provide the same results?

      When using alternative 2 to add some year dummies (or add them by tab year, gen(year_) and including year_* as controls), even more standard errors vanish.
      Is this due to some collinearity?

      best

      Comment


      • Hi Yen Ng and Philipp Steinbrunner ,

        let me answer your questions below:

        @Yen: the question on investment used as proxy variable pertains to methodological issues that I am not eager to answer within a Statalist post. As a matter of fact, though, I just remark that the use of investment proxy dates back to the Olley and Pakes method, and already Levinsohn and Petrin moved forward and highlighted all the issues implied in such a choice. Second, you don't have to specify id() and t() once you have xtset your panel data.

        @Philipp: unfortunately, I am not able to help without looking at the code and/or the data: would you consider sending me an email ([email protected]) with a reproducible example? Sorry not to be able to help.

        Best,

        Gabriele
        Last edited by Gabriele Rovigatti; 28 Aug 2020, 01:19.

        Comment


        • Thanks. You should have got it now.

          Comment


          • Thanks Gabriele.

            Comment


            • Dear Gabriele,
              First, let me thank you for writing this extremely helpful routine. I have a few questions, and I shall be grateful to you if you could answer.

              1) Is it possible to see somehow see the estimate of the constant term?
              2) If I am not mistaken, somewhere in this forum, you have mentioned that the constant term is estimated, but for some reason it's not reported. Which implies that if I put a variable with just ones in it in control(), it should get dropped due to perfect collinearity. However, I do get an estimate for this variable with ones in it. I am wondering if I am missing something.
              3) Also, while OLS or Random Effects estimators drop certain dummy variables due to collinearity, prodest still gives estimates for dummy variables that are dropped by the Random Effect/OLS estimator.
              4) I use the endogenous option and I am wondering if it would be possible to see the estimate of the function, g, where the function g is defined as omega_{it} = g(omega_{it-1}, a_{i.t-1}) and where a_{i.t-1} are variables that affect productivity.

              Again, l would be very grateful, if you could reply.

              Best wishes
              Amaresh

              Comment


              • Dear Amaresh,

                I am glad that you found prodest useful.

                Below I try to answer your queries:

                1) The constant of the first-stage is unreported by the command, but you might make it visible by deleting "qui" at line 551 of the adofile - which would report the results of the first-stage in full on your screen
                2) The variable with just ones in it would be dropped in the first-stage, but would be correctly included in the GMM second-stage estimation. Hence, you'd find a result for it, too.
                3) As already said, the estimation in 2 steps proceeds by excluding variables collinear to the constant in the first-stage, but keeps them in the second stage.
                4) At the moment the option printing omega is not yet implemented in prodest.

                I hope to have clarified,

                Gabriele

                Comment


                • Dear Gabriele,

                  Thank you very much for such a useful command prodest! I have one question regarding the estimation. I estimate TFP by industry in a loop and include year and industry controls. Because I estimate it by industry, all other industries except the one being estimated are dropped, hence controls for industries should be omitted. However, prodest still reports coefficients on industry controls. When I estimate TFP just using fixed effects xtreg command by industry including year and industry dummies, industry coefficients are omitted in the output table as expected. My question is whether something is wrong with my syntax or why the command reports coefficients that should be omitted?

                  For the convenience I attach the minimum example and below is the code I am using.

                  xtset id year

                  //generate industry controls
                  tab industry, gen(di)
                  //generate year controls
                  tab year, gen(dy)

                  //Estimate TFP by industry including industry and year controls
                  gen pr = .
                  levelsof industry, local(levels)
                  foreach i of local levels {
                  preserve
                  keep if industry==`i'
                  prodest va, free(l) proxy(m) state(k) level(95) acf va poly(3) control(dy* di*)
                  restore
                  predict prod_`i', resid
                  replace pr = prod_`i' if industry==`i'
                  }

                  //using xtreg
                  gen pr_fe = .
                  levelsof industry, local(levels)
                  foreach i of local levels {
                  preserve
                  keep if industry==`i'
                  xtreg va l k dy* di*, fe
                  restore
                  predict prodfe_`i', resid
                  replace pr_fe = prodfe_`i' if industry==`i'
                  }


                  I would very much appreciate your help. Thank you in advance.

                  Best,
                  Alina
                  Last edited by Alina Mulyukova; 09 Feb 2021, 05:30.

                  Comment


                  • @Gabriele Rovigatti Dear professor:
                    I am so appreciated for your reply, and it did solve my problem. Thanks a millions

                    Comment


                    • I like the prodest command , but stata returns no observations or error 200 when when I run "prodest" with the "acf" or "wrdg" options. Stata produce result when I use "op" or "lp" options without "acf". Can any one help me? Thank.

                      Comment


                      • Dear Gabriele, Thank you producing the very helpful command, prodest. I am using it to estimate TFP but stata returns with no observations error when I include the "acf" option or when I use the the "wrdg" or the "rob" methods. Thanks.

                        Comment


                        • Dear Gabriele

                          I use the endogenous option to endogenise omega_{it}, and a_{i.t-1} is the variable I specify in the endogenous option. The expected value of omega_{it} given omega_{i.t-1} and a_{i.t-1} is given by g(omega_{it-1}, a_{i.t-1}). It seems to me that g(.) is a polynomial function of omega_{i.t-1} whereas a_{i.t-1} enters linearly. Also, how would it possible to see the coefficient of a_{i.t-1}. I shall be grateful to you if you could reply.

                          Best wishes
                          Amaresh

                          Comment


                          • Gabriele Rovigatti

                            Hi Gabriele, is there a way to impose constant returns to scale for a translog production function using prodest?

                            Best
                            Giorgio

                            Comment


                            • Giorgio Presidente Ciao Giorgio, currently, there is no way to impose CRS for translog models in prodest. However, the way to go is by adding the desired constraints (which should be sum(parameters) = 1, or something like that) to the "opt_mata" mata function that you can find at the end of prodest adofile. In particular, the optimize_init_constraints( CONSTRAINTS ) could do the trick.

                              jemal adem Hi Jemal, I am not sure how to address your question without looking at the data. My best guess is that you might have some issue with missings in your dataset - however, that would not square with the fact that apparently it works with LP and OP methods. If interested, you may send a sample of the data to [email protected]

                              Amaresh Tiwari see the reply to your email

                              Comment


                              • Gabriele Rovigatti Ciao Gabriele, thanks for the quick reply.

                                I am using a 3 factors translog production function and 2 control variables in control(). The following code seems to work (I report the last lines of prodest adofile):

                                ... ...
                                optimize_init_which(S,"min")
                                optimize_init_params(S,init')

                                C = (1,1,1,0,0,1,1,1,1,1,1)
                                c = (1)
                                Cc = (C, c)
                                optimize_init_constraints(S,Cc)


                                p = optimize(S)
                                st_matrix("r(betas)", p)
                                }

                                /*---------------------------------------------------------------------*/

                                end

                                My question is, can you suggest a better way to specify C, so that I do not have to change it every time I change the specification of the production function?

                                Thanks!
                                Giorgio

                                Comment

                                Working...
                                X