首页 > 解决方案 > 使用 1 年期间识别季节性

问题描述

我有一个数据集,它代表从 2018 年 12 月起每月订阅的客户数量。我想检查我的数据中是否有海洋性,但是在 R 中出现错误。

    Month   Subs
1  201812   37551.17
2  201901   42144.39
3  201902   37466.42
4  201903   37568.11
5  201904   35271.50
6  201905   49453.71
7  201906   60640.16
8  201907   59835.07
9  201908   71657.11
10 201909   71911.35
11 201910   57962.19
12 201911   55538.46
13 201912   59423.75
14 202001   62707.65
15 202002   50034.92

R我已经完成以下提示时出现以下错误:

> myts <- ts(data = Data$DBRollOver, start =c(2018,12),frequency=12)
> fit <- stl(myts,s.window = "period")
Error in stl(myts, s.window = "period") : 
  series is not periodic or has less than two periods

有什么建议么?

标签: rtime-series

解决方案


推荐阅读