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 computationSat, 13 Dec 2008 09:02:49 -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/13/t12291842540qpint6g0a6mz7p.htm/, Retrieved Fri, 17 May 2024 03:04:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33167, Retrieved Fri, 17 May 2024 03:04:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact201
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Taak 11 ARIMA For...] [2008-12-09 19:00:10] [819b576fab25b35cfda70f80599828ec]
-   P     [ARIMA Forecasting] [Paper Hoofdstuk 4...] [2008-12-13 16:02:49] [286e96bd53289970f8e5f25a93fb50b3] [Current]
-   PD      [ARIMA Forecasting] [Paper, hoofdstuk ...] [2008-12-14 10:45:59] [79c17183721a40a589db5f9f561947d8]
-   PD      [ARIMA Forecasting] [Paper, hoofdstuk ...] [2008-12-14 10:55:51] [79c17183721a40a589db5f9f561947d8]
Feedback Forum

Post a new message
Dataseries X:
58.972
59.249
63.955
53.785
52.760
44.795
37.348
32.370
32.717
40.974
33.591
21.124
58.608
46.865
51.378
46.235
47.206
45.382
41.227
33.795
31.295
42.625
33.625
21.538
56.421
53.152
53.536
52.408
41.454
38.271
35.306
26.414
31.917
38.030
27.534
18.387
50.556
43.901
48.572
43.899
37.532
40.357
35.489
29.027
34.485
42.598
30.306
26.451
47.460
50.104
61.465
53.726
39.477
43.895
31.481
29.896
33.842
39.120
33.702
25.094




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=33167&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=33167&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33167&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[48])
3618.387-------
3750.556-------
3843.901-------
3948.572-------
4043.899-------
4137.532-------
4240.357-------
4335.489-------
4429.027-------
4534.485-------
4642.598-------
4730.306-------
4826.451-------
4947.4655.337946.884263.79160.033910.86621
5050.10446.543836.340656.74710.2470.43020.69420.9999
5161.46549.820738.89160.75050.01840.47970.58861
5253.72644.239232.971855.50650.04940.00140.52360.999
5339.47737.2825.844648.71550.35330.00240.48280.9683
5443.89539.719128.195151.24310.23880.51640.45680.988
5531.48134.599623.026646.17260.29870.05770.44010.9162
5629.89627.973716.372339.5750.37270.27670.42940.6015
5733.84233.324821.706644.94310.46520.71850.42240.8769
5839.1241.368229.739652.99680.35240.89770.41790.994
5933.70229.030817.395740.6660.21570.04460.4150.6681
6025.09425.146313.50736.78550.49650.07480.4130.413

