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, 17 Dec 2010 14:26:58 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/17/t1292595899a8dlrkcogdb5pcn.htm/, Retrieved Mon, 06 May 2024 16:13:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111485, Retrieved Mon, 06 May 2024 16:13:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [Aantal openstaand...] [2010-12-17 14:26:58] [f0b33ae54e73edcd25a3e2f31270d1c9] [Current]
Feedback Forum

Post a new message
Dataseries X:
27.951
29.781
32.914
33.488
35.652
36.488
35.387
35.676
34.844
32.447
31.068
29.010
29.812
30.951
32.974
32.936
34.012
32.946
31.948
30.599
27.691
25.073
23.406
22.248
22.896
25.317
26.558
26.471
27.543
26.198
24.725
25.005
23.462
20.780
19.815
19.761
21.454
23.899
24.939
23.580
24.562
24.696
23.785
23.812
21.917
19.713
19.282
18.788
21.453
24.482
27.474
27.264
27.349
30.632
29.429
30.084
26.290
24.379
23.335
21.346
21.106
24.514
28.353
30.805
31.348
34.556
33.855
34.787
32.529
29.998
29.257
28.155
30.466
35.704
39.327
39.351
42.234
43.630
43.722
43.121
37.985
37.135
34.646
33.026
35.087
38.846
42.013
43.908
42.868
44.423
44.167
43.636
44.382
42.142
43.452
36.912
42.413
45.344
44.873
47.510
49.554
47.369
45.998
48.140
48.441
44.928
40.454
38.661
37.246
36.843
36.424
37.594
38.144
38.737
34.560
36.080
33.508
35.462
33.374
32.110
35.533
35.532
37.903
36.763
40.399
44.164
44.496
43.110
43.880
43.930
44.327




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111485&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 time3 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[119])
10740.454-------
10838.661-------
10937.246-------
11036.843-------
11136.424-------
11237.594-------
11338.144-------
11438.737-------
11534.56-------
11636.08-------
11733.508-------
11835.462-------
11933.374-------
12032.1131.435328.241334.62940.33940.117100.1171
12135.53333.002728.485637.51970.13610.65070.03280.436
12235.53235.568630.043841.09350.49480.5050.32560.7819
12337.90337.516931.141743.89220.45280.72910.63160.8986
12436.76338.29431.169145.41890.33680.54280.57630.912
12540.39939.315931.513147.11870.39280.73930.61580.9322
12644.16439.950431.52448.37680.16350.45840.61110.937
12744.49638.690129.683247.6970.10320.11680.81560.8763
12843.1139.080129.527948.63230.20420.13320.73090.8792
12943.8837.120727.052747.18870.09410.12180.75910.7671
13043.9335.295324.736745.85390.05450.05550.48770.6393
13144.32733.853722.826244.88120.03130.03670.5340.534

