全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3596 2
2010-01-19
我有一份project急着要交,但有没有什么头绪,请大家帮帮忙告诉我应该怎么做!!
project给了一组季度烈酒的卖出(Quarterly Sales of Alcoholic Spirits)数据,整篇用R来做数据

1,build a time series model
      首先是要用R建模
2,  deciding which model to fit
       决定用哪个model(ar?, ma?, arma??)
3,some of the data at the end of series, the length of, say, give 4 or 5 reasons, should held back and the data at the model is to be fitted the earlier part .
      给出4,5个解释, 数据的尾部的一部分长度为什么会抑制,和model为什么拟合前面部分??
4,forecast using the fitted model  
       用拟合模型预测
5,to demonstrate the capability of the model.
       证明model 的性能/容量

我现在不知道要怎样选用哪个model? 具体要怎么做??有人能告诉我如何分析的步骤么??
谢谢!!!
附件列表

spirit script.txt

大小:1.28 KB

 马上下载

二维码

扫码加我 拉你入群

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

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

全部回复
2010-2-7 03:42:05
1# snowcat731

You can calculate autocorrelation and partial autocorrelation and look up the shape of these two correlation to decide model structure (AR, ARMA, or ARIMA) and model order. As for detail, you can read book "Time Series Analysis Forecast and Control". This book provides you detail how to do it.
二维码

扫码加我 拉你入群

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

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

2010-3-13 02:23:33
我有做过这个模型的,不过我都是用法语写的.我把我的基本程序放到下面,你照着试试看.

library(tseries)
sale=scan("C:\\Documents and Settings\\Dan\\BUREAU\\st\\xsales.txt")
ts.plot(sale)
shapiro.test(sale)
lsale=log(sale)
> ts.plot(lsale)
dlsale=diff(diff(lsale),12)
> ts.plot(dlsale)
par(mfrow=c(2,1))
> acf(dlsale)
> pacf(dlsale)
由上面的图我确定了SARIMA(1,1,1)*(1,1,0)12模型
然后再验证
m11=arima(x = dlsale, order = c(1, 1, 1), seasonal = list(order = c(1, 1, 0), period = 12))
对残差进行检验
tsdiag(m11)
r1=((m11$residuals)^2)
ts.plot(r1)
最后是GARCH模型
garch(lsale,order=c(1,0))

还有问题,可以给我邮件
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群