Announcement

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

  • How to generate a high number of country - time dummies ?

    Hello everyone,
    To estimate a gravity model with panel data, I need importer-time dummies, which I tried to generate using:
    Code:
    egen impdate = group(importer date)
    tab impdate, gen (impmth_)
    However, I got the error “too many values” after the command "tab" because I have 238 importers over 56 months.
    Is there an alternative to creating such dummies?
    Thank you.

  • #2
    There's an easy workaround; include i.importer#i.time in your regression, no need to create anything.

    Comment


    • #3
      Thank you for the reply Maxence. Unfortunately, I will estimate the gravity model with the command "xtpqml", which does not allow factor-variable and time-series operators.

      Comment


      • #4
        In that case, dredge out the otherwise obsolete -xi- command. If you are not familiar with it, read -help xi-.

        Comment


        • #5
          Thank you for the solution. Best regards

          Comment

          Working...
          X