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, 24 Dec 2010 09:39: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/24/t12931834741r7dpdx60zr3val.htm/, Retrieved Tue, 30 Apr 2024 02:18:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114663, Retrieved Tue, 30 Apr 2024 02:18:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact192
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]
F   PD      [ARIMA Forecasting] [ARIMA model faill...] [2010-12-03 14:08:17] [95e8426e0df851c9330605aa1e892ab5]
-   P         [ARIMA Forecasting] [verbetering forec...] [2010-12-13 18:37:08] [bd591a1ebb67d263a02e7adae3fa1a4d]
-   PD          [ARIMA Forecasting] [Forecast] [2010-12-21 10:29:11] [bd591a1ebb67d263a02e7adae3fa1a4d]
-    D              [ARIMA Forecasting] [forecast 1] [2010-12-24 09:39:58] [09489ba95453d3f5c9e6f2eaeda915af] [Current]
Feedback Forum

Post a new message
Dataseries X:
94,6
95,9
104,7
102,8
98,1
113,9
80,9
95,7
113,2
105,9
108,8
102,3
99
100,7
115,5
100,7
109,9
114,6
85,4
100,5
114,8
116,5
112,9
102
106
105,3
118,8
106,1
109,3
117,2
92,5
104,2
112,5
122,4
113,3
100
110,7
112,8
109,8
117,3
109,1
115,9
96
99,8
116,8
115,7
99,4
94,3
91
93,2
103,1
94,1
91,8
102,7
82,6
89,1
104,5
105,1
95,1
88,7
86,3
91,8
111,5
99,7
97,5
111,7
86,2
95,4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114663&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 time9 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[56])
4499.8-------
45116.8-------
46115.7-------
4799.4-------
4894.3-------
4991-------
5093.2-------
51103.1-------
5294.1-------
5391.8-------
54102.7-------
5582.6-------
5689.1-------
57104.5104.322795.4883113.15710.48430.99960.00280.9996
58105.1107.173498.2511116.09570.32440.72150.03051
5995.194.843684.7362104.9510.48020.02340.18850.8673
6088.787.630575.1938100.06730.43310.11960.14660.4084
6186.389.186776.3605102.01290.32960.52960.39090.5053
6291.890.462876.0801104.84560.42770.71470.35460.5737
63111.598.481782.7989114.16460.05190.79820.28190.8795
6499.792.949176.577109.32120.20950.01320.44520.6775
6597.590.331672.5785108.08460.21430.15050.43560.5541
66111.7100.010381.3046118.71590.11030.60370.3890.8735
6786.278.183358.631597.73520.21084e-040.3290.1369
6895.485.53264.8533106.21070.17480.47480.36760.3676

