# How fit a regression model with two time series

I want to assess the effect of temperature on fish mortality. Both variables are time series, so the residual will be autocorrelated. Is there a regression method to deal with that?

-
One approach is prewhitening –  Glen_b Feb 20 '13 at 4:08
@StephanKolassa My comment (i) is giving a link not present in that answer, (ii) giving a search term not present in that answer, and (iii) acts as confirmation for the OP that this approach is not something that the answerer just pulled out of the blue. But if you really think that it adds nothing whatever, I can delete it. –  Glen_b Feb 20 '13 at 22:09
@Glen_b: maybe I am misunderstanding your comment, or maybe you are misunderstanding my comment... I was not claiming your original comment was a subset of the answer already posted below - I wanted to suggest that you post your comment as an additional answer. Sorry for the confusion. –  Stephan Kolassa Feb 20 '13 at 22:22
@StephanKolassa Oh, my apologies. I did indeed misunderstand you. It struck me as a little brief for an answer, especially when there was overlap with the answer already given. Edit - now put as an answer. –  Glen_b Feb 20 '13 at 22:24

You have to remove the auto-correlation from both variables calculating the auto-correlations from each variable at different lags Newx = x-Rho*x Good luck

-
Thanks, I'll try that. –  Rafael Feb 20 '13 at 3:29
@TOM is suggesting a procedure called double-prewhitening which can be useful to suggest which variable is "causing" the other. Ultimately one prefers the single pre-whitening, generating Impulse response weights as it doesn't distort the identification of the Transfer Function Model. Care has to be taken to deal with Pulses, level Shifts, Seasonal Pulses and/or Local time trends in forming a useful model Addditionally one needs to be concewrned with time changing parameters and time-varying error variance. Pursue (automatic) Transfer Function identification –  IrishStat Feb 20 '13 at 23:21

One approach is prewhitening. (I believe this is essentially the same suggestion @Tom is making, but it helps to have the jargon term to use in searches, and a link where you can read about it.)

-