Multivariate time series analysis

I ma trying to fit a multivariate time series analysis : here is a sample data

date            country   sale
1/01/2018   USA      381
2/01/2018   USA      818
3/01/2018   USA      108
1/01/2018   UK        381
2/01/2018   UK        818
3/01/2018   Uk        222
1/01/2018   Hun     381
2/01/2018   Hun     818
3/01/2018   Hun     233
1/01/2018   Li          381
2/01/2018   Li          818
3/01/2018   Li          233

I want to implement multivariate analysis for this time series, here I have two variables as country and sale. so I need to predict for next 2 years based on values.

I found "tsibble" and "fable" could do this but unable to install "fable", am getting error as"
"Error: package or namespace load failed for ‘fabletools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):

  • namespace ‘tidyr’ 0.8.1 is already loaded, but >= 1.1.0 is required*
    Error: package ‘fabletools’ could not be loaded"

Any help on the above

It's this a question about time series analysis, or about the fable error that you are getting?

Start with solving the tidyr version error. Run install.packages("tidyr") to get the latest version.

Then try ch 5 here

1 Like

Its about time series for multivariate analysis, but found a solution based on "fable". So tried that but got error, hence provided that error message. But ultimate goal is to build a multivariate time series model in R. Any example or idea would help.

Thank you Jeremy, installed fable now, will explore. Any example or idea would help.

I have not tried this, so I cannot vouch for its validity, but this looks like it might be what you want

There is not much else I can do to help. Hopefully this gives you enough to get started.

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.