# TSAnalysis: time series analysis and state-space modelling

**URL:** <https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672>\
**Category:** Package Announcements\
**Tags:** statistics, time-series, machine-learning\
**Created:** [November 4, 2019, 1:04am UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672 "2019-11-04T01:04:45Z")\
**Posts on this page:** 10\
**Page:** 3

<div class="post-metadata">

**Author:** ![Salma\_Rodriguez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salma_rodriguez/32/12323_2.png) [@Salma\_Rodriguez](https://discourse.julialang.org/u/Salma_Rodriguez)\
**Post date:** [February 24, 2020, 10:51pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/41 "2020-02-24T22:51:54Z")

</div>

I have been following this discussion thread. A time series analysis package for Julia would be an excellent addition to the Julia community!

As I have it understood, there are packages in Julia, like TimeModels.jl under JuliaStats, but nothing specific to time series, as you are doing, @fipelle.

Thank you, and I am very much looking forward to this 😃 .

---

<div class="post-metadata">

**Author:** ![Salma\_Rodriguez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salma_rodriguez/32/12323_2.png) [@Salma\_Rodriguez](https://discourse.julialang.org/u/Salma_Rodriguez)\
**Post date:** [March 4, 2020, 3:34am UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/42 "2020-03-04T03:34:21Z")

</div>

@fipelle Is there any way you could provide an “auto.arima”-like function, as can be found in R?

I did not like how after running an MCMC on my differenced time series data, I wasn’t getting the results I was expecting. Sometimes, the “standard error” doesn’t apply, in which case, I can always try a Student’s T random variable, with more degrees of freedom, yet…

It’s tough getting the right p, d, q parameters. I have already plotted the correlograms and found some seasonal behavior in the data. Should I try a periodogram also? For reference, I was following this online guide: [ARIMA Models with Turing.jl. Using the Probabilistic Programming… | by Saumya Shah | Towards Data Science](https://towardsdatascience.com/arima-models-with-turing-jl-81dcf2a1094c).

---

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [March 4, 2020, 3:56pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/43 "2020-03-04T15:56:13Z")

</div>

Sure. There are different ways to do it. For instance, you could use the techniques I described in my latest paper. I think I will implement something similar and based on implementations in [GitHub - fipelle/replication-pellegrino-2022-hyperparameters: Elastic-net VARMA: hyperparameter optimisation, estimation and forecasting](https://github.com/fipelle/ElasticNetVAR.jl). I will also try to add a version of the Politis and Romano’s stationary bootstrap.

I am afraid it won’t be in the next release. As you can see in the dev branch I am currently working on implementing the VARIMA. I will do it, once this is in production. Would you mind adding an issue on the git page?

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [March 4, 2020, 5:51pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/44 "2020-03-04T17:51:13Z")

</div>

Sounds like great progress. I look forward to test driving your VARIMA.  
Btw, it would be awesome if @ some point it can be extended to [VARFIMA](https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_varmax_details72.htm%3Flocale&docsetVersion=14.2&locale=en).

---

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [March 4, 2020, 6:54pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/45 "2020-03-04T18:54:46Z")

</div>

That’s great!

Before getting into fractional methods I think it would be a good idea to implement state-space approaches to model seasonality and other features in the data (jointly with the VARIMA). I did not see many packages around that allow for these hybrids.

---

<div class="post-metadata">

**Author:** ![Salma\_Rodriguez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salma_rodriguez/32/12323_2.png) [@Salma\_Rodriguez](https://discourse.julialang.org/u/Salma_Rodriguez)\
**Post date:** [March 5, 2020, 12:55am UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/46 "2020-03-05T00:55:02Z")

</div>

Not a problem. I can do this.

---

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [March 15, 2020, 8:32pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/47 "2020-03-15T20:32:19Z")

</div>

You can start the test drive by adding the dev version of TSAnalysis via `]add TSAnalysis#dev`.

I am finishing the debugging. I will register the new version soon enough.

Note: the readme in the dev branch explains how to use the VARIMA functions.

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [March 15, 2020, 10:08pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/48 "2020-03-15T22:08:56Z")

</div>

Looks really cool! Rn I only have time to test out the examples in the readme.  
Quick question, in

```nohighlight
Y = Y_df[:,2:end] |> JArray{Float64};

```

what does JArray do?

---

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [March 16, 2020, 12:54am UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/49 "2020-03-16T00:54:46Z")

</div>

It is just a lazy alias:

```julia
const JArray{T, N} = Array{Union{Missing, T}, N};

```

I am using it to refer to data with (potentially) missing observations.

---

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [December 10, 2021, 9:24pm UTC](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/50 "2021-12-10T21:24:52Z")

</div>

I have noticed that people are still following / liking this old post. I just wanted to stress that the package was renamed to `MessyTimeSeries` as described in [https://discourse.julialang.org/t/messytimeseries-jl-and-messytimeseriesoptim-jl](https://discourse.julialang.org/t/messytimeseries-jl-and-messytimeseriesoptim-jl).

[Previous page](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672.md?page=2)
