Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 24 Jan 2008 06:08:17 -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/Jan/24/t1201179862wm6qwo64l7a6xpw.htm/, Retrieved Tue, 14 May 2024 23:47:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=8058, Retrieved Tue, 14 May 2024 23:47:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordswl
Estimated Impact288
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper2] [2008-01-24 13:08:17] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.3
7.2
7.1
6.9
6.8
6.7
6.8
6.8
6.7
6.8
6.8
6.7
6.3
6.2
6.2
6.5
6.5
6.4
6.2
6.2
6.3
7.5
7.4
7.4
7.4
7.4
7.4
7.2
7.2
7.2
7.5
7.4
7.5
8.0
8.0
8.0
8.1
8.1
8.1
7.9
7.9
8.0
8.2
8.1
8.2
8.5
8.5
8.6
8.4
8.4
8.4
7.7
7.8
7.9
8.8
8.8
8.9
8.5
8.5
8.5
8.4
8.5
8.4
8.3
8.4
8.4
8.5
8.5
8.5
8.5
8.5
8.5
8.5
8.5
8.5
8.3
8.3
8.3
8.2
8.1
8.1
8.2
8.0
7.9
7.9
7.8
7.7
7.9
7.7
7.6




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 5 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8058&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8058&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8058&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 time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[78])
668.4-------
678.50000000000001-------
688.50000000000001-------
698.50000000000001-------
708.50000000000001-------
718.50000000000001-------
728.50000000000001-------
738.50000000000001-------
748.50000000000001-------
758.50000000000001-------
768.3-------
778.3-------
788.3-------
798.28.59328.18019.0250.03710.90840.66390.9084
808.18.59958.00139.23760.06250.89010.62010.8212
818.18.58117.84629.37730.11820.88180.57910.7555
828.28.28367.49959.14080.42420.66270.31040.4851
8388.30297.45579.23580.26230.58560.33940.5024
847.98.26297.36359.26010.23780.69730.32060.4709
857.98.23047.27659.29550.27160.72840.30990.4491
867.88.23897.22979.37310.22410.72090.32590.4579
877.78.23487.17489.43360.1910.76140.33230.4575
887.98.36987.2469.64790.23570.84780.54260.5426
897.78.38287.2129.72190.15880.76010.54820.5482
907.68.37477.16169.76970.13820.82840.54180.5418

