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 computationThu, 16 Dec 2010 12:42:07 +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/16/t1292503234f94xkojys6akwqv.htm/, Retrieved Fri, 03 May 2024 12:13:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110878, Retrieved Fri, 03 May 2024 12:13:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
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]
- R PD      [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-03 14:52:09] [8b017ffbf7b0eded54d8efebfb3e4cfa]
F   P         [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-03 16:18:40] [8b017ffbf7b0eded54d8efebfb3e4cfa]
-   P             [ARIMA Forecasting] [Paper - ARIMA (Hu...] [2010-12-16 12:42:07] [3de277db83c2673156e9464be2ef6f69] [Current]
Feedback Forum

Post a new message
Dataseries X:
1579
2146
2462
3695
4831
5134
6250
5760
6249
2917
1741
2359
1511
2059
2635
2867
4403
5720
4502
5749
5627
2846
1762
2429
1169
2154
2249
2687
4359
5382
4459
6398
4596
3024
1887
2070
1351
2218
2461
3028
4784
4975
4607
6249
4809
3157
1910
2228
1594
2467
2222
3607
4685
4962
5770
5480
5000
3228
1993
2288
1580
2111
2192
3601
4665
4876
5813
5589
5331
3075
2002
2306
1507
1992
2487
3490
4647
5594
5611
5788
6204
3013
1931
2549
1504
2090
2702
2939
4500
6208
6415
5657
5964
3163
1997
2422




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110878&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110878&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110878&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[84])
722306-------
731507-------
741992-------
752487-------
763490-------
774647-------
785594-------
795611-------
805788-------
816204-------
823013-------
831931-------
842549-------
8515041447.14351276.3171646.15430.287800.27780
8620902143.58011866.89592470.9590.37420.99990.81790.0076
8727022536.54352192.73442947.11250.21480.98350.59350.4763
8829393297.85552793.8693914.96990.12720.97080.27080.9913
8945004774.39873988.62125753.45040.29140.99990.60071
9062085453.30044520.98526626.10720.10360.94440.40711
9164155372.41284449.16766535.36250.03940.07950.34381
9256575950.26914907.51517270.52130.33160.24510.59521
9359645723.52654720.85296992.91620.35520.54090.22911
9431633025.2622552.57813606.96970.321300.51650.9457
9519971918.82471642.80392252.40940.32300.47151e-04
9624222398.11942038.1582837.12690.45750.96330.25030.2503

