[R] Problem about SARMA model forcasting
saji
saji.ren at gmail.com
Wed Feb 11 12:54:10 CET 2009
Somebody suggest that all the intial values are zero.
So I followed this suggestion and used below formulas to compute the
forcast in Excel
when t < 46,
a(t)=0;
when t >= 46,
a(t)=X(t) - ar1*X(t-1) - X(t-45) + ar1*X(t-46) + ma1*a(t-1) + sma1*a
(t-45) - ma1*sma1*a(t-46);
X(predict) = ar1*X(t-1) + X(t-45) - ar1*X(t-46) - ma1*a(t-1) - sma1*a
(t-45) + ma1*sma1*a(t-46);
But the predict values are not the same as what I got from R software.
The time series is non-negative. But there are negative value in what
I got from Excel using the above formula.
So there must be something wrong. And I just don't where the mistake
is.
saji from Shanghai
On 2月9日, 下午7时54分, Saji Ren <saji.... at gmail.com> wrote:
> First of all, sorry to *Gerard.
> *I have changed my email account, and I don't know how to reply to my posted
> thread before. So I just create a new message here.
> Thanks again for your help! Now I realized where my mistake is.
> I forgot to include the seasonal differencing order.
>
> After I corrected the formula as below:
> (*S-ARIMA(p,d,q)*(P,D,Q)* models, where *p=1,d=0,q=1; P=0,D=1,Q=1;* and *the
> seasonal period S=45*.)
>
> X(t) = X(t-45) + ar1*X(t-1) - ar1*X(t-46) - ma1*a(t-1) - sma1*a(t-45) +
> ma1*sma1*a(t-46) + a(t)
>
> Thus, we get:
>
> a(t) = X(t) - ar1*X(t-1) - X(t-45) + ar1*X(t-46) + ma1*a(t-1) + sma1*a(t-45)
> - ma1*sma1*a(t-46),
> *when t>=46*;
>
> Now my question is that: *What is the initial value of a(t) when t<46?
> *And what is the initial setting in R?
>
> Because R gives a very good forcasting of the analyzed data series, and I
> just can not reproduced the results in other software (like EXCEL).
>
> Hope some one to help! Thanks!
>
> saji from Shanghai
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list