Announcement

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

  • Production Function Estimation with levpet repeated time values error

    Dear All,

    I am trying to estimate a production function using the approach from Levinsohn & Petrin. For this, I installed levpet (st0060).

    Now, when I am trying to estimate the production function, I am receiving the "repeated time values within panel r(451)"-error. Interestingly, I am not receiving this error when I am using fixed or random effects regressions.

    Additionally, I checked for duplicates with "duplicates list id year", where stata returned that 0 observations were duplicates.

    Do you have any ideas what the problem could be?
    This is the code I used:

    tsset id year
    levpet lnrev, free(lnfte) proxy(lnmat) capital(lnkap) revenue

    Many thanks,
    Anton

  • #2
    Dear All,

    Just in case anyone is having the same problem in the future, it seems as if my id had too many digits and I was able to solve it as follows:

    egen newid = group(id)
    tsset newid year
    levpet lnrev, free(lnfte) proxy(lnmat) capital(lnkap) revenue

    Best,
    Anton

    Comment

    Working...
    X