Announcement

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

  • #16
    Hi,

    I also used your code to create quarterly dates. But my issue to create a quarterly dummy variable with quarterly date is still a topic. I am doing a panel regression using a DiD approach. My event is the CSPP announcement by the ECB. I need to create a dummy variable that is equals 1 after the CSPP announcement, i.e., after Q1 2016.

    So far I tried this:

    gen post = quarterly_date2 >= qofd("2016q2").

    My quarterly_date2 has the storage type int and the format %tq. I tried another options, but I always receive the "type mismatch" information.

    So using your suggested code from above, how can I now create a dummy variable? I would really appreciate your help with this!



    Comment


    • #17
      See

      Code:
      help qofd()
      qofd() turns a numeric daily date into a quarterly date. Your input is a string version (which triggers the error message) of a quarterly date.

      yq(2016, 2) should be closer to your purpose than qofd("2016q2"), but I don't understand the economic and financial jargon in your post to be confident.

      Comment

      Working...
      X