I had 4 groups of data (in color 1 to 4) and one group is the data for one day, so I had 4 days of data. I was trying to fit a line which describes the pattern of theses lines (oscillating pattern) and do some prediction for the behavior on the fifth day. What I have in mind is lm(~poly(x,,)) or auto.arima(), which only needs one day of data. Is there any way to use all my data for fitting? What would be a more appropriate statistical model to use? Any help would be appreciated. Thanks.