I was trying to do some time series analysis. In R, there is a decompose
function that can decompose a time series into trend, seasonality, and random noise.
Is there an equivalent in Julia?
I was trying to do some time series analysis. In R, there is a decompose
function that can decompose a time series into trend, seasonality, and random noise.
Is there an equivalent in Julia?
https://github.com/baggepinnen/SingularSpectrumAnalysis.jl does this, but in a perhaps slightly different way than what you are looking for.
It’s not clear how to do it from the readme. Feels like it’s not beginner friendly yet and it requires much higher level of maths and skills to understand.
Sounds like an idea for a new package?
R implements holt winters method. This paper may be helpful.
Time for a time series person to step in! I thought Julia sells alot to wall st. And they do time series alot. My needs are met by R for now. Data so small that I can just do it without thinking about performance
I don’t think a package to run this regression in what makes them choose programming language, tbh Also, Julia doesn’t sell anything, Julia Computing does.
I asked a similar question a while ago, and apparently there isn’t any. I have implemented Hamilton (2017) for detrending, and plan to release it soon. I also came up with a simple multilevel model-based deseasonalizer that seems to work surprisingly well, but that is still experimental.
As I said in the other topic, most of these methods introduce spurious patterns, especially for the “trend”. Deseasonalizing with sophisticated algorithms (STL or X13-ARIMA-SEATS) is also prone to this, to a smaller extent. But of course they are OK for exploratory plotting, one just has to be aware of this.
if times is what you do then yeah.
My point is that they are probably able to build their own code base where something like this enters as a component, rather than relying on some public open source compromise. Of course if there’s a great solution out there they might use it, but it won’t hold them back.
Has the landscape changed on this? I’m looking for the same thing and can’t find a solution that doesn’t involve using R : (
I added some additional documentation here
https://github.com/baggepinnen/SingularSpectrumAnalysis.jl#simple-usage
Let me know whether or not it works for you, I might be able to add more functionality if you miss something
Thanks!
@baggepinnen Everything works great but it doesn’t look like the package is exporting a fit_trend
function as indicated in the docs (I get UndefVarError: fit_trend not defined
). Running names(SingularSpectrumAnalysis)
yields the following output:
11-element Array{Symbol,1}:
:SingularSpectrumAnalysis
:analyze
:autogroup
:elementary
:hankel
:hankelize
:hsvd
:pairplot
:pairplot!
:reconstruct
:sigmaplot
Thanks! First try to update your packages: ] up
If that does not work, try ] add SingularSpectrumAnalysis#master
. I just added the functionality so it might not have made it into the registry yet
ah, got it. Thanks again!
STL in R has always been my go-to function for timeseries decomposition. I think I can safely replace that now. Thanks for making this package.
Hi,
I just released the first version for TSAnalysis (https://github.com/fipelle/TSAnalysis.jl). It is a rather small package (at least, for now) but it can be used to decompose time series into trends, cycles and other components using linear state-space models.
I added an example with seasonality in the GitHub readme. I hope this can also help!
SingularSpectrumAnalysis has been updated to support use of the robust factorizations provided by TotalLeastSquares.jl. It should now be able to handle extremely large outliers and missing data quite well.
It would be great if someone could make X13ARIMA-SEATS, public domain Fortran that the government uses for seasonal adjustment, available in julia:
That someone could be you
If the code is public domain you can just port the whole thing, alternatively consider writing a Julia wrapper around the FORTRAN library