【问题标题】:Index / subset time series object with multiple columns具有多列的索引/子集时间序列对象
【发布时间】:2018-11-26 03:28:50
【问题描述】:

stl 的输出是“stl”类的对象,其中包括“具有季节性、趋势和剩余列的多个时间序列”。我只想获取时间序列的其余部分,以便绘制acf 并查看它是否类似于白噪声。在 RStudio 中,在数据窗口中,这个时间序列的描述如下:

time.series:
..-attr(*,"dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr[1:3] "seasonal" "trend" "remainder"

我怎样才能得到时间序列的剩余部分?如您所知,我是 R 的新手。

【问题讨论】:

    标签: r time-series


    【解决方案1】:

    试试

    out <- stl(nottem, "per")
    head(out$time.series[, "remainder"])
    #[1] 0.2665254 1.1097288 1.8429318 0.1348488 1.3517676 0.3064259
    

    示例取自?stl

    剧情

    acf(out$time.series[, "remainder"])
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-05
      • 1970-01-01
      • 1970-01-01
      • 2014-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多