# How to analyze multiple time series, with multiple variables, non-stationary and with a trend in R?

I have 11 ten-year long time series, with the same monthly physiological and climatic data. All 11 time series have the same 6 variables that were collected from 11 different places simultaneously.

I am unsure if this can be best described as 11 multivariate time series or 11 groups of 6 univariate time series: sorry for the confusion with the terminology.

From the 6 variables, 4 are interdependent response variables (4 biological parameters that usually correlate and can be treated as response variables) and 2 climate variables corresponding to temperature and precipitation (these are also correlated and can be treated as explanatory variables).

The data is climatic and biological so, there is both marked seasonality and strong trends on the data (already decomposed them treating each variable from one of the eleven places as a single univariate time series).

What I want to do here is to explore and compare these time series in two respects: Firstly, I would like to analyze how the variables correlate for each of the 11 subjects (places actually), in other words, how those 2 climatic variables correlate to each of the 4 response variables and also how the 4 response variables correlate to each other. Secondly, I would like to compare the time series from all 11 different places. Forecasting is not necessary for me.

Is there an analysis technique, or a combination of techniques, that someone here could suggest me to study so that I can try to apply to my problem here?

All the more simple ones, with readily available online examples, seem inadequate for my case and the apparently more complex techniques, for multiple variables and more than two time-series, don't have examples with R packages and/or don't have detailed explanations for the usage of R package functions in complex cases.

I don't expect you nice folks to do my work for me but, any kind of advice is welcome since I don't have a long time to learn this but would like to do it properly.

Alternatively, perhaps such a complex analysis can be simplified to include only 1 response variable at a time and the 2 explanatory (climate) variables, if that would be easier to model even though less informative.

## 1 Answer

I would think state-space methods would be adequate for your purposes. There are several packages in R which you can use. I know best dlm and KFAS, both with good documentation. There is also a book documenting dlm. Altnough I have no experience with it, I think MARSS can also fit your task. It has a good user guide with ecological case studies that will perhaps inspire you.