楼主: zihau87
5654 10

[求助]请教一下如何用R来看是什么ARIMA...紧急!!谢谢 [推广有奖]

  • 0关注
  • 0粉丝

小学生

7%

还不是VIP/贵宾

-

威望
0
论坛币
23 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
87 点
帖子
8
精华
0
在线时间
0 小时
注册时间
2008-8-18
最后登录
2012-11-25

楼主
zihau87 发表于 2009-3-25 01:08:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请好心人+高手 帮忙指教一下。。。。
功课上需要到。。。。
谢谢哦~~~
麻烦请教教如何用 R (或 eview 3.1 )来看是什么 arima
谢谢^^

附上一个附件。。。。

原版的 acf & pacf




经过了 First Difference 后的 acf & pacf




可是却不会看是 ARIMA (p,d,q)

能教教我吗??
谢谢 ^^

或者请教我用 eview 3.1 来看也可以。。。谢谢。。。

[此贴子已经被作者于2009-3-25 1:16:29编辑过]

二维码

扫码加我 拉你入群

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

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

关键词:ARIMA ima Rim 如何用 difference ARIMA

回帖推荐

ruiqwy 发表于2楼  查看完整内容

从你的一阶差分图来看,似乎还不平稳,先做个平稳性检验,等平稳了再考虑ARIMA!

本帖被以下文库推荐

沙发
ruiqwy 发表于 2009-3-25 09:12:00
从你的一阶差分图来看,似乎还不平稳,先做个平稳性检验,等平稳了再考虑ARIMA!
已有 1 人评分论坛币 热心指数 收起 理由
crystal8832 + 10 + 1 热心帮助其他会员

总评分: 论坛币 + 10  热心指数 + 1   查看全部评分

R is the second language for me!Using R is standing on the shoulders of giants!   Let\'s use R together!

藤椅
zihau87 发表于 2009-3-25 11:41:00

请问 ruiqwy 大大说的 平稳性检验 是这个?

Box.test(z,lag=24)
Box.test(z,lag=24,type="Ljung")

z 是已经一阶差分了

可是答案的确都小过 "0.10", 所以要二阶差分咯??

附加小问题:这种做法里,一定是用 ="24"  ??


谢谢ruiqwy 大大
谢谢 ^^

板凳
ruiqwy 发表于 2009-3-25 13:12:00
Box.test(z,lag=24)
Box.test(z,lag=24,type="Ljung")

这些是做序列自相关检验,平稳性检验可以用ADF检验、KPSS检验等!!你先找本时间序列的书看看
已有 1 人评分论坛币 热心指数 收起 理由
crystal8832 + 10 + 1 热心帮助其他会员

总评分: 论坛币 + 10  热心指数 + 1   查看全部评分

R is the second language for me!Using R is standing on the shoulders of giants!   Let\'s use R together!

报纸
vrooadk 发表于 2009-3-25 22:21:00
this does not seem right to me. Doesn't LZ need to fit an arima first and then perform all those tests to the residuals? The ACF and PACF of the 1st differenced series look ok to me. Go ahead fitting an arima model using auto.arima in forecast package like      auto.arima(z, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic") and then carry those tests to the residuals of this model.

地板
zihau87 发表于 2009-3-26 03:32:00

回复:(ruiqwy)Box.test(z,lag=24)Box.test(z,lag=2...

哦哦。。。。那么我还真没学到 ADF 耶。。。
毕竟上课只学到基础

那么又好奇。。。我用eviews 做出  adf test
那么是不是要大过  那些 % 的才算稳定叻??

               
                                                                      t-Statistic      Prob.*
               
Augmented Dickey-Fuller test statistic            -4.106224     0.0014
Test critical values:                      1% level        -3.489659   
                                                   5% level        -2.887425   
                                                 10% level        -2.580651   

7
zihau87 发表于 2009-3-26 04:18:00

thank for your suggestion about using
auto.arima in forecast package like      auto.arima(z, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic")

and because of using new data , my acf(z) & pacf(z) will be change

and.. can u pls help me hv a look on my new graph
the auto.arima is (2,1,0)
but y isnt (2,1,3)  ???


thanks a lot ^^

 

8
vrooadk 发表于 2009-3-27 04:58:00
oh, sorry. did not look very carefully. it should be auto.arima(y, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic"). run this again.

fit<-auto.arima(y, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic")
tsdiag(fit)

9
ruiqwy 发表于 2009-3-27 09:45:00
我觉得上面这样做是有问题,对time series做ARIMA,首先要判断几阶差分平稳,只有平稳后才能做ARMA。否则毫无意义。

auto.arima(y, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic")
这个函数是用来识别最优的ARIMA,但是你把d=1,那就告诉他是一阶差分平稳。你做过了一阶差分平稳检验了吗?
d 的参数如下:
d  :Order of first-differencing. If missing, will choose a value based on KPSS test.

如果d值不设为1,auto.arima会用KPSS去检验平稳性。也就是我说的,先用ADF、KPSS检验平稳后,才可以去做ARMA模型!
R is the second language for me!Using R is standing on the shoulders of giants!   Let\'s use R together!

10
zihau87 发表于 2009-3-27 10:05:00
谢谢两位......

然后我试了

data <-read.table
y<-ts(data)
z<-ts(diff(y,lag=1))

然后用 KPSS test 时
 ndiffs(y,alpha=0.05)   答案是 1
 ndiffs(z,alpha=0.05)    答案是 0

 所以表示我的 z  (一阶差分是已经平稳了吗??

这时候,假如我做
auto.arima(y, d=1,D=0,max.p=5,max.q=3,max.P=0,max.Q=0,ic="aic")
答案是出现 (0,1,2)     的确是最小的 AIC

可是又好奇......从第7楼的 ACF & PACF 图来看...
不是应该是  (2,1,0) 或 (2,1,3) 吗???




************
笨笨的疑问,为了确实一些事......
请问在算 AIC 时

AIC<-matrix(0,6,6)

for (p in 0:5)

for (q in 0:5)

{

mod.fit<-arima(y,order=c(p,1,q))

AIC[p+1,q+1]<-mod.fit$aic

}

AIC


上面的arima (这个应该用y,还是z呢??)

[此贴子已经被作者于2009-3-27 10:07:26编辑过]

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 13:24