Dear all
I have a time variable (DateHour) in my panel data and I am seeking suggestions on how to properly include this variable in the regression.
Regression one:
I treat time variable as continuous and add c. before my time variable:
reg depvar var c.DateHour
Regression two:
I generate four separate variables for Year, Month, Day, Hour, and include the interactions of these four variables in the regression as below:
reg depvar var Year#Month#Day#Hour
My goal is to control for unobserved price which changes over each hour and affects my dependent variable.
Thank you for suggestions.
CHT
I have a time variable (DateHour) in my panel data and I am seeking suggestions on how to properly include this variable in the regression.
Regression one:
I treat time variable as continuous and add c. before my time variable:
reg depvar var c.DateHour
Regression two:
I generate four separate variables for Year, Month, Day, Hour, and include the interactions of these four variables in the regression as below:
reg depvar var Year#Month#Day#Hour
My goal is to control for unobserved price which changes over each hour and affects my dependent variable.
Thank you for suggestions.
CHT
Comment