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 computationMon, 22 Dec 2008 15:17:32 -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/22/t1229984307ojqey70me39r68t.htm/, Retrieved Mon, 13 May 2024 01:16:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36240, Retrieved Mon, 13 May 2024 01:16:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper: Arima Fore...] [2008-12-19 14:26:10] [9e54d1454d464f1bf9ee4a54d5d56945]
-         [ARIMA Forecasting] [] [2008-12-22 22:17:32] [27189814204044fdc56e2241a9375b9f] [Current]
Feedback Forum

Post a new message
Dataseries X:
17,3
15,4
16,9
20,8
16,4
11,3
17,5
16,6
17,5
19,5
18,8
20,2
19,2
14,4
24,5
25,7
27,1
21
18,6
20
21,8
20,4
18
21,5
19,1
19,7
26
26,3
24,6
22,4
32
24
30
24,1
26,3
29,8
21,9
22,8
29,2
27,5
27,4
31
26,1
22,2
34
26,9
31,9
34,2
31,2
28,5
37,1
36
34,8
32,1
37,2
36,3
39,5
37,1
35,6
36,2
35,9
32,5
39,2
39,4
42,8
34,5
43,7
46,3
40,8
48,4
43,2
48,1
42,8




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36240&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36240&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36240&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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[61])
4931.2-------
5028.5-------
5137.1-------
5236-------
5334.8-------
5432.1-------
5537.2-------
5636.3-------
5739.5-------
5837.1-------
5935.6-------
6036.2-------
6135.9-------
6232.531.894425.278139.2790.43610.14390.81620.1439
6339.239.913231.433549.40430.44150.93710.71940.7964
6439.441.384131.904752.09490.35830.65530.83780.8422
6542.838.275427.645650.63050.23640.42920.70930.6469
6634.535.620924.979348.14580.43040.13060.70920.4826
6743.738.162626.068352.55460.22540.6910.55210.621
6846.335.367823.245550.02460.07190.13260.45040.4716
6940.840.814227.057157.38910.49930.25830.56170.7194
7048.436.810423.2253.51790.0870.31990.48640.5425
7143.237.717223.490355.2970.27050.11680.59330.5803
7248.139.564324.410158.360.18670.35230.63710.6488
7342.836.298421.445255.03760.24820.10850.51660.5166

