Reputation: 47
The output of stl
is an object of class "stl" which includes a "multiple time series with columns seasonal, trend and remainder." I would like to only get the remainder part of the timeseries so I can plot the acf
and see if it resembles white noise. In RStudio, in the Data window the description of this time series reads as:
time.series:
..-attr(*,"dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr[1:3] "seasonal" "trend" "remainder"
How can I get just the remainder part of the timeseries? As you can tell, I'm quite new at R.
Upvotes: 0
Views: 166
Reputation: 26353
Try
out <- stl(nottem, "per")
head(out$time.series[, "remainder"])
#[1] 0.2665254 1.1097288 1.8429318 0.1348488 1.3517676 0.3064259
Example taken from ?stl
Plot
acf(out$time.series[, "remainder"])
Upvotes: 1