Announcement

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

  • How to regress with seasonality dummy variables

    Excuse my perhaps dumb question, however I have a dataset consisting of daily crime date and weather data, in order to test if climate change can have an impact on crime. Given that my date is influenced by time varying factors, like day of the week, month of the year etc. i have created dummy variables to account for time varying influences on crime. However my question is, how would you regress with all of these temporal binary controls, given that there 6 dummy variables for day of the week, and 11 for month of the year? Is there a way to account for these time varying influences?

  • #2
    Elaine:
    the best approach that springs to my mind is creating one categorical variable for each temporal controls (ie, days; months; years) and use -fvvarlist-.
    That said, I wonder whether all this detailed temporal controls are actually useful as predictors: I would probably stick with months and years.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Just a side note after Carlo's helpful advice.

      Maybe a time-series approach could fit in your needs.

      There is a whole Stata Manual on this topic. Depending on the study design, you may include seasonality, moving averages, stationarity, rolling window, etc.
      Best regards,

      Marcos

      Comment


      • #4
        Another option might be to include means as controls (e.g., daily mean, monthly mean).

        Comment

        Working...
        X