mi serie temporal es obviamente periódica, pero la descomposición estacional usando stl () no funciona en R:
a <- c(6.7, 20.3, 23.5, 7.9, 3.3, 2.0, 2.5, 2.9, 2.3, 5.0, 15.0, 20.1, 27.0, 28.2, 18.3, 7.8, 1.6, 0.8, 1.3, 1.2, 0.6,
1.6, 4.9, 24.2, 28.8, 23.6, 18.6, 5.3, 1.8, 0.4, 0.5, 0.2, 0.1, 0.3, 3.5, 17.6, 26.1, 22.7, 18.2, 7.2, 2.1, 1.0,
1.1, 1.4, 0.7, 3.2, 7.6, 22.3, 30.4, 26.5, 23.2, 8.6, 4.3, 1.5, 1.7, 2.4, 0.9, 3.0, 8.0, 21.9, 25.9, 25.6, 25.2,
13.1, 5.4, 2.2, 2.8, 2.7, 1.9, 5.1, 12.4, 28.4, 27.8, 22.2, 21.1, 13.6, 6.1, 4.0, 3.7, 4.5, 3.6, 6.3, 11.1, 25.0,
31.1, 24.5, 22.1, 10.9, 5.2, 2.6, 4.4, 4.1, 3.1, 7.0, 17.3, 25.5, 30.1)
a.ts <- as.ts(a, frequency=12, begin=c(1980,1))
stl(a.ts,s.window = "periodic")
Salida:
> stl(a.ts,s.window = "periodic")
Error in stl(a.ts, s.window = "periodic") :
series is not periodic or has less than two periods
Mi objetivo principal es eliminar la estacionalidad de la serie temporal.
r
time-series
seasonality
Daniel Ryback
fuente
fuente