Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 07:37:44 -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/07/t1197037479ubf9x58kdbuyyox.htm/, Retrieved Sun, 28 Apr 2024 23:07:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2851, Retrieved Sun, 28 Apr 2024 23:07:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWS9, Q1, Investeringsgoederen, marleen
Estimated Impact185
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [WS9 Q1 Investerin...] [2007-12-07 14:37:44] [87b6915e48e03972eaa4a0940182012f] [Current]
Feedback Forum

Post a new message
Dataseries X:
101,5
126,6
93,9
89,8
93,4
101,5
110,4
105,9
108,4
113,9
86,1
69,4
101,2
100,5
98
106,6
90,1
96,9
125,9
112
100
123,9
79,8
83,4
113,6
112,9
104
109,9
99
106,3
128,9
111,1
102,9
130
87
87,5
117,6
103,4
110,8
112,6
102,5
112,4
135,6
105,1
127,7
137
91
90,5




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2851&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]2 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=2851&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2851&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 time2 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[36])
2483.4-------
25113.6-------
26112.9-------
27104-------
28109.9-------
2999-------
30106.3-------
31128.9-------
32111.1-------
33102.9-------
34130-------
3587-------
3687.5-------
37117.6115.152795.7506138.48630.41860.98990.55190.9899
38103.4111.574692.6873134.31070.24050.30170.45450.981
39110.8105.073887.2246126.57570.30080.56060.5390.9454
40112.6108.922390.3705131.28260.37360.43460.46590.9698
41102.599.772582.7454120.30340.39730.11040.52940.8793
42112.4105.583787.5379127.34950.26970.60940.47430.9483
43135.6129.6604107.4746156.4260.33180.89690.52220.999
44105.1110.53391.604133.37360.32050.01570.48060.976
45127.7103.35985.6471124.73370.01280.43660.51680.9271
46137129.4977107.2958156.29350.29160.55230.48530.9989
479187.293572.3219105.36440.343800.51270.4911
4890.587.24472.2768105.31080.3620.34180.48890.4889