\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[119]) \tabularnewline
107 & 40.454 & - & - & - & - & - & - & - \tabularnewline
108 & 38.661 & - & - & - & - & - & - & - \tabularnewline
109 & 37.246 & - & - & - & - & - & - & - \tabularnewline
110 & 36.843 & - & - & - & - & - & - & - \tabularnewline
111 & 36.424 & - & - & - & - & - & - & - \tabularnewline
112 & 37.594 & - & - & - & - & - & - & - \tabularnewline
113 & 38.144 & - & - & - & - & - & - & - \tabularnewline
114 & 38.737 & - & - & - & - & - & - & - \tabularnewline
115 & 34.56 & - & - & - & - & - & - & - \tabularnewline
116 & 36.08 & - & - & - & - & - & - & - \tabularnewline
117 & 33.508 & - & - & - & - & - & - & - \tabularnewline
118 & 35.462 & - & - & - & - & - & - & - \tabularnewline
119 & 33.374 & - & - & - & - & - & - & - \tabularnewline
120 & 32.11 & 31.4353 & 28.2413 & 34.6294 & 0.3394 & 0.1171 & 0 & 0.1171 \tabularnewline
121 & 35.533 & 33.0027 & 28.4856 & 37.5197 & 0.1361 & 0.6507 & 0.0328 & 0.436 \tabularnewline
122 & 35.532 & 35.5686 & 30.0438 & 41.0935 & 0.4948 & 0.505 & 0.3256 & 0.7819 \tabularnewline
123 & 37.903 & 37.5169 & 31.1417 & 43.8922 & 0.4528 & 0.7291 & 0.6316 & 0.8986 \tabularnewline
124 & 36.763 & 38.294 & 31.1691 & 45.4189 & 0.3368 & 0.5428 & 0.5763 & 0.912 \tabularnewline
125 & 40.399 & 39.3159 & 31.5131 & 47.1187 & 0.3928 & 0.7393 & 0.6158 & 0.9322 \tabularnewline
126 & 44.164 & 39.9504 & 31.524 & 48.3768 & 0.1635 & 0.4584 & 0.6111 & 0.937 \tabularnewline
127 & 44.496 & 38.6901 & 29.6832 & 47.697 & 0.1032 & 0.1168 & 0.8156 & 0.8763 \tabularnewline
128 & 43.11 & 39.0801 & 29.5279 & 48.6323 & 0.2042 & 0.1332 & 0.7309 & 0.8792 \tabularnewline
129 & 43.88 & 37.1207 & 27.0527 & 47.1887 & 0.0941 & 0.1218 & 0.7591 & 0.7671 \tabularnewline
130 & 43.93 & 35.2953 & 24.7367 & 45.8539 & 0.0545 & 0.0555 & 0.4877 & 0.6393 \tabularnewline
131 & 44.327 & 33.8537 & 22.8262 & 44.8812 & 0.0313 & 0.0367 & 0.534 & 0.534 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111485&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[119])[/C][/ROW]
[ROW][C]107[/C][C]40.454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]38.661[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]37.246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]36.843[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]36.424[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]37.594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]38.144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]38.737[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]34.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]36.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]33.508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]35.462[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]33.374[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]32.11[/C][C]31.4353[/C][C]28.2413[/C][C]34.6294[/C][C]0.3394[/C][C]0.1171[/C][C]0[/C][C]0.1171[/C][/ROW]
[ROW][C]121[/C][C]35.533[/C][C]33.0027[/C][C]28.4856[/C][C]37.5197[/C][C]0.1361[/C][C]0.6507[/C][C]0.0328[/C][C]0.436[/C][/ROW]
[ROW][C]122[/C][C]35.532[/C][C]35.5686[/C][C]30.0438[/C][C]41.0935[/C][C]0.4948[/C][C]0.505[/C][C]0.3256[/C][C]0.7819[/C][/ROW]
[ROW][C]123[/C][C]37.903[/C][C]37.5169[/C][C]31.1417[/C][C]43.8922[/C][C]0.4528[/C][C]0.7291[/C][C]0.6316[/C][C]0.8986[/C][/ROW]
[ROW][C]124[/C][C]36.763[/C][C]38.294[/C][C]31.1691[/C][C]45.4189[/C][C]0.3368[/C][C]0.5428[/C][C]0.5763[/C][C]0.912[/C][/ROW]
[ROW][C]125[/C][C]40.399[/C][C]39.3159[/C][C]31.5131[/C][C]47.1187[/C][C]0.3928[/C][C]0.7393[/C][C]0.6158[/C][C]0.9322[/C][/ROW]
[ROW][C]126[/C][C]44.164[/C][C]39.9504[/C][C]31.524[/C][C]48.3768[/C][C]0.1635[/C][C]0.4584[/C][C]0.6111[/C][C]0.937[/C][/ROW]
[ROW][C]127[/C][C]44.496[/C][C]38.6901[/C][C]29.6832[/C][C]47.697[/C][C]0.1032[/C][C]0.1168[/C][C]0.8156[/C][C]0.8763[/C][/ROW]
[ROW][C]128[/C][C]43.11[/C][C]39.0801[/C][C]29.5279[/C][C]48.6323[/C][C]0.2042[/C][C]0.1332[/C][C]0.7309[/C][C]0.8792[/C][/ROW]
[ROW][C]129[/C][C]43.88[/C][C]37.1207[/C][C]27.0527[/C][C]47.1887[/C][C]0.0941[/C][C]0.1218[/C][C]0.7591[/C][C]0.7671[/C][/ROW]
[ROW][C]130[/C][C]43.93[/C][C]35.2953[/C][C]24.7367[/C][C]45.8539[/C][C]0.0545[/C][C]0.0555[/C][C]0.4877[/C][C]0.6393[/C][/ROW]
[ROW][C]131[/C][C]44.327[/C][C]33.8537[/C][C]22.8262[/C][C]44.8812[/C][C]0.0313[/C][C]0.0367[/C][C]0.534[/C][C]0.534[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111485&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111485&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[119])
10740.454-------
10838.661-------
10937.246-------
11036.843-------
11136.424-------
11237.594-------
11338.144-------
11438.737-------
11534.56-------
11636.08-------
11733.508-------
11835.462-------
11933.374-------
12032.1131.435328.241334.62940.33940.117100.1171
12135.53333.002728.485637.51970.13610.65070.03280.436
12235.53235.568630.043841.09350.49480.5050.32560.7819
12337.90337.516931.141743.89220.45280.72910.63160.8986
12436.76338.29431.169145.41890.33680.54280.57630.912
12540.39939.315931.513147.11870.39280.73930.61580.9322
12644.16439.950431.52448.37680.16350.45840.61110.937
12744.49638.690129.683247.6970.10320.11680.81560.8763
12843.1139.080129.527948.63230.20420.13320.73090.8792
12943.8837.120727.052747.18870.09410.12180.75910.7671
13043.9335.295324.736745.85390.05450.05550.48770.6393
13144.32733.853722.826244.88120.03130.03670.5340.534







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.05180.021500.455200
1210.06980.07670.04916.40253.42891.8517
1220.0792-0.0010.03310.00132.28641.5121
1230.08670.01030.02740.14911.7521.3236
1240.0949-0.040.02992.34391.87041.3676
1250.10130.02750.02951.17311.75421.3245
1260.10760.10550.040417.75464.042.01
1270.11880.15010.054133.70827.74852.7836
1280.12470.10310.059516.24018.6922.9482
1290.13840.18210.071845.687912.39163.5202
1300.15260.24460.087574.557718.04314.2477
1310.16620.30940.106109.690125.68035.0676

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.0518 & 0.0215 & 0 & 0.4552 & 0 & 0 \tabularnewline
121 & 0.0698 & 0.0767 & 0.0491 & 6.4025 & 3.4289 & 1.8517 \tabularnewline
122 & 0.0792 & -0.001 & 0.0331 & 0.0013 & 2.2864 & 1.5121 \tabularnewline
123 & 0.0867 & 0.0103 & 0.0274 & 0.1491 & 1.752 & 1.3236 \tabularnewline
124 & 0.0949 & -0.04 & 0.0299 & 2.3439 & 1.8704 & 1.3676 \tabularnewline
125 & 0.1013 & 0.0275 & 0.0295 & 1.1731 & 1.7542 & 1.3245 \tabularnewline
126 & 0.1076 & 0.1055 & 0.0404 & 17.7546 & 4.04 & 2.01 \tabularnewline
127 & 0.1188 & 0.1501 & 0.0541 & 33.7082 & 7.7485 & 2.7836 \tabularnewline
128 & 0.1247 & 0.1031 & 0.0595 & 16.2401 & 8.692 & 2.9482 \tabularnewline
129 & 0.1384 & 0.1821 & 0.0718 & 45.6879 & 12.3916 & 3.5202 \tabularnewline
130 & 0.1526 & 0.2446 & 0.0875 & 74.5577 & 18.0431 & 4.2477 \tabularnewline
131 & 0.1662 & 0.3094 & 0.106 & 109.6901 & 25.6803 & 5.0676 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111485&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]120[/C][C]0.0518[/C][C]0.0215[/C][C]0[/C][C]0.4552[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0698[/C][C]0.0767[/C][C]0.0491[/C][C]6.4025[/C][C]3.4289[/C][C]1.8517[/C][/ROW]
[ROW][C]122[/C][C]0.0792[/C][C]-0.001[/C][C]0.0331[/C][C]0.0013[/C][C]2.2864[/C][C]1.5121[/C][/ROW]
[ROW][C]123[/C][C]0.0867[/C][C]0.0103[/C][C]0.0274[/C][C]0.1491[/C][C]1.752[/C][C]1.3236[/C][/ROW]
[ROW][C]124[/C][C]0.0949[/C][C]-0.04[/C][C]0.0299[/C][C]2.3439[/C][C]1.8704[/C][C]1.3676[/C][/ROW]
[ROW][C]125[/C][C]0.1013[/C][C]0.0275[/C][C]0.0295[/C][C]1.1731[/C][C]1.7542[/C][C]1.3245[/C][/ROW]
[ROW][C]126[/C][C]0.1076[/C][C]0.1055[/C][C]0.0404[/C][C]17.7546[/C][C]4.04[/C][C]2.01[/C][/ROW]
[ROW][C]127[/C][C]0.1188[/C][C]0.1501[/C][C]0.0541[/C][C]33.7082[/C][C]7.7485[/C][C]2.7836[/C][/ROW]
[ROW][C]128[/C][C]0.1247[/C][C]0.1031[/C][C]0.0595[/C][C]16.2401[/C][C]8.692[/C][C]2.9482[/C][/ROW]
[ROW][C]129[/C][C]0.1384[/C][C]0.1821[/C][C]0.0718[/C][C]45.6879[/C][C]12.3916[/C][C]3.5202[/C][/ROW]
[ROW][C]130[/C][C]0.1526[/C][C]0.2446[/C][C]0.0875[/C][C]74.5577[/C][C]18.0431[/C][C]4.2477[/C][/ROW]
[ROW][C]131[/C][C]0.1662[/C][C]0.3094[/C][C]0.106[/C][C]109.6901[/C][C]25.6803[/C][C]5.0676[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111485&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111485&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
1200.05180.021500.455200
1210.06980.07670.04916.40253.42891.8517
1220.0792-0.0010.03310.00132.28641.5121
1230.08670.01030.02740.14911.7521.3236
1240.0949-0.040.02992.34391.87041.3676
1250.10130.02750.02951.17311.75421.3245
1260.10760.10550.040417.75464.042.01
1270.11880.15010.054133.70827.74852.7836
1280.12470.10310.059516.24018.6922.9482
1290.13840.18210.071845.687912.39163.5202
1300.15260.24460.087574.557718.04314.2477
1310.16620.30940.106109.690125.68035.0676



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')