Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 20 Dec 2007 10:37:24 -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/2007/Dec/20/t1198171196mwnh19rkg3op58t.htm/, Retrieved Mon, 29 Apr 2024 11:02:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4751, Retrieved Mon, 29 Apr 2024 11:02:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact216
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast re...] [2007-12-20 17:37:24] [fef19078983b9fa83d10cb717d6f9786] [Current]
Feedback Forum

Post a new message
Dataseries X:
88,8
93,4
92,6
90,7
81,6
84,1
88,1
85,3
82,9
84,8
71,2
68,9
94,3
97,6
85,6
91,9
75,8
79,8
99
88,5
86,7
97,9
94,3
72,9
91,8
93,2
86,5
98,9
77,2
79,4
90,4
81,4
85,8
103,6
73,6
75,7
99,2
88,7
94,6
98,7
84,2
87,7
103,3
88,2
93,4
106,3
73,1
78,6
101,6
101,4
98,5
99
89,5
83,5
97,4
87,8
90,4
97,1
79,4
85




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

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

[TABLE]
[ROW][C]Summary of compuational 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]7 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=4751&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4751&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 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[48])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.697.979385.6757110.2830.2820.9990.42290.999
50101.491.388778.947103.83040.05740.05380.66410.978
5198.591.893479.4314104.35530.14940.06740.33520.9817
529997.205784.1652110.24610.39370.42290.41110.9974
5389.580.096667.003993.18930.07960.00230.26950.5886
5483.583.780770.677396.88420.48330.19610.27890.7808
5597.496.747983.5824109.91340.46130.97570.16470.9966
5687.886.010772.833299.18820.39510.04510.37240.8648
5790.488.338575.1584101.51860.37960.53190.22580.9262
5897.1100.004186.8239113.18430.33290.92340.17460.9993
5979.477.236564.054490.41850.37380.00160.73070.4197
608575.045661.864788.22660.06940.25870.29860.2986