\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[36]) \tabularnewline
24 & 83.4 & - & - & - & - & - & - & - \tabularnewline
25 & 113.6 & - & - & - & - & - & - & - \tabularnewline
26 & 112.9 & - & - & - & - & - & - & - \tabularnewline
27 & 104 & - & - & - & - & - & - & - \tabularnewline
28 & 109.9 & - & - & - & - & - & - & - \tabularnewline
29 & 99 & - & - & - & - & - & - & - \tabularnewline
30 & 106.3 & - & - & - & - & - & - & - \tabularnewline
31 & 128.9 & - & - & - & - & - & - & - \tabularnewline
32 & 111.1 & - & - & - & - & - & - & - \tabularnewline
33 & 102.9 & - & - & - & - & - & - & - \tabularnewline
34 & 130 & - & - & - & - & - & - & - \tabularnewline
35 & 87 & - & - & - & - & - & - & - \tabularnewline
36 & 87.5 & - & - & - & - & - & - & - \tabularnewline
37 & 117.6 & 115.1527 & 95.7506 & 138.4863 & 0.4186 & 0.9899 & 0.5519 & 0.9899 \tabularnewline
38 & 103.4 & 111.5746 & 92.6873 & 134.3107 & 0.2405 & 0.3017 & 0.4545 & 0.981 \tabularnewline
39 & 110.8 & 105.0738 & 87.2246 & 126.5757 & 0.3008 & 0.5606 & 0.539 & 0.9454 \tabularnewline
40 & 112.6 & 108.9223 & 90.3705 & 131.2826 & 0.3736 & 0.4346 & 0.4659 & 0.9698 \tabularnewline
41 & 102.5 & 99.7725 & 82.7454 & 120.3034 & 0.3973 & 0.1104 & 0.5294 & 0.8793 \tabularnewline
42 & 112.4 & 105.5837 & 87.5379 & 127.3495 & 0.2697 & 0.6094 & 0.4743 & 0.9483 \tabularnewline
43 & 135.6 & 129.6604 & 107.4746 & 156.426 & 0.3318 & 0.8969 & 0.5222 & 0.999 \tabularnewline
44 & 105.1 & 110.533 & 91.604 & 133.3736 & 0.3205 & 0.0157 & 0.4806 & 0.976 \tabularnewline
45 & 127.7 & 103.359 & 85.6471 & 124.7337 & 0.0128 & 0.4366 & 0.5168 & 0.9271 \tabularnewline
46 & 137 & 129.4977 & 107.2958 & 156.2935 & 0.2916 & 0.5523 & 0.4853 & 0.9989 \tabularnewline
47 & 91 & 87.2935 & 72.3219 & 105.3644 & 0.3438 & 0 & 0.5127 & 0.4911 \tabularnewline
48 & 90.5 & 87.244 & 72.2768 & 105.3108 & 0.362 & 0.3418 & 0.4889 & 0.4889 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2851&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[36])[/C][/ROW]
[ROW][C]24[/C][C]83.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]104[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]109.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]128.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]130[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]117.6[/C][C]115.1527[/C][C]95.7506[/C][C]138.4863[/C][C]0.4186[/C][C]0.9899[/C][C]0.5519[/C][C]0.9899[/C][/ROW]
[ROW][C]38[/C][C]103.4[/C][C]111.5746[/C][C]92.6873[/C][C]134.3107[/C][C]0.2405[/C][C]0.3017[/C][C]0.4545[/C][C]0.981[/C][/ROW]
[ROW][C]39[/C][C]110.8[/C][C]105.0738[/C][C]87.2246[/C][C]126.5757[/C][C]0.3008[/C][C]0.5606[/C][C]0.539[/C][C]0.9454[/C][/ROW]
[ROW][C]40[/C][C]112.6[/C][C]108.9223[/C][C]90.3705[/C][C]131.2826[/C][C]0.3736[/C][C]0.4346[/C][C]0.4659[/C][C]0.9698[/C][/ROW]
[ROW][C]41[/C][C]102.5[/C][C]99.7725[/C][C]82.7454[/C][C]120.3034[/C][C]0.3973[/C][C]0.1104[/C][C]0.5294[/C][C]0.8793[/C][/ROW]
[ROW][C]42[/C][C]112.4[/C][C]105.5837[/C][C]87.5379[/C][C]127.3495[/C][C]0.2697[/C][C]0.6094[/C][C]0.4743[/C][C]0.9483[/C][/ROW]
[ROW][C]43[/C][C]135.6[/C][C]129.6604[/C][C]107.4746[/C][C]156.426[/C][C]0.3318[/C][C]0.8969[/C][C]0.5222[/C][C]0.999[/C][/ROW]
[ROW][C]44[/C][C]105.1[/C][C]110.533[/C][C]91.604[/C][C]133.3736[/C][C]0.3205[/C][C]0.0157[/C][C]0.4806[/C][C]0.976[/C][/ROW]
[ROW][C]45[/C][C]127.7[/C][C]103.359[/C][C]85.6471[/C][C]124.7337[/C][C]0.0128[/C][C]0.4366[/C][C]0.5168[/C][C]0.9271[/C][/ROW]
[ROW][C]46[/C][C]137[/C][C]129.4977[/C][C]107.2958[/C][C]156.2935[/C][C]0.2916[/C][C]0.5523[/C][C]0.4853[/C][C]0.9989[/C][/ROW]
[ROW][C]47[/C][C]91[/C][C]87.2935[/C][C]72.3219[/C][C]105.3644[/C][C]0.3438[/C][C]0[/C][C]0.5127[/C][C]0.4911[/C][/ROW]
[ROW][C]48[/C][C]90.5[/C][C]87.244[/C][C]72.2768[/C][C]105.3108[/C][C]0.362[/C][C]0.3418[/C][C]0.4889[/C][C]0.4889[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2851&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2851&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[36])
2483.4-------
25113.6-------
26112.9-------
27104-------
28109.9-------
2999-------
30106.3-------
31128.9-------
32111.1-------
33102.9-------
34130-------
3587-------
3687.5-------
37117.6115.152795.7506138.48630.41860.98990.55190.9899
38103.4111.574692.6873134.31070.24050.30170.45450.981
39110.8105.073887.2246126.57570.30080.56060.5390.9454
40112.6108.922390.3705131.28260.37360.43460.46590.9698
41102.599.772582.7454120.30340.39730.11040.52940.8793
42112.4105.583787.5379127.34950.26970.60940.47430.9483
43135.6129.6604107.4746156.4260.33180.89690.52220.999
44105.1110.53391.604133.37360.32050.01570.48060.976
45127.7103.35985.6471124.73370.01280.43660.51680.9271
46137129.4977107.2958156.29350.29160.55230.48530.9989
479187.293572.3219105.36440.343800.51270.4911
4890.587.24472.2768105.31080.3620.34180.48890.4889







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.10340.02130.00185.98940.49910.7065
380.104-0.07330.006166.82425.56872.3598
390.10440.05450.004532.78892.73241.653
400.10470.03380.002813.52531.12711.0617
410.1050.02730.00237.43910.61990.7874
420.10520.06460.005446.46253.87191.9677
430.10530.04580.003835.27882.93991.7146
440.1054-0.04920.004129.51752.45981.5684
450.10550.23550.0196592.48449.37377.0266
460.10560.05790.004856.28514.69042.1657
470.10560.04250.003513.73811.14481.07
480.10570.03730.003110.60130.88340.9399

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.1034 & 0.0213 & 0.0018 & 5.9894 & 0.4991 & 0.7065 \tabularnewline
38 & 0.104 & -0.0733 & 0.0061 & 66.8242 & 5.5687 & 2.3598 \tabularnewline
39 & 0.1044 & 0.0545 & 0.0045 & 32.7889 & 2.7324 & 1.653 \tabularnewline
40 & 0.1047 & 0.0338 & 0.0028 & 13.5253 & 1.1271 & 1.0617 \tabularnewline
41 & 0.105 & 0.0273 & 0.0023 & 7.4391 & 0.6199 & 0.7874 \tabularnewline
42 & 0.1052 & 0.0646 & 0.0054 & 46.4625 & 3.8719 & 1.9677 \tabularnewline
43 & 0.1053 & 0.0458 & 0.0038 & 35.2788 & 2.9399 & 1.7146 \tabularnewline
44 & 0.1054 & -0.0492 & 0.0041 & 29.5175 & 2.4598 & 1.5684 \tabularnewline
45 & 0.1055 & 0.2355 & 0.0196 & 592.484 & 49.3737 & 7.0266 \tabularnewline
46 & 0.1056 & 0.0579 & 0.0048 & 56.2851 & 4.6904 & 2.1657 \tabularnewline
47 & 0.1056 & 0.0425 & 0.0035 & 13.7381 & 1.1448 & 1.07 \tabularnewline
48 & 0.1057 & 0.0373 & 0.0031 & 10.6013 & 0.8834 & 0.9399 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2851&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]37[/C][C]0.1034[/C][C]0.0213[/C][C]0.0018[/C][C]5.9894[/C][C]0.4991[/C][C]0.7065[/C][/ROW]
[ROW][C]38[/C][C]0.104[/C][C]-0.0733[/C][C]0.0061[/C][C]66.8242[/C][C]5.5687[/C][C]2.3598[/C][/ROW]
[ROW][C]39[/C][C]0.1044[/C][C]0.0545[/C][C]0.0045[/C][C]32.7889[/C][C]2.7324[/C][C]1.653[/C][/ROW]
[ROW][C]40[/C][C]0.1047[/C][C]0.0338[/C][C]0.0028[/C][C]13.5253[/C][C]1.1271[/C][C]1.0617[/C][/ROW]
[ROW][C]41[/C][C]0.105[/C][C]0.0273[/C][C]0.0023[/C][C]7.4391[/C][C]0.6199[/C][C]0.7874[/C][/ROW]
[ROW][C]42[/C][C]0.1052[/C][C]0.0646[/C][C]0.0054[/C][C]46.4625[/C][C]3.8719[/C][C]1.9677[/C][/ROW]
[ROW][C]43[/C][C]0.1053[/C][C]0.0458[/C][C]0.0038[/C][C]35.2788[/C][C]2.9399[/C][C]1.7146[/C][/ROW]
[ROW][C]44[/C][C]0.1054[/C][C]-0.0492[/C][C]0.0041[/C][C]29.5175[/C][C]2.4598[/C][C]1.5684[/C][/ROW]
[ROW][C]45[/C][C]0.1055[/C][C]0.2355[/C][C]0.0196[/C][C]592.484[/C][C]49.3737[/C][C]7.0266[/C][/ROW]
[ROW][C]46[/C][C]0.1056[/C][C]0.0579[/C][C]0.0048[/C][C]56.2851[/C][C]4.6904[/C][C]2.1657[/C][/ROW]
[ROW][C]47[/C][C]0.1056[/C][C]0.0425[/C][C]0.0035[/C][C]13.7381[/C][C]1.1448[/C][C]1.07[/C][/ROW]
[ROW][C]48[/C][C]0.1057[/C][C]0.0373[/C][C]0.0031[/C][C]10.6013[/C][C]0.8834[/C][C]0.9399[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2851&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2851&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
370.10340.02130.00185.98940.49910.7065
380.104-0.07330.006166.82425.56872.3598
390.10440.05450.004532.78892.73241.653
400.10470.03380.002813.52531.12711.0617
410.1050.02730.00237.43910.61990.7874
420.10520.06460.005446.46253.87191.9677
430.10530.04580.003835.27882.93991.7146
440.1054-0.04920.004129.51752.45981.5684
450.10550.23550.0196592.48449.37377.0266
460.10560.05790.004856.28514.69042.1657
470.10560.04250.003513.73811.14481.07
480.10570.03730.003110.60130.88340.9399



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