\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[78]) \tabularnewline
66 & 8.4 & - & - & - & - & - & - & - \tabularnewline
67 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
68 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
69 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
70 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
71 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
72 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
73 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
74 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
75 & 8.50000000000001 & - & - & - & - & - & - & - \tabularnewline
76 & 8.3 & - & - & - & - & - & - & - \tabularnewline
77 & 8.3 & - & - & - & - & - & - & - \tabularnewline
78 & 8.3 & - & - & - & - & - & - & - \tabularnewline
79 & 8.2 & 8.5932 & 8.1801 & 9.025 & 0.0371 & 0.9084 & 0.6639 & 0.9084 \tabularnewline
80 & 8.1 & 8.5995 & 8.0013 & 9.2376 & 0.0625 & 0.8901 & 0.6201 & 0.8212 \tabularnewline
81 & 8.1 & 8.5811 & 7.8462 & 9.3773 & 0.1182 & 0.8818 & 0.5791 & 0.7555 \tabularnewline
82 & 8.2 & 8.2836 & 7.4995 & 9.1408 & 0.4242 & 0.6627 & 0.3104 & 0.4851 \tabularnewline
83 & 8 & 8.3029 & 7.4557 & 9.2358 & 0.2623 & 0.5856 & 0.3394 & 0.5024 \tabularnewline
84 & 7.9 & 8.2629 & 7.3635 & 9.2601 & 0.2378 & 0.6973 & 0.3206 & 0.4709 \tabularnewline
85 & 7.9 & 8.2304 & 7.2765 & 9.2955 & 0.2716 & 0.7284 & 0.3099 & 0.4491 \tabularnewline
86 & 7.8 & 8.2389 & 7.2297 & 9.3731 & 0.2241 & 0.7209 & 0.3259 & 0.4579 \tabularnewline
87 & 7.7 & 8.2348 & 7.1748 & 9.4336 & 0.191 & 0.7614 & 0.3323 & 0.4575 \tabularnewline
88 & 7.9 & 8.3698 & 7.246 & 9.6479 & 0.2357 & 0.8478 & 0.5426 & 0.5426 \tabularnewline
89 & 7.7 & 8.3828 & 7.212 & 9.7219 & 0.1588 & 0.7601 & 0.5482 & 0.5482 \tabularnewline
90 & 7.6 & 8.3747 & 7.1616 & 9.7697 & 0.1382 & 0.8284 & 0.5418 & 0.5418 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8058&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[78])[/C][/ROW]
[ROW][C]66[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]8.50000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]8.2[/C][C]8.5932[/C][C]8.1801[/C][C]9.025[/C][C]0.0371[/C][C]0.9084[/C][C]0.6639[/C][C]0.9084[/C][/ROW]
[ROW][C]80[/C][C]8.1[/C][C]8.5995[/C][C]8.0013[/C][C]9.2376[/C][C]0.0625[/C][C]0.8901[/C][C]0.6201[/C][C]0.8212[/C][/ROW]
[ROW][C]81[/C][C]8.1[/C][C]8.5811[/C][C]7.8462[/C][C]9.3773[/C][C]0.1182[/C][C]0.8818[/C][C]0.5791[/C][C]0.7555[/C][/ROW]
[ROW][C]82[/C][C]8.2[/C][C]8.2836[/C][C]7.4995[/C][C]9.1408[/C][C]0.4242[/C][C]0.6627[/C][C]0.3104[/C][C]0.4851[/C][/ROW]
[ROW][C]83[/C][C]8[/C][C]8.3029[/C][C]7.4557[/C][C]9.2358[/C][C]0.2623[/C][C]0.5856[/C][C]0.3394[/C][C]0.5024[/C][/ROW]
[ROW][C]84[/C][C]7.9[/C][C]8.2629[/C][C]7.3635[/C][C]9.2601[/C][C]0.2378[/C][C]0.6973[/C][C]0.3206[/C][C]0.4709[/C][/ROW]
[ROW][C]85[/C][C]7.9[/C][C]8.2304[/C][C]7.2765[/C][C]9.2955[/C][C]0.2716[/C][C]0.7284[/C][C]0.3099[/C][C]0.4491[/C][/ROW]
[ROW][C]86[/C][C]7.8[/C][C]8.2389[/C][C]7.2297[/C][C]9.3731[/C][C]0.2241[/C][C]0.7209[/C][C]0.3259[/C][C]0.4579[/C][/ROW]
[ROW][C]87[/C][C]7.7[/C][C]8.2348[/C][C]7.1748[/C][C]9.4336[/C][C]0.191[/C][C]0.7614[/C][C]0.3323[/C][C]0.4575[/C][/ROW]
[ROW][C]88[/C][C]7.9[/C][C]8.3698[/C][C]7.246[/C][C]9.6479[/C][C]0.2357[/C][C]0.8478[/C][C]0.5426[/C][C]0.5426[/C][/ROW]
[ROW][C]89[/C][C]7.7[/C][C]8.3828[/C][C]7.212[/C][C]9.7219[/C][C]0.1588[/C][C]0.7601[/C][C]0.5482[/C][C]0.5482[/C][/ROW]
[ROW][C]90[/C][C]7.6[/C][C]8.3747[/C][C]7.1616[/C][C]9.7697[/C][C]0.1382[/C][C]0.8284[/C][C]0.5418[/C][C]0.5418[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8058&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8058&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[78])
668.4-------
678.50000000000001-------
688.50000000000001-------
698.50000000000001-------
708.50000000000001-------
718.50000000000001-------
728.50000000000001-------
738.50000000000001-------
748.50000000000001-------
758.50000000000001-------
768.3-------
778.3-------
788.3-------
798.28.59328.18019.0250.03710.90840.66390.9084
808.18.59958.00139.23760.06250.89010.62010.8212
818.18.58117.84629.37730.11820.88180.57910.7555
828.28.28367.49959.14080.42420.66270.31040.4851
8388.30297.45579.23580.26230.58560.33940.5024
847.98.26297.36359.26010.23780.69730.32060.4709
857.98.23047.27659.29550.27160.72840.30990.4491
867.88.23897.22979.37310.22410.72090.32590.4579
877.78.23487.17489.43360.1910.76140.33230.4575
887.98.36987.2469.64790.23570.84780.54260.5426
897.78.38287.2129.72190.15880.76010.54820.5482
907.68.37477.16169.76970.13820.82840.54180.5418







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.0256-0.04580.00380.15460.01290.1135
800.0379-0.05810.00480.24950.02080.1442
810.0473-0.05610.00470.23140.01930.1389
820.0528-0.01018e-040.0076e-040.0241
830.0573-0.03650.0030.09170.00760.0874
840.0616-0.04390.00370.13170.0110.1048
850.066-0.04010.00330.10920.00910.0954
860.0702-0.05330.00440.19260.0160.1267
870.0743-0.06490.00540.2860.02380.1544
880.0779-0.05610.00470.22070.01840.1356
890.0815-0.08150.00680.46620.03890.1971
900.085-0.09250.00770.60010.050.2236

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.0256 & -0.0458 & 0.0038 & 0.1546 & 0.0129 & 0.1135 \tabularnewline
80 & 0.0379 & -0.0581 & 0.0048 & 0.2495 & 0.0208 & 0.1442 \tabularnewline
81 & 0.0473 & -0.0561 & 0.0047 & 0.2314 & 0.0193 & 0.1389 \tabularnewline
82 & 0.0528 & -0.0101 & 8e-04 & 0.007 & 6e-04 & 0.0241 \tabularnewline
83 & 0.0573 & -0.0365 & 0.003 & 0.0917 & 0.0076 & 0.0874 \tabularnewline
84 & 0.0616 & -0.0439 & 0.0037 & 0.1317 & 0.011 & 0.1048 \tabularnewline
85 & 0.066 & -0.0401 & 0.0033 & 0.1092 & 0.0091 & 0.0954 \tabularnewline
86 & 0.0702 & -0.0533 & 0.0044 & 0.1926 & 0.016 & 0.1267 \tabularnewline
87 & 0.0743 & -0.0649 & 0.0054 & 0.286 & 0.0238 & 0.1544 \tabularnewline
88 & 0.0779 & -0.0561 & 0.0047 & 0.2207 & 0.0184 & 0.1356 \tabularnewline
89 & 0.0815 & -0.0815 & 0.0068 & 0.4662 & 0.0389 & 0.1971 \tabularnewline
90 & 0.085 & -0.0925 & 0.0077 & 0.6001 & 0.05 & 0.2236 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8058&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]79[/C][C]0.0256[/C][C]-0.0458[/C][C]0.0038[/C][C]0.1546[/C][C]0.0129[/C][C]0.1135[/C][/ROW]
[ROW][C]80[/C][C]0.0379[/C][C]-0.0581[/C][C]0.0048[/C][C]0.2495[/C][C]0.0208[/C][C]0.1442[/C][/ROW]
[ROW][C]81[/C][C]0.0473[/C][C]-0.0561[/C][C]0.0047[/C][C]0.2314[/C][C]0.0193[/C][C]0.1389[/C][/ROW]
[ROW][C]82[/C][C]0.0528[/C][C]-0.0101[/C][C]8e-04[/C][C]0.007[/C][C]6e-04[/C][C]0.0241[/C][/ROW]
[ROW][C]83[/C][C]0.0573[/C][C]-0.0365[/C][C]0.003[/C][C]0.0917[/C][C]0.0076[/C][C]0.0874[/C][/ROW]
[ROW][C]84[/C][C]0.0616[/C][C]-0.0439[/C][C]0.0037[/C][C]0.1317[/C][C]0.011[/C][C]0.1048[/C][/ROW]
[ROW][C]85[/C][C]0.066[/C][C]-0.0401[/C][C]0.0033[/C][C]0.1092[/C][C]0.0091[/C][C]0.0954[/C][/ROW]
[ROW][C]86[/C][C]0.0702[/C][C]-0.0533[/C][C]0.0044[/C][C]0.1926[/C][C]0.016[/C][C]0.1267[/C][/ROW]
[ROW][C]87[/C][C]0.0743[/C][C]-0.0649[/C][C]0.0054[/C][C]0.286[/C][C]0.0238[/C][C]0.1544[/C][/ROW]
[ROW][C]88[/C][C]0.0779[/C][C]-0.0561[/C][C]0.0047[/C][C]0.2207[/C][C]0.0184[/C][C]0.1356[/C][/ROW]
[ROW][C]89[/C][C]0.0815[/C][C]-0.0815[/C][C]0.0068[/C][C]0.4662[/C][C]0.0389[/C][C]0.1971[/C][/ROW]
[ROW][C]90[/C][C]0.085[/C][C]-0.0925[/C][C]0.0077[/C][C]0.6001[/C][C]0.05[/C][C]0.2236[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8058&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8058&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
790.0256-0.04580.00380.15460.01290.1135
800.0379-0.05810.00480.24950.02080.1442
810.0473-0.05610.00470.23140.01930.1389
820.0528-0.01018e-040.0076e-040.0241
830.0573-0.03650.0030.09170.00760.0874
840.0616-0.04390.00370.13170.0110.1048
850.066-0.04010.00330.10920.00910.0954
860.0702-0.05330.00440.19260.0160.1267
870.0743-0.06490.00540.2860.02380.1544
880.0779-0.05610.00470.22070.01840.1356
890.0815-0.08150.00680.46620.03890.1971
900.085-0.09250.00770.60010.050.2236



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