Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 19 Dec 2008 16:12:59 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/20/t1229728469fxxcxgluyas1q0w.htm/, Retrieved Wed, 15 May 2024 20:07:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35273, Retrieved Wed, 15 May 2024 20:07:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact237
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Central tendency:...] [2008-12-12 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMP   [ARIMA Backward Selection] [ARIMA goudprijs] [2008-12-14 20:12:57] [73d6180dc45497329efd1b6934a84aba]
- RMP     [ARIMA Forecasting] [ARIMA forecast: P...] [2008-12-14 22:37:34] [73d6180dc45497329efd1b6934a84aba]
-   P         [ARIMA Forecasting] [Arima forecasting...] [2008-12-19 23:12:59] [14a75ec03b2c0d8ddd8b141a7b1594fd] [Current]
Feedback Forum

Post a new message
Dataseries X:
10070
10137
9984
9732
9103
9155
9308
9394
9948
10177
10002
9728
10002
10063
10018
9960
10236
10893
10756
10940
10997
10827
10166
10186
10457
10368
10244
10511
10812
10738
10171
9721
9897
9828
9924
10371
10846
10413
10709
10662
10570
10297
10635
10872
10296
10383
10431
10574
10653
10805
10872
10625
10407
10463
10556
10646
10702
11353
11346
11451
11964
12574
13031
13812
14544
14931
14886
16005
17064
15168
16050
15839
15137
14954
15648
15305
15579
16348
15928
16171
15937
15713
15594
15683
16438
17032
17696
17745
19394
20148
20108
18584
18441
18391
19178
18079
18483
19644
19195




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35273&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35273&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35273&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
88177451769616816.863318575.13670.45650.510.5
89193941769616452.71318939.2870.00370.46920.99960.5
90201481769616173.290619218.70948e-040.01440.95860.5
91201081769615937.726619454.27340.00360.00310.97560.5
92185841769615730.190619661.80940.1880.00810.93580.5
93184411769615542.563719849.43630.24890.20950.94530.5
94183911769615370.02320021.9770.27910.26510.95260.5
95191781769615209.425920182.57410.12140.29190.95120.5
96180791769615058.589920333.41010.3880.13540.93270.5
97184831769614915.925720476.07430.28950.39360.81240.5
98196441769614780.233520611.76650.09520.29840.67230.5
99191951769614650.581220741.41880.16730.1050.50.5

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[87]) \tabularnewline
75 & 15648 & - & - & - & - & - & - & - \tabularnewline
76 & 15305 & - & - & - & - & - & - & - \tabularnewline
77 & 15579 & - & - & - & - & - & - & - \tabularnewline
78 & 16348 & - & - & - & - & - & - & - \tabularnewline
79 & 15928 & - & - & - & - & - & - & - \tabularnewline
80 & 16171 & - & - & - & - & - & - & - \tabularnewline
81 & 15937 & - & - & - & - & - & - & - \tabularnewline
82 & 15713 & - & - & - & - & - & - & - \tabularnewline
83 & 15594 & - & - & - & - & - & - & - \tabularnewline
84 & 15683 & - & - & - & - & - & - & - \tabularnewline
85 & 16438 & - & - & - & - & - & - & - \tabularnewline
86 & 17032 & - & - & - & - & - & - & - \tabularnewline
87 & 17696 & - & - & - & - & - & - & - \tabularnewline
88 & 17745 & 17696 & 16816.8633 & 18575.1367 & 0.4565 & 0.5 & 1 & 0.5 \tabularnewline
89 & 19394 & 17696 & 16452.713 & 18939.287 & 0.0037 & 0.4692 & 0.9996 & 0.5 \tabularnewline
90 & 20148 & 17696 & 16173.2906 & 19218.7094 & 8e-04 & 0.0144 & 0.9586 & 0.5 \tabularnewline
91 & 20108 & 17696 & 15937.7266 & 19454.2734 & 0.0036 & 0.0031 & 0.9756 & 0.5 \tabularnewline
92 & 18584 & 17696 & 15730.1906 & 19661.8094 & 0.188 & 0.0081 & 0.9358 & 0.5 \tabularnewline
93 & 18441 & 17696 & 15542.5637 & 19849.4363 & 0.2489 & 0.2095 & 0.9453 & 0.5 \tabularnewline
94 & 18391 & 17696 & 15370.023 & 20021.977 & 0.2791 & 0.2651 & 0.9526 & 0.5 \tabularnewline
95 & 19178 & 17696 & 15209.4259 & 20182.5741 & 0.1214 & 0.2919 & 0.9512 & 0.5 \tabularnewline
96 & 18079 & 17696 & 15058.5899 & 20333.4101 & 0.388 & 0.1354 & 0.9327 & 0.5 \tabularnewline
97 & 18483 & 17696 & 14915.9257 & 20476.0743 & 0.2895 & 0.3936 & 0.8124 & 0.5 \tabularnewline
98 & 19644 & 17696 & 14780.2335 & 20611.7665 & 0.0952 & 0.2984 & 0.6723 & 0.5 \tabularnewline
99 & 19195 & 17696 & 14650.5812 & 20741.4188 & 0.1673 & 0.105 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35273&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[87])[/C][/ROW]
[ROW][C]75[/C][C]15648[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]15305[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]15579[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]16348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]15928[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]16171[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]15937[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]15713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]15594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]15683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]16438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]17032[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]17696[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]17745[/C][C]17696[/C][C]16816.8633[/C][C]18575.1367[/C][C]0.4565[/C][C]0.5[/C][C]1[/C][C]0.5[/C][/ROW]
[ROW][C]89[/C][C]19394[/C][C]17696[/C][C]16452.713[/C][C]18939.287[/C][C]0.0037[/C][C]0.4692[/C][C]0.9996[/C][C]0.5[/C][/ROW]
[ROW][C]90[/C][C]20148[/C][C]17696[/C][C]16173.2906[/C][C]19218.7094[/C][C]8e-04[/C][C]0.0144[/C][C]0.9586[/C][C]0.5[/C][/ROW]
[ROW][C]91[/C][C]20108[/C][C]17696[/C][C]15937.7266[/C][C]19454.2734[/C][C]0.0036[/C][C]0.0031[/C][C]0.9756[/C][C]0.5[/C][/ROW]
[ROW][C]92[/C][C]18584[/C][C]17696[/C][C]15730.1906[/C][C]19661.8094[/C][C]0.188[/C][C]0.0081[/C][C]0.9358[/C][C]0.5[/C][/ROW]
[ROW][C]93[/C][C]18441[/C][C]17696[/C][C]15542.5637[/C][C]19849.4363[/C][C]0.2489[/C][C]0.2095[/C][C]0.9453[/C][C]0.5[/C][/ROW]
[ROW][C]94[/C][C]18391[/C][C]17696[/C][C]15370.023[/C][C]20021.977[/C][C]0.2791[/C][C]0.2651[/C][C]0.9526[/C][C]0.5[/C][/ROW]
[ROW][C]95[/C][C]19178[/C][C]17696[/C][C]15209.4259[/C][C]20182.5741[/C][C]0.1214[/C][C]0.2919[/C][C]0.9512[/C][C]0.5[/C][/ROW]
[ROW][C]96[/C][C]18079[/C][C]17696[/C][C]15058.5899[/C][C]20333.4101[/C][C]0.388[/C][C]0.1354[/C][C]0.9327[/C][C]0.5[/C][/ROW]
[ROW][C]97[/C][C]18483[/C][C]17696[/C][C]14915.9257[/C][C]20476.0743[/C][C]0.2895[/C][C]0.3936[/C][C]0.8124[/C][C]0.5[/C][/ROW]
[ROW][C]98[/C][C]19644[/C][C]17696[/C][C]14780.2335[/C][C]20611.7665[/C][C]0.0952[/C][C]0.2984[/C][C]0.6723[/C][C]0.5[/C][/ROW]
[ROW][C]99[/C][C]19195[/C][C]17696[/C][C]14650.5812[/C][C]20741.4188[/C][C]0.1673[/C][C]0.105[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35273&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35273&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
88177451769616816.863318575.13670.45650.510.5
89193941769616452.71318939.2870.00370.46920.99960.5
90201481769616173.290619218.70948e-040.01440.95860.5
91201081769615937.726619454.27340.00360.00310.97560.5
92185841769615730.190619661.80940.1880.00810.93580.5
93184411769615542.563719849.43630.24890.20950.94530.5
94183911769615370.02320021.9770.27910.26510.95260.5
95191781769615209.425920182.57410.12140.29190.95120.5
96180791769615058.589920333.41010.3880.13540.93270.5
97184831769614915.925720476.07430.28950.39360.81240.5
98196441769614780.233520611.76650.09520.29840.67230.5
99191951769614650.581220741.41880.16730.1050.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.02530.00282e-042401200.083314.1451
890.03580.0960.0082883204240267490.1704
900.04390.13860.01156012304501025.3333707.8314
910.05070.13630.01145817744484812696.2844
920.05670.05020.004278854465712256.3435
930.06210.04210.003555502546252.0833215.063
940.06710.03930.003348302540252.0833200.6292
950.07170.08370.0072196324183027427.8165
960.0760.02160.001814668912224.0833110.5626
970.08020.04450.003761936951614.0833227.1873
980.08410.11010.00923794704316225.3333562.3392
990.08780.08470.00712247001187250.0833432.724

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0253 & 0.0028 & 2e-04 & 2401 & 200.0833 & 14.1451 \tabularnewline
89 & 0.0358 & 0.096 & 0.008 & 2883204 & 240267 & 490.1704 \tabularnewline
90 & 0.0439 & 0.1386 & 0.0115 & 6012304 & 501025.3333 & 707.8314 \tabularnewline
91 & 0.0507 & 0.1363 & 0.0114 & 5817744 & 484812 & 696.2844 \tabularnewline
92 & 0.0567 & 0.0502 & 0.0042 & 788544 & 65712 & 256.3435 \tabularnewline
93 & 0.0621 & 0.0421 & 0.0035 & 555025 & 46252.0833 & 215.063 \tabularnewline
94 & 0.0671 & 0.0393 & 0.0033 & 483025 & 40252.0833 & 200.6292 \tabularnewline
95 & 0.0717 & 0.0837 & 0.007 & 2196324 & 183027 & 427.8165 \tabularnewline
96 & 0.076 & 0.0216 & 0.0018 & 146689 & 12224.0833 & 110.5626 \tabularnewline
97 & 0.0802 & 0.0445 & 0.0037 & 619369 & 51614.0833 & 227.1873 \tabularnewline
98 & 0.0841 & 0.1101 & 0.0092 & 3794704 & 316225.3333 & 562.3392 \tabularnewline
99 & 0.0878 & 0.0847 & 0.0071 & 2247001 & 187250.0833 & 432.724 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35273&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]88[/C][C]0.0253[/C][C]0.0028[/C][C]2e-04[/C][C]2401[/C][C]200.0833[/C][C]14.1451[/C][/ROW]
[ROW][C]89[/C][C]0.0358[/C][C]0.096[/C][C]0.008[/C][C]2883204[/C][C]240267[/C][C]490.1704[/C][/ROW]
[ROW][C]90[/C][C]0.0439[/C][C]0.1386[/C][C]0.0115[/C][C]6012304[/C][C]501025.3333[/C][C]707.8314[/C][/ROW]
[ROW][C]91[/C][C]0.0507[/C][C]0.1363[/C][C]0.0114[/C][C]5817744[/C][C]484812[/C][C]696.2844[/C][/ROW]
[ROW][C]92[/C][C]0.0567[/C][C]0.0502[/C][C]0.0042[/C][C]788544[/C][C]65712[/C][C]256.3435[/C][/ROW]
[ROW][C]93[/C][C]0.0621[/C][C]0.0421[/C][C]0.0035[/C][C]555025[/C][C]46252.0833[/C][C]215.063[/C][/ROW]
[ROW][C]94[/C][C]0.0671[/C][C]0.0393[/C][C]0.0033[/C][C]483025[/C][C]40252.0833[/C][C]200.6292[/C][/ROW]
[ROW][C]95[/C][C]0.0717[/C][C]0.0837[/C][C]0.007[/C][C]2196324[/C][C]183027[/C][C]427.8165[/C][/ROW]
[ROW][C]96[/C][C]0.076[/C][C]0.0216[/C][C]0.0018[/C][C]146689[/C][C]12224.0833[/C][C]110.5626[/C][/ROW]
[ROW][C]97[/C][C]0.0802[/C][C]0.0445[/C][C]0.0037[/C][C]619369[/C][C]51614.0833[/C][C]227.1873[/C][/ROW]
[ROW][C]98[/C][C]0.0841[/C][C]0.1101[/C][C]0.0092[/C][C]3794704[/C][C]316225.3333[/C][C]562.3392[/C][/ROW]
[ROW][C]99[/C][C]0.0878[/C][C]0.0847[/C][C]0.0071[/C][C]2247001[/C][C]187250.0833[/C][C]432.724[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35273&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35273&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.02530.00282e-042401200.083314.1451
890.03580.0960.0082883204240267490.1704
900.04390.13860.01156012304501025.3333707.8314
910.05070.13630.01145817744484812696.2844
920.05670.05020.004278854465712256.3435
930.06210.04210.003555502546252.0833215.063
940.06710.03930.003348302540252.0833200.6292
950.07170.08370.0072196324183027427.8165
960.0760.02160.001814668912224.0833110.5626
970.08020.04450.003761936951614.0833227.1873
980.08410.11010.00923794704316225.3333562.3392
990.08780.08470.00712247001187250.0833432.724



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,fx))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:12] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')