How to conduct a regression for oscillating data?

179 Views Asked by At

I have a dataset of temperature over time, measured at the surface and below the surface of a rock at six different sites. My goal is to conduct a regression which demonstrates how closely the surface temperature follows the below-surface temperature at each site and then compare the sites. Seeing as my data oscillates between day and night, it does not seem appropriate to conduct a linear regression. Is there a relatively simple way to do this (perhaps in R)?

Graph of my data

enter image description here