Announcement

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

  • Generating time series dummy for a pooled panel data

    Hi

    I am trying to estimate time series models for 13 different brand's on their sales and promotion variables. My promotion table is in short format. I shared an example from my data below.

    Promotion_ID StartDate EndDate Brand
    7992 8.01.2015 21.01.2015 A
    8298 1.01.2015 7.01.2015 D
    8299 1.01.2015 7.01.2015 B
    8335 5.01.2015 9.01.2015 C
    For modelling I need variables in long format like following. I need to write an if or case statement, but i couldn't figure how can create my variables in long format? Do you have any suggestion.

    Thank You Very Much
    Date D_Pro D_Pro_Start D_Pro_End
    1.01.2015 1 1 0
    2.01.2015 1 0 0
    3.01.2015 1 0 0
    4.01.2015 1 0 0
    5.01.2015 1 0 0
    6.01.2015 1 0 0
    7.01.2015 1 0 1
    8.01.2015 0 0 0
    9.01.2015 0 0 0
    10.01.2015 0 0 0
    11.01.2015 0 0 0
    12.01.2015 0 0 0
    13.01.2015 0 0 0
    14.01.2015 0 0 0
    15.01.2015 0 0 0
Working...
X