\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[84]) \tabularnewline
72 & 2306 & - & - & - & - & - & - & - \tabularnewline
73 & 1507 & - & - & - & - & - & - & - \tabularnewline
74 & 1992 & - & - & - & - & - & - & - \tabularnewline
75 & 2487 & - & - & - & - & - & - & - \tabularnewline
76 & 3490 & - & - & - & - & - & - & - \tabularnewline
77 & 4647 & - & - & - & - & - & - & - \tabularnewline
78 & 5594 & - & - & - & - & - & - & - \tabularnewline
79 & 5611 & - & - & - & - & - & - & - \tabularnewline
80 & 5788 & - & - & - & - & - & - & - \tabularnewline
81 & 6204 & - & - & - & - & - & - & - \tabularnewline
82 & 3013 & - & - & - & - & - & - & - \tabularnewline
83 & 1931 & - & - & - & - & - & - & - \tabularnewline
84 & 2549 & - & - & - & - & - & - & - \tabularnewline
85 & 1504 & 1447.1435 & 1276.317 & 1646.1543 & 0.2878 & 0 & 0.2778 & 0 \tabularnewline
86 & 2090 & 2143.5801 & 1866.8959 & 2470.959 & 0.3742 & 0.9999 & 0.8179 & 0.0076 \tabularnewline
87 & 2702 & 2536.5435 & 2192.7344 & 2947.1125 & 0.2148 & 0.9835 & 0.5935 & 0.4763 \tabularnewline
88 & 2939 & 3297.8555 & 2793.869 & 3914.9699 & 0.1272 & 0.9708 & 0.2708 & 0.9913 \tabularnewline
89 & 4500 & 4774.3987 & 3988.6212 & 5753.4504 & 0.2914 & 0.9999 & 0.6007 & 1 \tabularnewline
90 & 6208 & 5453.3004 & 4520.9852 & 6626.1072 & 0.1036 & 0.9444 & 0.4071 & 1 \tabularnewline
91 & 6415 & 5372.4128 & 4449.1676 & 6535.3625 & 0.0394 & 0.0795 & 0.3438 & 1 \tabularnewline
92 & 5657 & 5950.2691 & 4907.5151 & 7270.5213 & 0.3316 & 0.2451 & 0.5952 & 1 \tabularnewline
93 & 5964 & 5723.5265 & 4720.8529 & 6992.9162 & 0.3552 & 0.5409 & 0.2291 & 1 \tabularnewline
94 & 3163 & 3025.262 & 2552.5781 & 3606.9697 & 0.3213 & 0 & 0.5165 & 0.9457 \tabularnewline
95 & 1997 & 1918.8247 & 1642.8039 & 2252.4094 & 0.323 & 0 & 0.4715 & 1e-04 \tabularnewline
96 & 2422 & 2398.1194 & 2038.158 & 2837.1269 & 0.4575 & 0.9633 & 0.2503 & 0.2503 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110878&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[84])[/C][/ROW]
[ROW][C]72[/C][C]2306[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]1507[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1992[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]2487[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]3490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]4647[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]5594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]5611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]5788[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]6204[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]3013[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]1931[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]2549[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]1504[/C][C]1447.1435[/C][C]1276.317[/C][C]1646.1543[/C][C]0.2878[/C][C]0[/C][C]0.2778[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]2090[/C][C]2143.5801[/C][C]1866.8959[/C][C]2470.959[/C][C]0.3742[/C][C]0.9999[/C][C]0.8179[/C][C]0.0076[/C][/ROW]
[ROW][C]87[/C][C]2702[/C][C]2536.5435[/C][C]2192.7344[/C][C]2947.1125[/C][C]0.2148[/C][C]0.9835[/C][C]0.5935[/C][C]0.4763[/C][/ROW]
[ROW][C]88[/C][C]2939[/C][C]3297.8555[/C][C]2793.869[/C][C]3914.9699[/C][C]0.1272[/C][C]0.9708[/C][C]0.2708[/C][C]0.9913[/C][/ROW]
[ROW][C]89[/C][C]4500[/C][C]4774.3987[/C][C]3988.6212[/C][C]5753.4504[/C][C]0.2914[/C][C]0.9999[/C][C]0.6007[/C][C]1[/C][/ROW]
[ROW][C]90[/C][C]6208[/C][C]5453.3004[/C][C]4520.9852[/C][C]6626.1072[/C][C]0.1036[/C][C]0.9444[/C][C]0.4071[/C][C]1[/C][/ROW]
[ROW][C]91[/C][C]6415[/C][C]5372.4128[/C][C]4449.1676[/C][C]6535.3625[/C][C]0.0394[/C][C]0.0795[/C][C]0.3438[/C][C]1[/C][/ROW]
[ROW][C]92[/C][C]5657[/C][C]5950.2691[/C][C]4907.5151[/C][C]7270.5213[/C][C]0.3316[/C][C]0.2451[/C][C]0.5952[/C][C]1[/C][/ROW]
[ROW][C]93[/C][C]5964[/C][C]5723.5265[/C][C]4720.8529[/C][C]6992.9162[/C][C]0.3552[/C][C]0.5409[/C][C]0.2291[/C][C]1[/C][/ROW]
[ROW][C]94[/C][C]3163[/C][C]3025.262[/C][C]2552.5781[/C][C]3606.9697[/C][C]0.3213[/C][C]0[/C][C]0.5165[/C][C]0.9457[/C][/ROW]
[ROW][C]95[/C][C]1997[/C][C]1918.8247[/C][C]1642.8039[/C][C]2252.4094[/C][C]0.323[/C][C]0[/C][C]0.4715[/C][C]1e-04[/C][/ROW]
[ROW][C]96[/C][C]2422[/C][C]2398.1194[/C][C]2038.158[/C][C]2837.1269[/C][C]0.4575[/C][C]0.9633[/C][C]0.2503[/C][C]0.2503[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110878&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110878&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[84])
722306-------
731507-------
741992-------
752487-------
763490-------
774647-------
785594-------
795611-------
805788-------
816204-------
823013-------
831931-------
842549-------
8515041447.14351276.3171646.15430.287800.27780
8620902143.58011866.89592470.9590.37420.99990.81790.0076
8727022536.54352192.73442947.11250.21480.98350.59350.4763
8829393297.85552793.8693914.96990.12720.97080.27080.9913
8945004774.39873988.62125753.45040.29140.99990.60071
9062085453.30044520.98526626.10720.10360.94440.40711
9164155372.41284449.16766535.36250.03940.07950.34381
9256575950.26914907.51517270.52130.33160.24510.59521
9359645723.52654720.85296992.91620.35520.54090.22911
9431633025.2622552.57813606.96970.321300.51650.9457
9519971918.82471642.80392252.40940.32300.47151e-04
9624222398.11942038.1582837.12690.45750.96330.25030.2503







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.07020.039303232.662200
860.0779-0.0250.03212870.82843051.745355.2426
870.08260.06520.043227375.857611159.7827105.6399
880.0955-0.10880.0596128777.28640564.1585201.4055
890.1046-0.05750.059275294.653647510.2575217.9685
900.10970.13840.0724569571.521134520.4681366.7703
910.11040.19410.08981086988.1319270587.2772520.18
920.1132-0.04930.084786006.7684247514.7136497.5085
930.11320.0420.0857827.4948226438.356475.8554
940.09810.04550.076518971.7558205691.696453.5325
950.08870.04070.07336111.3736187548.0303433.0682
960.09340.010.068570.2816171966.5512414.6885

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0702 & 0.0393 & 0 & 3232.6622 & 0 & 0 \tabularnewline
86 & 0.0779 & -0.025 & 0.0321 & 2870.8284 & 3051.7453 & 55.2426 \tabularnewline
87 & 0.0826 & 0.0652 & 0.0432 & 27375.8576 & 11159.7827 & 105.6399 \tabularnewline
88 & 0.0955 & -0.1088 & 0.0596 & 128777.286 & 40564.1585 & 201.4055 \tabularnewline
89 & 0.1046 & -0.0575 & 0.0592 & 75294.6536 & 47510.2575 & 217.9685 \tabularnewline
90 & 0.1097 & 0.1384 & 0.0724 & 569571.521 & 134520.4681 & 366.7703 \tabularnewline
91 & 0.1104 & 0.1941 & 0.0898 & 1086988.1319 & 270587.2772 & 520.18 \tabularnewline
92 & 0.1132 & -0.0493 & 0.0847 & 86006.7684 & 247514.7136 & 497.5085 \tabularnewline
93 & 0.1132 & 0.042 & 0.08 & 57827.4948 & 226438.356 & 475.8554 \tabularnewline
94 & 0.0981 & 0.0455 & 0.0765 & 18971.7558 & 205691.696 & 453.5325 \tabularnewline
95 & 0.0887 & 0.0407 & 0.0733 & 6111.3736 & 187548.0303 & 433.0682 \tabularnewline
96 & 0.0934 & 0.01 & 0.068 & 570.2816 & 171966.5512 & 414.6885 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110878&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]85[/C][C]0.0702[/C][C]0.0393[/C][C]0[/C][C]3232.6622[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0779[/C][C]-0.025[/C][C]0.0321[/C][C]2870.8284[/C][C]3051.7453[/C][C]55.2426[/C][/ROW]
[ROW][C]87[/C][C]0.0826[/C][C]0.0652[/C][C]0.0432[/C][C]27375.8576[/C][C]11159.7827[/C][C]105.6399[/C][/ROW]
[ROW][C]88[/C][C]0.0955[/C][C]-0.1088[/C][C]0.0596[/C][C]128777.286[/C][C]40564.1585[/C][C]201.4055[/C][/ROW]
[ROW][C]89[/C][C]0.1046[/C][C]-0.0575[/C][C]0.0592[/C][C]75294.6536[/C][C]47510.2575[/C][C]217.9685[/C][/ROW]
[ROW][C]90[/C][C]0.1097[/C][C]0.1384[/C][C]0.0724[/C][C]569571.521[/C][C]134520.4681[/C][C]366.7703[/C][/ROW]
[ROW][C]91[/C][C]0.1104[/C][C]0.1941[/C][C]0.0898[/C][C]1086988.1319[/C][C]270587.2772[/C][C]520.18[/C][/ROW]
[ROW][C]92[/C][C]0.1132[/C][C]-0.0493[/C][C]0.0847[/C][C]86006.7684[/C][C]247514.7136[/C][C]497.5085[/C][/ROW]
[ROW][C]93[/C][C]0.1132[/C][C]0.042[/C][C]0.08[/C][C]57827.4948[/C][C]226438.356[/C][C]475.8554[/C][/ROW]
[ROW][C]94[/C][C]0.0981[/C][C]0.0455[/C][C]0.0765[/C][C]18971.7558[/C][C]205691.696[/C][C]453.5325[/C][/ROW]
[ROW][C]95[/C][C]0.0887[/C][C]0.0407[/C][C]0.0733[/C][C]6111.3736[/C][C]187548.0303[/C][C]433.0682[/C][/ROW]
[ROW][C]96[/C][C]0.0934[/C][C]0.01[/C][C]0.068[/C][C]570.2816[/C][C]171966.5512[/C][C]414.6885[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110878&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110878&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
850.07020.039303232.662200
860.0779-0.0250.03212870.82843051.745355.2426
870.08260.06520.043227375.857611159.7827105.6399
880.0955-0.10880.0596128777.28640564.1585201.4055
890.1046-0.05750.059275294.653647510.2575217.9685
900.10970.13840.0724569571.521134520.4681366.7703
910.11040.19410.08981086988.1319270587.2772520.18
920.1132-0.04930.084786006.7684247514.7136497.5085
930.11320.0420.0857827.4948226438.356475.8554
940.09810.04550.076518971.7558205691.696453.5325
950.08870.04070.07336111.3736187548.0303433.0682
960.09340.010.068570.2816171966.5512414.6885



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