I'm trying to create a simple regression model from time to outside temperature. Obviously there will be some relationship since it is colder at night than during the days (mostly anyways), only how can I make this model?
The time of the day is in hours and runs from 0 to 23, but obviously 23:00 is very near to 0:00 but not when looking at the difference in numbers. How can I change the time notation to reflect actual time difference? So 22 hours and 19 hours have a difference of 22-19=3 hours, and 23 hours and 0 hours have a difference of 1, but when calculating the difference you get 23-0=23 which isn't correct. This will have a big influence on the regression model. We use modular arithmetic in daily life, but can you use it in a regression model? What do you suggest?
N.B. if you think a regression model won't work but an other statistical model will, that's also fine. I'm just looking for a model that measures the goodness of fit (like $R^2$) for time and temperature.