Data: I have monthly temperature data for 90 years along with a climate index ('pdo') that influences temperature.

  • Scientific question: is there a linear trend in temperature across time?

I've fit the following models using the gls() function in R:

temp ~ I(year - 1950)
temp ~ I(year - 1950) + factor(month)
temp ~ I(year - 1950) + factor(month) + pdo
temp ~ I(year - 1950) + factor(month) + pdo + factor(month):pdo


  1. Each subsequent model does better (has a lower AIC), but are these subsequent models necessary given my question?

  2. How necessary is it to account for these other variables? How necessary is it to include interaction terms??

    • Sure they create better models, but do they change or improve the way I interpret the coefficients?
  3. Does the fact that I'm using time variables as predictors affect my approach here? Does an interaction with month even make sense?

  4. I assume if the added variables are not significant, then I do not choose that more complicated model. what if only some of the categorical variables are significant -- do I remove those that are not?

Note: I understand I also have to account for temporal autocorrelation to get accurate p values.

  • $\begingroup$ Am I obligated to include interaction terms if I'm disinterested in their trends explicitly even if the model that includes them is better (lower AIC)? $\endgroup$ Mar 4, 2016 at 22:10

1 Answer 1


I agree with you added interaction terms may not necessarily mean better interpretation. I usually add interaction terms when i can interpret the model or if i am getting significant gain in accuracy. You can go through following 2 tutorial they may be relevant to you on the topic.





Your Answer

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

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