全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3057 1
2008-01-06

请教一个关于MASS Library里的arima问题:

当我想用predict命令去预测ccard.arima1这个arima模型的时候会有这么一个错误出现?!请教高手一下,非常感谢!!

> ccard.arima.fore = predict(ccard.arima1, 12)
Problem in &&: No data to interpret as logical value: e1 && e2
Use traceback() to see the call stack

我搜索了一下相应的问题,找到了这么一个和我遇到同样问题的人

I am new to fitting and forecasting time series in Splus,
and am having major problems forecasting.

I am using Splus 6.0 Professional Release 2 on a
PC, Windows 2000

I have 9 years of fortnightly water turbidity data
and have fitted an ARIMA(0,1,1) model using both
1, V&R's arima
2. Splus's arima.mle  (I've even tried the Splus windows!!!!)
My time series is a timeSeries object.
All methods give the same estimates, so far so good.

Now I want to forecast the next 12 fortnights of turbidity.
I have tried using
1. predict (V&R4th edn - used following arima)
2. arima.forecast (Splus - used following arima.mle)

when I use predict, the error message is
"Problem in &&: No data to interpret as logical
value: e1 && e2"

二维码

扫码加我 拉你入群

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

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

全部回复
2008-1-7 10:03:00
In R, there are no any errors:
> library(MASS)
> mod <-  arima(lh, order = c(1,0,0))
> predict(mod, 12) # or predict(mod, n.ahead=12)
$pred
Time Series:
Start = 49
End = 60
Frequency = 1
 [1] 2.692626 2.573609 2.505301 2.466097 2.443597 2.430683 2.423271 2.419018 2.416576 2.415175 2.414371 2.413910





You'd better use "traceback() " to see where is the error.
Good luck.

$se
Time Series:
Start = 49
End = 60
Frequency = 1
 [1] 0.4443979 0.5123881 0.5328878 0.5394698 0.5416204 0.5423269 0.5425594 0.5426360 0.5426612 0.5426695 0.5426722
[12] 0.5426731


In S-Plus8.0, there are no any errors also:
> library(MASS)
> lh
 1: 2.4 2.4 2.4 2.2 2.1 1.5 2.3 2.3 2.5 2.0 1.9 1.7 2.2 1.8 3.2
16: 3.2 2.7 2.2 2.2 1.9 1.9 1.8 2.7 3.0 2.3 2.0 2.0 2.9 2.9 2.7
31: 2.7 2.3 2.6 2.4 1.8 1.7 1.5 1.4 2.1 3.3 3.5 3.5 3.1 2.6 2.1
46: 3.4 3.0 2.9
 start deltat frequency
     1      1         1
> mod <- arima(lh, order=c(1, 0, 0))
> predict(mod, n.ahead=12)
$pred:
49: 2.692227 2.572992 2.504567 2.465300 2.442765 2.429833
55: 2.422412 2.418153 2.415709 2.414307 2.413502 2.413040
 start deltat frequency
    49      1         1

$se:
49: 0.4443986 0.5123758 0.5328678 0.5394460 0.5415949 0.5423008
55: 0.5425330 0.5426095 0.5426346 0.5426429 0.5426457 0.5426466
 start deltat frequency
    49      1         1

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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