Model/explain a time series as a function of other time series - R I have six time series, all made of daily historical data. All of them cover the same period and the same days, they are all about 2700 days long.
I want to explain one of the time series as a function of the other five, every day; i.e. for each day "i" I'd like to obtain a functional relationship of this sort:
ts1_i = f(ts2_i, ts3_i, ts4_i, ts5_i, ts6_i)

I am not sure what method or approach is more adequate for doing so, and if I should use machine learning techniques (I am new on it). 
As a starting point, I have performed PCA analysis on the entire data set of six time series, and rank correlation tests for each pairs.
(PS: I use R, it would be great to have suggestions about R functions and packages)
 A: The simplest model I can think of for this problem is ARMAX, which is a bit like an ARMA model with exogenous parameters stuck on the end. However, there doesn't actually seem to be a direct implementation of these models in R.
Rob Hyndman (who occasionally posts here) has a nice blog post describing these models. As Rob points out, ARMAX is a special case of the transfer function model mentioned by Tom Reilly. In fact, the TSA package has a function called  arimax, which actually fits transfer functions under the guise of ARIMAX.
A: Box-Jenkins laid out an approach to do this in their text book published in 1970 called "Transfer Function modeling".  In short, you build a model for each causal and then use the residuals to find correlation with the Y variable.  Don't forget to look for outliers too as they exist.
A: Before you toss your time series into arimax, make sure you check if they are stationary. This is a crucial assumption for time series regression. If some of the time series on the RHS are $I(1)$, you'd get meaningless result, the so-called spurious regression in the econometrics literature. 
You can see it with a few lines of 'R' codes. Try use the S&P 500 for $y_t$ and Nasdaq for $x_t$.
$y_t = \alpha + \beta x_t + \epsilon$
As you toss in more and more data, the regression R squared gets better and better. In fact, as $N \rightarrow \infty$, the p-value of your coefficient approaches zero and your $R^2$ approaches 1.
This is a famous paper :
Phillips, P. C. (1986). Understanding spurious regressions in econometrics. Journal of econometrics, 33(3), 311-340.
