I have two time series; (1) with average daily temperature (which is negative in Q1 and Q4 on some days) and (2) gas consumption of a client:

enter image description here

A part of the process I am trying to achieve is to calculate the relationship between gas consumption and temperature. I expect the consumption to be higher on average when it's colder. How shall I calculate the correlation between the two series?

I can check the correlation between the absolute values of temp in deg.C and gas consumption, the correlation between the log (temp,t-1 / temp,t) & log(consumpt,t-1 / consumpt,t), or either of the options with the temperature in Kelvin. Every method gives a substantially different result and I do not know which is correct. Any input would be helpful.

  • 1
    $\begingroup$ start with the scatter plot of temperature vs consumption, these are stationary. you may want to look at simple differences too. once you look at the scatters it'll give you an idea as to whether linear correlation makes a sense or not $\endgroup$ – Aksakal Sep 15 '17 at 19:45
  • $\begingroup$ What are my options if the scatters don't show that linear correlation makes sense? The data I have produces the following scatterplot link, which I think has two regions of linearity. $\endgroup$ – Dave R Sep 22 '17 at 17:47
  • $\begingroup$ the scatter is beautiful, looks very linear to me, with some threshold $\endgroup$ – Aksakal Sep 22 '17 at 19:54
  • $\begingroup$ Words of caution: kdnuggets.com/2018/06/… and researchgate.net/post/… $\endgroup$ – Tim Jul 17 '18 at 20:33

Assuming temperature (degrees celsius) on the x-axis, consumption on the y-axis, There is a clear floor effect, the gas consumption cannot be negative, and abobe about 15/16 C the consumption levels out. Before the levellng the relationship is linear. So I would consider first a broken-line linear regression rather than a correlation (with the restriction that the above-cutpoint linear part has slope zero, and maybe even a lover error variance).

For the broken-part model see Model broken stick model in R where one line has a constant gradient?.

  • $\begingroup$ Your assumptions regarding the axis are correct. The broken-part model is a good lead, thanks $\endgroup$ – Dave R Aug 4 '18 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.