\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[48]) \tabularnewline
36 & 75.7 & - & - & - & - & - & - & - \tabularnewline
37 & 99.2 & - & - & - & - & - & - & - \tabularnewline
38 & 88.7 & - & - & - & - & - & - & - \tabularnewline
39 & 94.6 & - & - & - & - & - & - & - \tabularnewline
40 & 98.7 & - & - & - & - & - & - & - \tabularnewline
41 & 84.2 & - & - & - & - & - & - & - \tabularnewline
42 & 87.7 & - & - & - & - & - & - & - \tabularnewline
43 & 103.3 & - & - & - & - & - & - & - \tabularnewline
44 & 88.2 & - & - & - & - & - & - & - \tabularnewline
45 & 93.4 & - & - & - & - & - & - & - \tabularnewline
46 & 106.3 & - & - & - & - & - & - & - \tabularnewline
47 & 73.1 & - & - & - & - & - & - & - \tabularnewline
48 & 78.6 & - & - & - & - & - & - & - \tabularnewline
49 & 101.6 & 97.9793 & 85.6757 & 110.283 & 0.282 & 0.999 & 0.4229 & 0.999 \tabularnewline
50 & 101.4 & 91.3887 & 78.947 & 103.8304 & 0.0574 & 0.0538 & 0.6641 & 0.978 \tabularnewline
51 & 98.5 & 91.8934 & 79.4314 & 104.3553 & 0.1494 & 0.0674 & 0.3352 & 0.9817 \tabularnewline
52 & 99 & 97.2057 & 84.1652 & 110.2461 & 0.3937 & 0.4229 & 0.4111 & 0.9974 \tabularnewline
53 & 89.5 & 80.0966 & 67.0039 & 93.1893 & 0.0796 & 0.0023 & 0.2695 & 0.5886 \tabularnewline
54 & 83.5 & 83.7807 & 70.6773 & 96.8842 & 0.4833 & 0.1961 & 0.2789 & 0.7808 \tabularnewline
55 & 97.4 & 96.7479 & 83.5824 & 109.9134 & 0.4613 & 0.9757 & 0.1647 & 0.9966 \tabularnewline
56 & 87.8 & 86.0107 & 72.8332 & 99.1882 & 0.3951 & 0.0451 & 0.3724 & 0.8648 \tabularnewline
57 & 90.4 & 88.3385 & 75.1584 & 101.5186 & 0.3796 & 0.5319 & 0.2258 & 0.9262 \tabularnewline
58 & 97.1 & 100.0041 & 86.8239 & 113.1843 & 0.3329 & 0.9234 & 0.1746 & 0.9993 \tabularnewline
59 & 79.4 & 77.2365 & 64.0544 & 90.4185 & 0.3738 & 0.0016 & 0.7307 & 0.4197 \tabularnewline
60 & 85 & 75.0456 & 61.8647 & 88.2266 & 0.0694 & 0.2587 & 0.2986 & 0.2986 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4751&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[48])[/C][/ROW]
[ROW][C]36[/C][C]75.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]99.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]88.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]94.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]98.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]84.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]87.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]88.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]78.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]101.6[/C][C]97.9793[/C][C]85.6757[/C][C]110.283[/C][C]0.282[/C][C]0.999[/C][C]0.4229[/C][C]0.999[/C][/ROW]
[ROW][C]50[/C][C]101.4[/C][C]91.3887[/C][C]78.947[/C][C]103.8304[/C][C]0.0574[/C][C]0.0538[/C][C]0.6641[/C][C]0.978[/C][/ROW]
[ROW][C]51[/C][C]98.5[/C][C]91.8934[/C][C]79.4314[/C][C]104.3553[/C][C]0.1494[/C][C]0.0674[/C][C]0.3352[/C][C]0.9817[/C][/ROW]
[ROW][C]52[/C][C]99[/C][C]97.2057[/C][C]84.1652[/C][C]110.2461[/C][C]0.3937[/C][C]0.4229[/C][C]0.4111[/C][C]0.9974[/C][/ROW]
[ROW][C]53[/C][C]89.5[/C][C]80.0966[/C][C]67.0039[/C][C]93.1893[/C][C]0.0796[/C][C]0.0023[/C][C]0.2695[/C][C]0.5886[/C][/ROW]
[ROW][C]54[/C][C]83.5[/C][C]83.7807[/C][C]70.6773[/C][C]96.8842[/C][C]0.4833[/C][C]0.1961[/C][C]0.2789[/C][C]0.7808[/C][/ROW]
[ROW][C]55[/C][C]97.4[/C][C]96.7479[/C][C]83.5824[/C][C]109.9134[/C][C]0.4613[/C][C]0.9757[/C][C]0.1647[/C][C]0.9966[/C][/ROW]
[ROW][C]56[/C][C]87.8[/C][C]86.0107[/C][C]72.8332[/C][C]99.1882[/C][C]0.3951[/C][C]0.0451[/C][C]0.3724[/C][C]0.8648[/C][/ROW]
[ROW][C]57[/C][C]90.4[/C][C]88.3385[/C][C]75.1584[/C][C]101.5186[/C][C]0.3796[/C][C]0.5319[/C][C]0.2258[/C][C]0.9262[/C][/ROW]
[ROW][C]58[/C][C]97.1[/C][C]100.0041[/C][C]86.8239[/C][C]113.1843[/C][C]0.3329[/C][C]0.9234[/C][C]0.1746[/C][C]0.9993[/C][/ROW]
[ROW][C]59[/C][C]79.4[/C][C]77.2365[/C][C]64.0544[/C][C]90.4185[/C][C]0.3738[/C][C]0.0016[/C][C]0.7307[/C][C]0.4197[/C][/ROW]
[ROW][C]60[/C][C]85[/C][C]75.0456[/C][C]61.8647[/C][C]88.2266[/C][C]0.0694[/C][C]0.2587[/C][C]0.2986[/C][C]0.2986[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4751&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4751&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[48])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.697.979385.6757110.2830.2820.9990.42290.999
50101.491.388778.947103.83040.05740.05380.66410.978
5198.591.893479.4314104.35530.14940.06740.33520.9817
529997.205784.1652110.24610.39370.42290.41110.9974
5389.580.096667.003993.18930.07960.00230.26950.5886
5483.583.780770.677396.88420.48330.19610.27890.7808
5597.496.747983.5824109.91340.46130.97570.16470.9966
5687.886.010772.833299.18820.39510.04510.37240.8648
5790.488.338575.1584101.51860.37960.53190.22580.9262
5897.1100.004186.8239113.18430.33290.92340.17460.9993
5979.477.236564.054490.41850.37380.00160.73070.4197
608575.045661.864788.22660.06940.25870.29860.2986







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06410.0370.003113.10911.09241.0452
500.06950.10950.0091100.22558.35212.89
510.06920.07190.00643.64783.63731.9072
520.06840.01850.00153.21960.26830.518
530.08340.11740.009888.42367.36862.7145
540.0798-0.00343e-040.07880.00660.081
550.06940.00676e-040.42520.03540.1882
560.07820.02080.00173.20150.26680.5165
570.07610.02330.00194.24980.35420.5951
580.0672-0.0290.00248.43370.70280.8383
590.08710.0280.00234.68080.39010.6246
600.08960.13260.011199.08928.25742.8736

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0641 & 0.037 & 0.0031 & 13.1091 & 1.0924 & 1.0452 \tabularnewline
50 & 0.0695 & 0.1095 & 0.0091 & 100.2255 & 8.3521 & 2.89 \tabularnewline
51 & 0.0692 & 0.0719 & 0.006 & 43.6478 & 3.6373 & 1.9072 \tabularnewline
52 & 0.0684 & 0.0185 & 0.0015 & 3.2196 & 0.2683 & 0.518 \tabularnewline
53 & 0.0834 & 0.1174 & 0.0098 & 88.4236 & 7.3686 & 2.7145 \tabularnewline
54 & 0.0798 & -0.0034 & 3e-04 & 0.0788 & 0.0066 & 0.081 \tabularnewline
55 & 0.0694 & 0.0067 & 6e-04 & 0.4252 & 0.0354 & 0.1882 \tabularnewline
56 & 0.0782 & 0.0208 & 0.0017 & 3.2015 & 0.2668 & 0.5165 \tabularnewline
57 & 0.0761 & 0.0233 & 0.0019 & 4.2498 & 0.3542 & 0.5951 \tabularnewline
58 & 0.0672 & -0.029 & 0.0024 & 8.4337 & 0.7028 & 0.8383 \tabularnewline
59 & 0.0871 & 0.028 & 0.0023 & 4.6808 & 0.3901 & 0.6246 \tabularnewline
60 & 0.0896 & 0.1326 & 0.0111 & 99.0892 & 8.2574 & 2.8736 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4751&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]49[/C][C]0.0641[/C][C]0.037[/C][C]0.0031[/C][C]13.1091[/C][C]1.0924[/C][C]1.0452[/C][/ROW]
[ROW][C]50[/C][C]0.0695[/C][C]0.1095[/C][C]0.0091[/C][C]100.2255[/C][C]8.3521[/C][C]2.89[/C][/ROW]
[ROW][C]51[/C][C]0.0692[/C][C]0.0719[/C][C]0.006[/C][C]43.6478[/C][C]3.6373[/C][C]1.9072[/C][/ROW]
[ROW][C]52[/C][C]0.0684[/C][C]0.0185[/C][C]0.0015[/C][C]3.2196[/C][C]0.2683[/C][C]0.518[/C][/ROW]
[ROW][C]53[/C][C]0.0834[/C][C]0.1174[/C][C]0.0098[/C][C]88.4236[/C][C]7.3686[/C][C]2.7145[/C][/ROW]
[ROW][C]54[/C][C]0.0798[/C][C]-0.0034[/C][C]3e-04[/C][C]0.0788[/C][C]0.0066[/C][C]0.081[/C][/ROW]
[ROW][C]55[/C][C]0.0694[/C][C]0.0067[/C][C]6e-04[/C][C]0.4252[/C][C]0.0354[/C][C]0.1882[/C][/ROW]
[ROW][C]56[/C][C]0.0782[/C][C]0.0208[/C][C]0.0017[/C][C]3.2015[/C][C]0.2668[/C][C]0.5165[/C][/ROW]
[ROW][C]57[/C][C]0.0761[/C][C]0.0233[/C][C]0.0019[/C][C]4.2498[/C][C]0.3542[/C][C]0.5951[/C][/ROW]
[ROW][C]58[/C][C]0.0672[/C][C]-0.029[/C][C]0.0024[/C][C]8.4337[/C][C]0.7028[/C][C]0.8383[/C][/ROW]
[ROW][C]59[/C][C]0.0871[/C][C]0.028[/C][C]0.0023[/C][C]4.6808[/C][C]0.3901[/C][C]0.6246[/C][/ROW]
[ROW][C]60[/C][C]0.0896[/C][C]0.1326[/C][C]0.0111[/C][C]99.0892[/C][C]8.2574[/C][C]2.8736[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4751&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4751&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
490.06410.0370.003113.10911.09241.0452
500.06950.10950.0091100.22558.35212.89
510.06920.07190.00643.64783.63731.9072
520.06840.01850.00153.21960.26830.518
530.08340.11740.009888.42367.36862.7145
540.0798-0.00343e-040.07880.00660.081
550.06940.00676e-040.42520.03540.1882
560.07820.02080.00173.20150.26680.5165
570.07610.02330.00194.24980.35420.5951
580.0672-0.0290.00248.43370.70280.8383
590.08710.0280.00234.68080.39010.6246
600.08960.13260.011199.08928.25742.8736



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; 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')