How to handle with multivariate time series?

Hello,

I have a pretty huge time series data. It is a matrix about 4000x2500 (4000 daily time series of sales gathered for 7years). After updating and changing file type to ts() I received a "large mts" data type.

It is a little bit problematic, because in whole functions which I want to use (connected for example with: cleaning the ts - tsclean(), tsoutliers(), calendar corrections - monthdays(), bizdays(), ets and arima forecasts and so on..) I get a errors like: "The time series is not univariate."

So, my question is: how to run such a functions in multivariate ts?

I've tried to use (in the example of usage of tsclean() and "mts data" is a data type in large mts):
sapply("mts data", FUN=tsclean("mts data")) or sapply("mts data"[1:2500, 1:4000], FUN=tsclean("mts data"))

and it also give a error:
"only univariate series are allowed" or "argument "x" is missing, with no default"

Do you have some directions how to handle with this problem?

What packages are you using?

There's an extensive guide to multivariate time series analysis in R using the MARSS package here:

My go-to for forecasting is Robert J Hyndman's forecast:
https://robjhyndman.com/hyndsight/forecast7-part-2/

1 Like

Thank you very much. I will try to use MARSS package. I didn't hear about it, but it seems to be a solution to my problems :slight_smile:

One more time: thank you! You are great!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.