I am trying to understand what the STL time series function does and in particular how the trend is defined. When I am reading what is happening in the STL code, I get to the following line of code:
z <- .Fortran(C_stl, as.double(x), as.integer(n), as.integer(period),
as.integer(s.window), as.integer(t.window), as.integer(l.window),
s.degree, t.degree, l.degree, nsjump = as.integer(s.jump),
ntjump = as.integer(t.jump), nljump = as.integer(l.jump),
ni = as.integer(inner), no = as.integer(outer), weights = double(n),
seasonal = double(n), trend = double(n), double((n +
2 * period) * 5))
Here there is something happening regarding the trend, but it looks like that actual output is created in a piece of external code (C_stl). Any idea how I can get a full understand of what is happening when I pass my time series through this code?
Thanks,
Jochem
Yes, it is Fortran Code.
The code can be found in the sources: for example here.