How can I build a time variable into my model?
I am building a model in SAS and I want to use time of day as a way to predict Y. "Are people more willing to pay for something based on what time of day it is?" I expect people are more willing to pay for something at different parts of the day so it would not be linear. In other words, willingness to pay might spike at several points in the day with some predictive regularity.
Model: y=TimeOfDay + DayOfWeek
My approach thus far:
For example 3:45am could be converted into the exact minute of the day which would be 225 (3 x 60 + 45 = 225). Midnight = 0. 12:01am = 01.
Would this be a correct approach? I am not a statistician or am I greatly familiar with SAS.
Thank you,
I am building a model in SAS and I want to use time of day as a way to predict Y. "Are people more willing to pay for something based on what time of day it is?" I expect people are more willing to pay for something at different parts of the day so it would not be linear. In other words, willingness to pay might spike at several points in the day with some predictive regularity.
Model: y=TimeOfDay + DayOfWeek
My approach thus far:
For example 3:45am could be converted into the exact minute of the day which would be 225 (3 x 60 + 45 = 225). Midnight = 0. 12:01am = 01.
Would this be a correct approach? I am not a statistician or am I greatly familiar with SAS.
Thank you,