\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[61]) \tabularnewline
49 & 31.2 & - & - & - & - & - & - & - \tabularnewline
50 & 28.5 & - & - & - & - & - & - & - \tabularnewline
51 & 37.1 & - & - & - & - & - & - & - \tabularnewline
52 & 36 & - & - & - & - & - & - & - \tabularnewline
53 & 34.8 & - & - & - & - & - & - & - \tabularnewline
54 & 32.1 & - & - & - & - & - & - & - \tabularnewline
55 & 37.2 & - & - & - & - & - & - & - \tabularnewline
56 & 36.3 & - & - & - & - & - & - & - \tabularnewline
57 & 39.5 & - & - & - & - & - & - & - \tabularnewline
58 & 37.1 & - & - & - & - & - & - & - \tabularnewline
59 & 35.6 & - & - & - & - & - & - & - \tabularnewline
60 & 36.2 & - & - & - & - & - & - & - \tabularnewline
61 & 35.9 & - & - & - & - & - & - & - \tabularnewline
62 & 32.5 & 31.8944 & 25.2781 & 39.279 & 0.4361 & 0.1439 & 0.8162 & 0.1439 \tabularnewline
63 & 39.2 & 39.9132 & 31.4335 & 49.4043 & 0.4415 & 0.9371 & 0.7194 & 0.7964 \tabularnewline
64 & 39.4 & 41.3841 & 31.9047 & 52.0949 & 0.3583 & 0.6553 & 0.8378 & 0.8422 \tabularnewline
65 & 42.8 & 38.2754 & 27.6456 & 50.6305 & 0.2364 & 0.4292 & 0.7093 & 0.6469 \tabularnewline
66 & 34.5 & 35.6209 & 24.9793 & 48.1458 & 0.4304 & 0.1306 & 0.7092 & 0.4826 \tabularnewline
67 & 43.7 & 38.1626 & 26.0683 & 52.5546 & 0.2254 & 0.691 & 0.5521 & 0.621 \tabularnewline
68 & 46.3 & 35.3678 & 23.2455 & 50.0246 & 0.0719 & 0.1326 & 0.4504 & 0.4716 \tabularnewline
69 & 40.8 & 40.8142 & 27.0571 & 57.3891 & 0.4993 & 0.2583 & 0.5617 & 0.7194 \tabularnewline
70 & 48.4 & 36.8104 & 23.22 & 53.5179 & 0.087 & 0.3199 & 0.4864 & 0.5425 \tabularnewline
71 & 43.2 & 37.7172 & 23.4903 & 55.297 & 0.2705 & 0.1168 & 0.5933 & 0.5803 \tabularnewline
72 & 48.1 & 39.5643 & 24.4101 & 58.36 & 0.1867 & 0.3523 & 0.6371 & 0.6488 \tabularnewline
73 & 42.8 & 36.2984 & 21.4452 & 55.0376 & 0.2482 & 0.1085 & 0.5166 & 0.5166 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36240&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[61])[/C][/ROW]
[ROW][C]49[/C][C]31.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]28.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]37.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]34.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]32.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]37.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]36.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]39.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]37.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]35.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]36.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]35.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]32.5[/C][C]31.8944[/C][C]25.2781[/C][C]39.279[/C][C]0.4361[/C][C]0.1439[/C][C]0.8162[/C][C]0.1439[/C][/ROW]
[ROW][C]63[/C][C]39.2[/C][C]39.9132[/C][C]31.4335[/C][C]49.4043[/C][C]0.4415[/C][C]0.9371[/C][C]0.7194[/C][C]0.7964[/C][/ROW]
[ROW][C]64[/C][C]39.4[/C][C]41.3841[/C][C]31.9047[/C][C]52.0949[/C][C]0.3583[/C][C]0.6553[/C][C]0.8378[/C][C]0.8422[/C][/ROW]
[ROW][C]65[/C][C]42.8[/C][C]38.2754[/C][C]27.6456[/C][C]50.6305[/C][C]0.2364[/C][C]0.4292[/C][C]0.7093[/C][C]0.6469[/C][/ROW]
[ROW][C]66[/C][C]34.5[/C][C]35.6209[/C][C]24.9793[/C][C]48.1458[/C][C]0.4304[/C][C]0.1306[/C][C]0.7092[/C][C]0.4826[/C][/ROW]
[ROW][C]67[/C][C]43.7[/C][C]38.1626[/C][C]26.0683[/C][C]52.5546[/C][C]0.2254[/C][C]0.691[/C][C]0.5521[/C][C]0.621[/C][/ROW]
[ROW][C]68[/C][C]46.3[/C][C]35.3678[/C][C]23.2455[/C][C]50.0246[/C][C]0.0719[/C][C]0.1326[/C][C]0.4504[/C][C]0.4716[/C][/ROW]
[ROW][C]69[/C][C]40.8[/C][C]40.8142[/C][C]27.0571[/C][C]57.3891[/C][C]0.4993[/C][C]0.2583[/C][C]0.5617[/C][C]0.7194[/C][/ROW]
[ROW][C]70[/C][C]48.4[/C][C]36.8104[/C][C]23.22[/C][C]53.5179[/C][C]0.087[/C][C]0.3199[/C][C]0.4864[/C][C]0.5425[/C][/ROW]
[ROW][C]71[/C][C]43.2[/C][C]37.7172[/C][C]23.4903[/C][C]55.297[/C][C]0.2705[/C][C]0.1168[/C][C]0.5933[/C][C]0.5803[/C][/ROW]
[ROW][C]72[/C][C]48.1[/C][C]39.5643[/C][C]24.4101[/C][C]58.36[/C][C]0.1867[/C][C]0.3523[/C][C]0.6371[/C][C]0.6488[/C][/ROW]
[ROW][C]73[/C][C]42.8[/C][C]36.2984[/C][C]21.4452[/C][C]55.0376[/C][C]0.2482[/C][C]0.1085[/C][C]0.5166[/C][C]0.5166[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36240&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36240&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[61])
4931.2-------
5028.5-------
5137.1-------
5236-------
5334.8-------
5432.1-------
5537.2-------
5636.3-------
5739.5-------
5837.1-------
5935.6-------
6036.2-------
6135.9-------
6232.531.894425.278139.2790.43610.14390.81620.1439
6339.239.913231.433549.40430.44150.93710.71940.7964
6439.441.384131.904752.09490.35830.65530.83780.8422
6542.838.275427.645650.63050.23640.42920.70930.6469
6634.535.620924.979348.14580.43040.13060.70920.4826
6743.738.162626.068352.55460.22540.6910.55210.621
6846.335.367823.245550.02460.07190.13260.45040.4716
6940.840.814227.057157.38910.49930.25830.56170.7194
7048.436.810423.2253.51790.0870.31990.48640.5425
7143.237.717223.490355.2970.27050.11680.59330.5803
7248.139.564324.410158.360.18670.35230.63710.6488
7342.836.298421.445255.03760.24820.10850.51660.5166







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.11810.0190.00160.36680.03060.1748
630.1213-0.01790.00150.50860.04240.2059
640.132-0.04790.0043.93680.32810.5728
650.16470.11820.009920.47191.7061.3061
660.1794-0.03150.00261.25630.10470.3236
670.19240.14510.012130.6632.55531.5985
680.21140.30910.0258119.51279.95943.1559
690.2072-3e-0402e-0400.0041
700.23160.31480.0262134.319211.19333.3456
710.23780.14540.012130.06092.50511.5827
720.24240.21570.01872.85816.07152.464
730.26340.17910.014942.27123.52261.8769

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.1181 & 0.019 & 0.0016 & 0.3668 & 0.0306 & 0.1748 \tabularnewline
63 & 0.1213 & -0.0179 & 0.0015 & 0.5086 & 0.0424 & 0.2059 \tabularnewline
64 & 0.132 & -0.0479 & 0.004 & 3.9368 & 0.3281 & 0.5728 \tabularnewline
65 & 0.1647 & 0.1182 & 0.0099 & 20.4719 & 1.706 & 1.3061 \tabularnewline
66 & 0.1794 & -0.0315 & 0.0026 & 1.2563 & 0.1047 & 0.3236 \tabularnewline
67 & 0.1924 & 0.1451 & 0.0121 & 30.663 & 2.5553 & 1.5985 \tabularnewline
68 & 0.2114 & 0.3091 & 0.0258 & 119.5127 & 9.9594 & 3.1559 \tabularnewline
69 & 0.2072 & -3e-04 & 0 & 2e-04 & 0 & 0.0041 \tabularnewline
70 & 0.2316 & 0.3148 & 0.0262 & 134.3192 & 11.1933 & 3.3456 \tabularnewline
71 & 0.2378 & 0.1454 & 0.0121 & 30.0609 & 2.5051 & 1.5827 \tabularnewline
72 & 0.2424 & 0.2157 & 0.018 & 72.8581 & 6.0715 & 2.464 \tabularnewline
73 & 0.2634 & 0.1791 & 0.0149 & 42.2712 & 3.5226 & 1.8769 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36240&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]62[/C][C]0.1181[/C][C]0.019[/C][C]0.0016[/C][C]0.3668[/C][C]0.0306[/C][C]0.1748[/C][/ROW]
[ROW][C]63[/C][C]0.1213[/C][C]-0.0179[/C][C]0.0015[/C][C]0.5086[/C][C]0.0424[/C][C]0.2059[/C][/ROW]
[ROW][C]64[/C][C]0.132[/C][C]-0.0479[/C][C]0.004[/C][C]3.9368[/C][C]0.3281[/C][C]0.5728[/C][/ROW]
[ROW][C]65[/C][C]0.1647[/C][C]0.1182[/C][C]0.0099[/C][C]20.4719[/C][C]1.706[/C][C]1.3061[/C][/ROW]
[ROW][C]66[/C][C]0.1794[/C][C]-0.0315[/C][C]0.0026[/C][C]1.2563[/C][C]0.1047[/C][C]0.3236[/C][/ROW]
[ROW][C]67[/C][C]0.1924[/C][C]0.1451[/C][C]0.0121[/C][C]30.663[/C][C]2.5553[/C][C]1.5985[/C][/ROW]
[ROW][C]68[/C][C]0.2114[/C][C]0.3091[/C][C]0.0258[/C][C]119.5127[/C][C]9.9594[/C][C]3.1559[/C][/ROW]
[ROW][C]69[/C][C]0.2072[/C][C]-3e-04[/C][C]0[/C][C]2e-04[/C][C]0[/C][C]0.0041[/C][/ROW]
[ROW][C]70[/C][C]0.2316[/C][C]0.3148[/C][C]0.0262[/C][C]134.3192[/C][C]11.1933[/C][C]3.3456[/C][/ROW]
[ROW][C]71[/C][C]0.2378[/C][C]0.1454[/C][C]0.0121[/C][C]30.0609[/C][C]2.5051[/C][C]1.5827[/C][/ROW]
[ROW][C]72[/C][C]0.2424[/C][C]0.2157[/C][C]0.018[/C][C]72.8581[/C][C]6.0715[/C][C]2.464[/C][/ROW]
[ROW][C]73[/C][C]0.2634[/C][C]0.1791[/C][C]0.0149[/C][C]42.2712[/C][C]3.5226[/C][C]1.8769[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36240&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36240&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
620.11810.0190.00160.36680.03060.1748
630.1213-0.01790.00150.50860.04240.2059
640.132-0.04790.0043.93680.32810.5728
650.16470.11820.009920.47191.7061.3061
660.1794-0.03150.00261.25630.10470.3236
670.19240.14510.012130.6632.55531.5985
680.21140.30910.0258119.51279.95943.1559
690.2072-3e-0402e-0400.0041
700.23160.31480.0262134.319211.19333.3456
710.23780.14540.012130.06092.50511.5827
720.24240.21570.01872.85816.07152.464
730.26340.17910.014942.27123.52261.8769



Parameters (Session):
par1 = 12 ; par2 = 0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')