Announcement

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

  • Format date in regression

    Hi all,

    Perhaps a simple answer to this question but I can't seem to find an appropriate answer to it.
    I want to run a regression with time fixed effects. My data contains a variable date, e.g. 26th July 2016. By means of
    Code:
     gen quarter_of_year = qofd(transaction_date)
    , followed by
    Code:
     format quarter_of_year %tq
    When I look at my data, the date will be correctly displayed as 2016Q3. However, when using this variable in a regression using i.quarter_of_year, I seem to lose the format and Stata reports the "number of the quarter of the year" and its coefficient. Does anyone know how I can make sure that in my regression coefficients are report with for ex. 2006Q3 instead of the number of this quarter?

    Thank you in advance!

  • #2
    A lot of digging in this forum later, I found a solution. If anyone wonders how to fix see post #8:

    https://www.statalist.org/forums/for...erie-variables

    Comment

    Working...
    X