\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[56]) \tabularnewline
44 & 99.8 & - & - & - & - & - & - & - \tabularnewline
45 & 116.8 & - & - & - & - & - & - & - \tabularnewline
46 & 115.7 & - & - & - & - & - & - & - \tabularnewline
47 & 99.4 & - & - & - & - & - & - & - \tabularnewline
48 & 94.3 & - & - & - & - & - & - & - \tabularnewline
49 & 91 & - & - & - & - & - & - & - \tabularnewline
50 & 93.2 & - & - & - & - & - & - & - \tabularnewline
51 & 103.1 & - & - & - & - & - & - & - \tabularnewline
52 & 94.1 & - & - & - & - & - & - & - \tabularnewline
53 & 91.8 & - & - & - & - & - & - & - \tabularnewline
54 & 102.7 & - & - & - & - & - & - & - \tabularnewline
55 & 82.6 & - & - & - & - & - & - & - \tabularnewline
56 & 89.1 & - & - & - & - & - & - & - \tabularnewline
57 & 104.5 & 104.3227 & 95.4883 & 113.1571 & 0.4843 & 0.9996 & 0.0028 & 0.9996 \tabularnewline
58 & 105.1 & 107.1734 & 98.2511 & 116.0957 & 0.3244 & 0.7215 & 0.0305 & 1 \tabularnewline
59 & 95.1 & 94.8436 & 84.7362 & 104.951 & 0.4802 & 0.0234 & 0.1885 & 0.8673 \tabularnewline
60 & 88.7 & 87.6305 & 75.1938 & 100.0673 & 0.4331 & 0.1196 & 0.1466 & 0.4084 \tabularnewline
61 & 86.3 & 89.1867 & 76.3605 & 102.0129 & 0.3296 & 0.5296 & 0.3909 & 0.5053 \tabularnewline
62 & 91.8 & 90.4628 & 76.0801 & 104.8456 & 0.4277 & 0.7147 & 0.3546 & 0.5737 \tabularnewline
63 & 111.5 & 98.4817 & 82.7989 & 114.1646 & 0.0519 & 0.7982 & 0.2819 & 0.8795 \tabularnewline
64 & 99.7 & 92.9491 & 76.577 & 109.3212 & 0.2095 & 0.0132 & 0.4452 & 0.6775 \tabularnewline
65 & 97.5 & 90.3316 & 72.5785 & 108.0846 & 0.2143 & 0.1505 & 0.4356 & 0.5541 \tabularnewline
66 & 111.7 & 100.0103 & 81.3046 & 118.7159 & 0.1103 & 0.6037 & 0.389 & 0.8735 \tabularnewline
67 & 86.2 & 78.1833 & 58.6315 & 97.7352 & 0.2108 & 4e-04 & 0.329 & 0.1369 \tabularnewline
68 & 95.4 & 85.532 & 64.8533 & 106.2107 & 0.1748 & 0.4748 & 0.3676 & 0.3676 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114663&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[56])[/C][/ROW]
[ROW][C]44[/C][C]99.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]116.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]115.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]99.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]94.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]93.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]103.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]94.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]91.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]102.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]82.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]89.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]104.5[/C][C]104.3227[/C][C]95.4883[/C][C]113.1571[/C][C]0.4843[/C][C]0.9996[/C][C]0.0028[/C][C]0.9996[/C][/ROW]
[ROW][C]58[/C][C]105.1[/C][C]107.1734[/C][C]98.2511[/C][C]116.0957[/C][C]0.3244[/C][C]0.7215[/C][C]0.0305[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]95.1[/C][C]94.8436[/C][C]84.7362[/C][C]104.951[/C][C]0.4802[/C][C]0.0234[/C][C]0.1885[/C][C]0.8673[/C][/ROW]
[ROW][C]60[/C][C]88.7[/C][C]87.6305[/C][C]75.1938[/C][C]100.0673[/C][C]0.4331[/C][C]0.1196[/C][C]0.1466[/C][C]0.4084[/C][/ROW]
[ROW][C]61[/C][C]86.3[/C][C]89.1867[/C][C]76.3605[/C][C]102.0129[/C][C]0.3296[/C][C]0.5296[/C][C]0.3909[/C][C]0.5053[/C][/ROW]
[ROW][C]62[/C][C]91.8[/C][C]90.4628[/C][C]76.0801[/C][C]104.8456[/C][C]0.4277[/C][C]0.7147[/C][C]0.3546[/C][C]0.5737[/C][/ROW]
[ROW][C]63[/C][C]111.5[/C][C]98.4817[/C][C]82.7989[/C][C]114.1646[/C][C]0.0519[/C][C]0.7982[/C][C]0.2819[/C][C]0.8795[/C][/ROW]
[ROW][C]64[/C][C]99.7[/C][C]92.9491[/C][C]76.577[/C][C]109.3212[/C][C]0.2095[/C][C]0.0132[/C][C]0.4452[/C][C]0.6775[/C][/ROW]
[ROW][C]65[/C][C]97.5[/C][C]90.3316[/C][C]72.5785[/C][C]108.0846[/C][C]0.2143[/C][C]0.1505[/C][C]0.4356[/C][C]0.5541[/C][/ROW]
[ROW][C]66[/C][C]111.7[/C][C]100.0103[/C][C]81.3046[/C][C]118.7159[/C][C]0.1103[/C][C]0.6037[/C][C]0.389[/C][C]0.8735[/C][/ROW]
[ROW][C]67[/C][C]86.2[/C][C]78.1833[/C][C]58.6315[/C][C]97.7352[/C][C]0.2108[/C][C]4e-04[/C][C]0.329[/C][C]0.1369[/C][/ROW]
[ROW][C]68[/C][C]95.4[/C][C]85.532[/C][C]64.8533[/C][C]106.2107[/C][C]0.1748[/C][C]0.4748[/C][C]0.3676[/C][C]0.3676[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114663&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114663&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[56])
4499.8-------
45116.8-------
46115.7-------
4799.4-------
4894.3-------
4991-------
5093.2-------
51103.1-------
5294.1-------
5391.8-------
54102.7-------
5582.6-------
5689.1-------
57104.5104.322795.4883113.15710.48430.99960.00280.9996
58105.1107.173498.2511116.09570.32440.72150.03051
5995.194.843684.7362104.9510.48020.02340.18850.8673
6088.787.630575.1938100.06730.43310.11960.14660.4084
6186.389.186776.3605102.01290.32960.52960.39090.5053
6291.890.462876.0801104.84560.42770.71470.35460.5737
63111.598.481782.7989114.16460.05190.79820.28190.8795
6499.792.949176.577109.32120.20950.01320.44520.6775
6597.590.331672.5785108.08460.21430.15050.43560.5541
66111.7100.010381.3046118.71590.11030.60370.3890.8735
6786.278.183358.631597.73520.21084e-040.3290.1369
6895.485.53264.8533106.21070.17480.47480.36760.3676







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
570.04320.001700.031400
580.0425-0.01930.01054.2992.16521.4715
590.05440.00270.00790.06571.46541.2105
600.07240.01220.0091.14371.3851.1769
610.0734-0.03240.01378.33312.77461.6657
620.08110.01480.01391.7882.61021.6156
630.08120.13220.0308169.475626.44815.1428
640.08990.07260.03645.574528.83895.3702
650.10030.07940.040851.386431.34425.5986
660.09540.11690.0484136.6541.87486.4711
670.12760.10250.053364.266943.91046.6265
680.12330.11540.058597.376848.36596.9546

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
57 & 0.0432 & 0.0017 & 0 & 0.0314 & 0 & 0 \tabularnewline
58 & 0.0425 & -0.0193 & 0.0105 & 4.299 & 2.1652 & 1.4715 \tabularnewline
59 & 0.0544 & 0.0027 & 0.0079 & 0.0657 & 1.4654 & 1.2105 \tabularnewline
60 & 0.0724 & 0.0122 & 0.009 & 1.1437 & 1.385 & 1.1769 \tabularnewline
61 & 0.0734 & -0.0324 & 0.0137 & 8.3331 & 2.7746 & 1.6657 \tabularnewline
62 & 0.0811 & 0.0148 & 0.0139 & 1.788 & 2.6102 & 1.6156 \tabularnewline
63 & 0.0812 & 0.1322 & 0.0308 & 169.4756 & 26.4481 & 5.1428 \tabularnewline
64 & 0.0899 & 0.0726 & 0.036 & 45.5745 & 28.8389 & 5.3702 \tabularnewline
65 & 0.1003 & 0.0794 & 0.0408 & 51.3864 & 31.3442 & 5.5986 \tabularnewline
66 & 0.0954 & 0.1169 & 0.0484 & 136.65 & 41.8748 & 6.4711 \tabularnewline
67 & 0.1276 & 0.1025 & 0.0533 & 64.2669 & 43.9104 & 6.6265 \tabularnewline
68 & 0.1233 & 0.1154 & 0.0585 & 97.3768 & 48.3659 & 6.9546 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114663&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]57[/C][C]0.0432[/C][C]0.0017[/C][C]0[/C][C]0.0314[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]58[/C][C]0.0425[/C][C]-0.0193[/C][C]0.0105[/C][C]4.299[/C][C]2.1652[/C][C]1.4715[/C][/ROW]
[ROW][C]59[/C][C]0.0544[/C][C]0.0027[/C][C]0.0079[/C][C]0.0657[/C][C]1.4654[/C][C]1.2105[/C][/ROW]
[ROW][C]60[/C][C]0.0724[/C][C]0.0122[/C][C]0.009[/C][C]1.1437[/C][C]1.385[/C][C]1.1769[/C][/ROW]
[ROW][C]61[/C][C]0.0734[/C][C]-0.0324[/C][C]0.0137[/C][C]8.3331[/C][C]2.7746[/C][C]1.6657[/C][/ROW]
[ROW][C]62[/C][C]0.0811[/C][C]0.0148[/C][C]0.0139[/C][C]1.788[/C][C]2.6102[/C][C]1.6156[/C][/ROW]
[ROW][C]63[/C][C]0.0812[/C][C]0.1322[/C][C]0.0308[/C][C]169.4756[/C][C]26.4481[/C][C]5.1428[/C][/ROW]
[ROW][C]64[/C][C]0.0899[/C][C]0.0726[/C][C]0.036[/C][C]45.5745[/C][C]28.8389[/C][C]5.3702[/C][/ROW]
[ROW][C]65[/C][C]0.1003[/C][C]0.0794[/C][C]0.0408[/C][C]51.3864[/C][C]31.3442[/C][C]5.5986[/C][/ROW]
[ROW][C]66[/C][C]0.0954[/C][C]0.1169[/C][C]0.0484[/C][C]136.65[/C][C]41.8748[/C][C]6.4711[/C][/ROW]
[ROW][C]67[/C][C]0.1276[/C][C]0.1025[/C][C]0.0533[/C][C]64.2669[/C][C]43.9104[/C][C]6.6265[/C][/ROW]
[ROW][C]68[/C][C]0.1233[/C][C]0.1154[/C][C]0.0585[/C][C]97.3768[/C][C]48.3659[/C][C]6.9546[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114663&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114663&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
570.04320.001700.031400
580.0425-0.01930.01054.2992.16521.4715
590.05440.00270.00790.06571.46541.2105
600.07240.01220.0091.14371.3851.1769
610.0734-0.03240.01378.33312.77461.6657
620.08110.01480.01391.7882.61021.6156
630.08120.13220.0308169.475626.44815.1428
640.08990.07260.03645.574528.83895.3702
650.10030.07940.040851.386431.34425.5986
660.09540.11690.0484136.6541.87486.4711
670.12760.10250.053364.266943.91046.6265
680.12330.11540.058597.376848.36596.9546



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