I have three daily time series, each spanning 14 years: maximum temperature, total rain fall and number of deaths. My aim is to build an explanatory model of deaths rather than a model optimized for prediction.

I first ran the following generalized additive model (using mgcv in R) with smooths for each term as per the pseudo-code below. (My real model included a couple more weather variables and also included distributed lag, but I left this out for simplicity as I don't think it's relevant for the argument):

m1 <- gam(deaths ~ s(time) + s(temperature) + s(rain))

There was high pair-wise concurvity (> 0.80) in the model between all terms (especially those involving the smooth for time, which were > 0.90). (Concurvity is the non-parametric equivalent of collinearity in GLMs).

To address this, I used a GAM to regress each weather variable against time, removing seasonal and long-term trends from each weather variable as follows, taking temperature as an example. The ti term represents an interaction term:

m2 <- gam(temperature ~ s(year) + s(day_of_year) + ti(year, day-of_year))

I then used the residuals of these models as predictors of mortality as follows:

m3 <- gam(deaths ~ s(time) + s(temperature_residuals) + s(rain_residuals))

In the latter model, the smooth for time should now only pick up variability in mortality over time from (unobserved) variables such as changes in population size, demographic changes etc. To account for the fact that an increase in temperature during the hotter season might be harmful whereas in the colder season it might be beneficial, separate regression models were run for the hotter and colder season.

The above approach considerably reduced concurvity, so yay!

From an explanatory perspective, it has allowed me to assess the importance of temperature, rain and the various other weather variables in the model, which was my primary objective.

From a heat-health warning system perspective, however, it is useful to know the risk of death at different absolute (i.e raw) temperature levels. But given that I used temperature residuals as the predictor, I'm not sure if I can make any statements about that anymore.

My questions are as follows:

Q1: The range of raw temperatures is 24.9 to 43.3 (degrees Celsius). The range of the residuals is -8.2 to 5.4

Given that a temperature residual represents a deviation from the predicted temperature for one specific day in the 14-year time series, what is the interpretation of the curve of mortality (y-axis) against temperature residual (x-axis), i.e. when time is not represented in the graph? Specifically, what is the interpretation of the x-axis (temperature residual) here?

For the raw temperatures, the interpretation seems straightforward: "regardless of the time of year, a temperature of x results in y deaths (assuming our model allows causal inference).

I am thinking that the interpretation for the mortality-residuals curve is: "a deviation of x from the temperature predicted for that specific day in the 14-year time period results in y deaths". Is this correct?

Q2: If my interpretation above for the residuals curve is correct, it seems less useful from a heat-warning perspective. Is there a way in which the intercept of model m2 can be used to interpret the mortality - temperature_residual curve resulting from model m3?

(EDIT: or is there a way in which I could still draw some conclusions about the risk of death associated with absolute heat levels?)

  • $\begingroup$ stats.stackexchange.com/posts/320092/revisions might be of some help to you in trying to form a useful model . I think 14 years of daily data is a bit much as I would start simpler. $\endgroup$
    – IrishStat
    Commented Nov 24, 2022 at 16:23
  • $\begingroup$ Thank you for your comment. I'm not sure though how the source you refer to (or the sources linked therein), answer my questions above? I would appreciate if you could point out why you think the modelling is not appropriate? I'm also not sure why the length of the time series would make things simpler and impact on the interpretation of the use of residuals (which is really my question)? A longer time series provides greater statistical power, which in this case was useful as the modelled community is small. $\endgroup$
    – Jade
    Commented Nov 24, 2022 at 17:15
  • $\begingroup$ the large sample size CAN lead to false tests of significance. Residuals can affected by omitted structure such as anolmies which UNtreated can lead to more robustified models . LeveL shifts(Dterninistic time trends ( if untreated) can lead to model mispecification.. dditionally the error variance oftenb can be shown to be different from time range to time range .. often power transforms based upon the relationship between error variance and level of the series can be used BUT if the error variance changes irrespective of the level this implies the need to perform WEIGHTED ESTIMATION. $\endgroup$
    – IrishStat
    Commented Nov 27, 2022 at 21:15

1 Answer 1


a deviation of x from the temperature predicted for that specific day in the 14-year time period results in y deaths

I agree with this interpretation. Your approach seems sensible, but there is a strong assumption built into it: an unseasonably cold summer's day can be as deadly as a very cold winter's day. Is this reasonable? My guess would be no.

  • $\begingroup$ Thanks for the response. For the reason you point out, I actually analysed data separately for the hotter and the colder season. I'll edit my post to reflect this. $\endgroup$
    – Jade
    Commented Nov 24, 2022 at 21:51
  • $\begingroup$ Do you have any thoughts on the second question? Is there a way in which I could still be draw conclusions about mortality for absolute levels of temperature? $\endgroup$
    – Jade
    Commented Nov 24, 2022 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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