楼主: jiao_taishan
9451 8

[问答] R做时间序列分析,decompose() [推广有奖]

  • 25关注
  • 4粉丝

教授

31%

还不是VIP/贵宾

-

威望
0
论坛币
9295 个
通用积分
272.4229
学术水平
7 点
热心指数
8 点
信用等级
4 点
经验
3402 点
帖子
524
精华
0
在线时间
1942 小时
注册时间
2009-9-21
最后登录
2024-3-10

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
decompose()中type参数为additive时,季节指数是怎么计算的啊?我只知道长期趋势是移动平均得到的。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:时间序列分析 Ecom pose 时间序列 comp

常用统计数据来源:中国统计月报,中国经济景气月报
沙发
jiao_taishan 发表于 2011-12-13 22:44:39 |只看作者 |坛友微信交流群
或者帮我看看后面两句话什么意思吧,就可以操作了
The function first determines the trend component using a moving average (if filter is NULL, a symmetric window with equal weights is used), and removes it from the time series. Then, the seasonal figure is computed by averaging, for each time unit, over all periods. The seasonal figure is then centered.
常用统计数据来源:中国统计月报,中国经济景气月报

使用道具

藤椅
waterhorse 发表于 2011-12-25 14:32:06 |只看作者 |坛友微信交流群
You have to apply centered moving average of order 12 (if monthly data) or 4 (if quarterly date) to get the trend-cycle pattern. Subtract the trend-cycle from the original data, the rest is seasoal component and irregular component. Seasonal component is the average of monthly data. For example, your data is a monthly one from 2009 to 2011, then the seasonal index for January is the average of January 2009, January 2010 and January 2011.
已有 1 人评分学术水平 热心指数 收起 理由
jiao_taishan + 1 + 1 正解

总评分: 学术水平 + 1  热心指数 + 1   查看全部评分

使用道具

板凳
jiao_taishan 发表于 2011-12-25 15:24:28 |只看作者 |坛友微信交流群
waterhorse 发表于 2011-12-25 14:32
You have to apply centered moving average of order 12 (if monthly data) or 4 (if quarterly date) to  ...
Thx,I have solved successfully thorough several attempt.
常用统计数据来源:中国统计月报,中国经济景气月报

使用道具

报纸
zippo414 发表于 2011-12-27 01:11:12 |只看作者 |坛友微信交流群
楼主是不是学Introductory time series with R呢?我也遇到了这个问题,按照3楼的说法好像也没解决,因为趋势项前后有缺失啊,比如月度数据,前6项与最后6项在求平均的时候缺失了。那么在求季节效应的时候用原来序列减去趋势项,缺失项怎么办?

使用道具

地板
waterhorse 发表于 2011-12-27 05:13:44 |只看作者 |坛友微信交流群
zippo414 发表于 2011-12-27 01:11
楼主是不是学Introductory time series with R呢?我也遇到了这个问题,按照3楼的说法好像也没解决,因为趋 ...
Ignore 缺失项, unless your time series is too short.

使用道具

7
jiao_taishan 发表于 2011-12-27 08:57:57 |只看作者 |坛友微信交流群
waterhorse 发表于 2011-12-27 05:13
Ignore 缺失项, unless your time series is too short.
是呢,我按三楼大侠说的做出来了
常用统计数据来源:中国统计月报,中国经济景气月报

使用道具

8
zippo414 发表于 2011-12-28 12:39:52 |只看作者 |坛友微信交流群
jiao_taishan 发表于 2011-12-27 08:57
是呢,我按三楼大侠说的做出来了
楼主能把你代码给我发一下么?回复就行,或者加我QQ21543849

使用道具

9
lsc989818 在职认证  发表于 2015-3-16 15:40:20 |只看作者 |坛友微信交流群
学习了,数据的长度对算法的结果肯定会有影响的

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-28 16:59