The title may be entirely inappropriate for this question: that depends on whether I am on the right track. I am developing a statistical model to evaluate flower temperature based on air temperature. I'm not very good at anything statistics related, but I'm decent in programming in Python so I was thinking of building a linear regression in there.
However, I have difficulties figuring out how to build my regression and whether even a linear regression is a good choice at all.
The following plot shows how temperature and flower data varies with the time (Month-day Hour).
The black line = Air temperature.
The coloured lines = various flowers whose temperatures were measured.
Perhaps important, but I can't figure out how to make use of them: the arrows at the top show the wind and direction, while the blue line shows the incident solar radiation.
The y-axis shows the temperature (in Celsius) while the x-axis shows the time.
If I were to compute a linear regression, it would have to be valid for any hour of the day, hence I can't just evaluate how the flower temp varies with the air temp, because a 20 degree air temperature at 1 pm won't give out the same flower temperature as a 20 degree air temperature at 1 am. I tried separating night and day (day varies in between 6 am-7 pm), but even then the results were too chaotic.
After reading this post: Is time of the day (predictor in regression) a categorical or a continuous variable?, I thought maybe that using a categorical approach would work, but I am getting from this is that I would have 24 different equations for each hour of the day, which seems a bit much. I suppose that I am prepared to attempt such an approach, but I was hoping to get some advice before pressing on?
Perhaps I should simply use solar radiation instead of the time? But even then, the shape is periodic and I have no idea how to integrate a periodic component within a linear regression!