\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 & 18.387 & - & - & - & - & - & - & - \tabularnewline
37 & 50.556 & - & - & - & - & - & - & - \tabularnewline
38 & 43.901 & - & - & - & - & - & - & - \tabularnewline
39 & 48.572 & - & - & - & - & - & - & - \tabularnewline
40 & 43.899 & - & - & - & - & - & - & - \tabularnewline
41 & 37.532 & - & - & - & - & - & - & - \tabularnewline
42 & 40.357 & - & - & - & - & - & - & - \tabularnewline
43 & 35.489 & - & - & - & - & - & - & - \tabularnewline
44 & 29.027 & - & - & - & - & - & - & - \tabularnewline
45 & 34.485 & - & - & - & - & - & - & - \tabularnewline
46 & 42.598 & - & - & - & - & - & - & - \tabularnewline
47 & 30.306 & - & - & - & - & - & - & - \tabularnewline
48 & 26.451 & - & - & - & - & - & - & - \tabularnewline
49 & 47.46 & 55.3379 & 46.8842 & 63.7916 & 0.0339 & 1 & 0.8662 & 1 \tabularnewline
50 & 50.104 & 46.5438 & 36.3406 & 56.7471 & 0.247 & 0.4302 & 0.6942 & 0.9999 \tabularnewline
51 & 61.465 & 49.8207 & 38.891 & 60.7505 & 0.0184 & 0.4797 & 0.5886 & 1 \tabularnewline
52 & 53.726 & 44.2392 & 32.9718 & 55.5065 & 0.0494 & 0.0014 & 0.5236 & 0.999 \tabularnewline
53 & 39.477 & 37.28 & 25.8446 & 48.7155 & 0.3533 & 0.0024 & 0.4828 & 0.9683 \tabularnewline
54 & 43.895 & 39.7191 & 28.1951 & 51.2431 & 0.2388 & 0.5164 & 0.4568 & 0.988 \tabularnewline
55 & 31.481 & 34.5996 & 23.0266 & 46.1726 & 0.2987 & 0.0577 & 0.4401 & 0.9162 \tabularnewline
56 & 29.896 & 27.9737 & 16.3723 & 39.575 & 0.3727 & 0.2767 & 0.4294 & 0.6015 \tabularnewline
57 & 33.842 & 33.3248 & 21.7066 & 44.9431 & 0.4652 & 0.7185 & 0.4224 & 0.8769 \tabularnewline
58 & 39.12 & 41.3682 & 29.7396 & 52.9968 & 0.3524 & 0.8977 & 0.4179 & 0.994 \tabularnewline
59 & 33.702 & 29.0308 & 17.3957 & 40.666 & 0.2157 & 0.0446 & 0.415 & 0.6681 \tabularnewline
60 & 25.094 & 25.1463 & 13.507 & 36.7855 & 0.4965 & 0.0748 & 0.413 & 0.413 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33167&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]18.387[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]50.556[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]43.901[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]48.572[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]43.899[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]37.532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]40.357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]35.489[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]29.027[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]34.485[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]42.598[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]30.306[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]26.451[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]47.46[/C][C]55.3379[/C][C]46.8842[/C][C]63.7916[/C][C]0.0339[/C][C]1[/C][C]0.8662[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]50.104[/C][C]46.5438[/C][C]36.3406[/C][C]56.7471[/C][C]0.247[/C][C]0.4302[/C][C]0.6942[/C][C]0.9999[/C][/ROW]
[ROW][C]51[/C][C]61.465[/C][C]49.8207[/C][C]38.891[/C][C]60.7505[/C][C]0.0184[/C][C]0.4797[/C][C]0.5886[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]53.726[/C][C]44.2392[/C][C]32.9718[/C][C]55.5065[/C][C]0.0494[/C][C]0.0014[/C][C]0.5236[/C][C]0.999[/C][/ROW]
[ROW][C]53[/C][C]39.477[/C][C]37.28[/C][C]25.8446[/C][C]48.7155[/C][C]0.3533[/C][C]0.0024[/C][C]0.4828[/C][C]0.9683[/C][/ROW]
[ROW][C]54[/C][C]43.895[/C][C]39.7191[/C][C]28.1951[/C][C]51.2431[/C][C]0.2388[/C][C]0.5164[/C][C]0.4568[/C][C]0.988[/C][/ROW]
[ROW][C]55[/C][C]31.481[/C][C]34.5996[/C][C]23.0266[/C][C]46.1726[/C][C]0.2987[/C][C]0.0577[/C][C]0.4401[/C][C]0.9162[/C][/ROW]
[ROW][C]56[/C][C]29.896[/C][C]27.9737[/C][C]16.3723[/C][C]39.575[/C][C]0.3727[/C][C]0.2767[/C][C]0.4294[/C][C]0.6015[/C][/ROW]
[ROW][C]57[/C][C]33.842[/C][C]33.3248[/C][C]21.7066[/C][C]44.9431[/C][C]0.4652[/C][C]0.7185[/C][C]0.4224[/C][C]0.8769[/C][/ROW]
[ROW][C]58[/C][C]39.12[/C][C]41.3682[/C][C]29.7396[/C][C]52.9968[/C][C]0.3524[/C][C]0.8977[/C][C]0.4179[/C][C]0.994[/C][/ROW]
[ROW][C]59[/C][C]33.702[/C][C]29.0308[/C][C]17.3957[/C][C]40.666[/C][C]0.2157[/C][C]0.0446[/C][C]0.415[/C][C]0.6681[/C][/ROW]
[ROW][C]60[/C][C]25.094[/C][C]25.1463[/C][C]13.507[/C][C]36.7855[/C][C]0.4965[/C][C]0.0748[/C][C]0.413[/C][C]0.413[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33167&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33167&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])
3618.387-------
3750.556-------
3843.901-------
3948.572-------
4043.899-------
4137.532-------
4240.357-------
4335.489-------
4429.027-------
4534.485-------
4642.598-------
4730.306-------
4826.451-------
4947.4655.337946.884263.79160.033910.86621
5050.10446.543836.340656.74710.2470.43020.69420.9999
5161.46549.820738.89160.75050.01840.47970.58861
5253.72644.239232.971855.50650.04940.00140.52360.999
5339.47737.2825.844648.71550.35330.00240.48280.9683
5443.89539.719128.195151.24310.23880.51640.45680.988
5531.48134.599623.026646.17260.29870.05770.44010.9162
5629.89627.973716.372339.5750.37270.27670.42940.6015
5733.84233.324821.706644.94310.46520.71850.42240.8769
5839.1241.368229.739652.99680.35240.89770.41790.994
5933.70229.030817.395740.6660.21570.04460.4150.6681
6025.09425.146313.50736.78550.49650.07480.4130.413







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0779-0.14240.011962.06125.17182.2742
500.11180.07650.006412.67481.05621.0277
510.11190.23370.0195135.588611.29913.3614
520.12990.21440.017989.99997.52.7386
530.15650.05890.00494.82670.40220.6342
540.1480.10510.008817.43811.45321.2055
550.1707-0.09010.00759.72560.81050.9003
560.21160.06870.00573.69530.30790.5549
570.17790.01550.00130.26750.02230.1493
580.1434-0.05430.00455.05450.42120.649
590.20450.16090.013421.81981.81831.3484
600.2362-0.00212e-040.00272e-040.0151

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0779 & -0.1424 & 0.0119 & 62.0612 & 5.1718 & 2.2742 \tabularnewline
50 & 0.1118 & 0.0765 & 0.0064 & 12.6748 & 1.0562 & 1.0277 \tabularnewline
51 & 0.1119 & 0.2337 & 0.0195 & 135.5886 & 11.2991 & 3.3614 \tabularnewline
52 & 0.1299 & 0.2144 & 0.0179 & 89.9999 & 7.5 & 2.7386 \tabularnewline
53 & 0.1565 & 0.0589 & 0.0049 & 4.8267 & 0.4022 & 0.6342 \tabularnewline
54 & 0.148 & 0.1051 & 0.0088 & 17.4381 & 1.4532 & 1.2055 \tabularnewline
55 & 0.1707 & -0.0901 & 0.0075 & 9.7256 & 0.8105 & 0.9003 \tabularnewline
56 & 0.2116 & 0.0687 & 0.0057 & 3.6953 & 0.3079 & 0.5549 \tabularnewline
57 & 0.1779 & 0.0155 & 0.0013 & 0.2675 & 0.0223 & 0.1493 \tabularnewline
58 & 0.1434 & -0.0543 & 0.0045 & 5.0545 & 0.4212 & 0.649 \tabularnewline
59 & 0.2045 & 0.1609 & 0.0134 & 21.8198 & 1.8183 & 1.3484 \tabularnewline
60 & 0.2362 & -0.0021 & 2e-04 & 0.0027 & 2e-04 & 0.0151 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33167&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.0779[/C][C]-0.1424[/C][C]0.0119[/C][C]62.0612[/C][C]5.1718[/C][C]2.2742[/C][/ROW]
[ROW][C]50[/C][C]0.1118[/C][C]0.0765[/C][C]0.0064[/C][C]12.6748[/C][C]1.0562[/C][C]1.0277[/C][/ROW]
[ROW][C]51[/C][C]0.1119[/C][C]0.2337[/C][C]0.0195[/C][C]135.5886[/C][C]11.2991[/C][C]3.3614[/C][/ROW]
[ROW][C]52[/C][C]0.1299[/C][C]0.2144[/C][C]0.0179[/C][C]89.9999[/C][C]7.5[/C][C]2.7386[/C][/ROW]
[ROW][C]53[/C][C]0.1565[/C][C]0.0589[/C][C]0.0049[/C][C]4.8267[/C][C]0.4022[/C][C]0.6342[/C][/ROW]
[ROW][C]54[/C][C]0.148[/C][C]0.1051[/C][C]0.0088[/C][C]17.4381[/C][C]1.4532[/C][C]1.2055[/C][/ROW]
[ROW][C]55[/C][C]0.1707[/C][C]-0.0901[/C][C]0.0075[/C][C]9.7256[/C][C]0.8105[/C][C]0.9003[/C][/ROW]
[ROW][C]56[/C][C]0.2116[/C][C]0.0687[/C][C]0.0057[/C][C]3.6953[/C][C]0.3079[/C][C]0.5549[/C][/ROW]
[ROW][C]57[/C][C]0.1779[/C][C]0.0155[/C][C]0.0013[/C][C]0.2675[/C][C]0.0223[/C][C]0.1493[/C][/ROW]
[ROW][C]58[/C][C]0.1434[/C][C]-0.0543[/C][C]0.0045[/C][C]5.0545[/C][C]0.4212[/C][C]0.649[/C][/ROW]
[ROW][C]59[/C][C]0.2045[/C][C]0.1609[/C][C]0.0134[/C][C]21.8198[/C][C]1.8183[/C][C]1.3484[/C][/ROW]
[ROW][C]60[/C][C]0.2362[/C][C]-0.0021[/C][C]2e-04[/C][C]0.0027[/C][C]2e-04[/C][C]0.0151[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33167&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33167&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.0779-0.14240.011962.06125.17182.2742
500.11180.07650.006412.67481.05621.0277
510.11190.23370.0195135.588611.29913.3614
520.12990.21440.017989.99997.52.7386
530.15650.05890.00494.82670.40220.6342
540.1480.10510.008817.43811.45321.2055
550.1707-0.09010.00759.72560.81050.9003
560.21160.06870.00573.69530.30790.5549
570.17790.01550.00130.26750.02230.1493
580.1434-0.05430.00455.05450.42120.649
590.20450.16090.013421.81981.81831.3484
600.2362-0.00212e-040.00272e-040.0151



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