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 computationSun, 12 Dec 2010 15:31:30 +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/12/t1292167750604ljip0jx8royc.htm/, Retrieved Tue, 07 May 2024 15:46:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=108522, Retrieved Tue, 07 May 2024 15:46:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact198
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] [WS9 - ARIMA Forec...] [2010-12-04 16:25:58] [8ef49741e164ec6343c90c7935194465]
-   P         [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:58:46] [8ef49741e164ec6343c90c7935194465]
- R PD          [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-07 11:34:20] [1f5baf2b24e732d76900bb8178fc04e7]
-   P               [ARIMA Forecasting] [] [2010-12-12 15:31:30] [5842cf9dd57f9603e676e11284d3404a] [Current]
Feedback Forum

Post a new message
Dataseries X:
2.4
2.4
2.5
2.6
2.4
2.6
2.4
2.3
2.4
2.4
2.4
2.4
2.4
2.4
2.4
2.4
2.5
2.1
2.1
2
2
2
1.9
1.9
2
1.8
1.6
1.3
1.4
1.4
1.5
1.7
1.6
1.5
1.6
1.5
1.1
1.1
1.1
1.4
1.3
1.4
1.3
1.1
1
0.9
0.8
0.8
0.8
0.8
1
1.1
1
0.9
1.1
1.2
1.2
1.4
1.5
1.7
1.9
1.9
1.9
1.7
1.7
2.1
2
2
2.5
2.4
2.5
2.5
2
1.9
2.2
2.7
3.1
2.8
2.6
2.3
2.2
2.2
2
2
2.6
2.5
2.5
2.3
2
1.9
2
2.1
2.1
2.3
2.3
2.3
2.1
2.4
2.5
2.1
1.8
1.9
1.9
2.1
2.2
2
2.2
2
1.9
1.6
1.7
2
2.5
2.4
2.3
2.3
2.1
2.4
2.2
2.4
1.9
2.1
2.1
2.1
2
2.1
2.2
2.2
2.6
2.5
2.3
2.2
2.4
2.3
2.2
2.5
2.5
2.5
2.4
2.3
1.7
1.6
1.9
1.9
1.8
1.8
1.9
1.9
1.9
1.9
1.8
1.7
2.1
2.6
3.1
3.1
3.2
3.3
3.6
3.3
3.7
4
4
3.8
3.6
3.2
2.1
1.6
1.1
1.2
0.6
0.6
0
-0.1
-0.6
-0.2
-0.3
-0.1
0.5
0.9




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108522&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]4 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=108522&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108522&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 time4 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[168])
1563.1-------
1573.2-------
1583.3-------
1593.6-------
1603.3-------
1613.7-------
1624-------
1634-------
1643.8-------
1653.6-------
1663.2-------
1672.1-------
1681.6-------
1691.11.34480.9681.72160.10140.092200.0922
1701.21.20430.62121.78740.49420.637100.0918
1710.61.07250.32391.8210.1080.369200.0836
1720.61.3110.42392.1980.05810.941900.2615
17301.09650.08892.10410.01650.832900.1637
174-0.10.9059-0.20962.02140.03860.944300.1113
175-0.60.8973-0.31652.11110.00780.946300.1283
176-0.21.0129-0.29192.31770.03420.992300.1889
177-0.31.0254-0.36442.41530.03080.9581e-040.2089
178-0.11.1361-0.3342.60610.04970.97220.0030.2681
1790.51.64620.10023.19210.07310.98660.28250.5233
1800.91.92930.31093.54770.10630.95830.6550.655

\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[168]) \tabularnewline
156 & 3.1 & - & - & - & - & - & - & - \tabularnewline
157 & 3.2 & - & - & - & - & - & - & - \tabularnewline
158 & 3.3 & - & - & - & - & - & - & - \tabularnewline
159 & 3.6 & - & - & - & - & - & - & - \tabularnewline
160 & 3.3 & - & - & - & - & - & - & - \tabularnewline
161 & 3.7 & - & - & - & - & - & - & - \tabularnewline
162 & 4 & - & - & - & - & - & - & - \tabularnewline
163 & 4 & - & - & - & - & - & - & - \tabularnewline
164 & 3.8 & - & - & - & - & - & - & - \tabularnewline
165 & 3.6 & - & - & - & - & - & - & - \tabularnewline
166 & 3.2 & - & - & - & - & - & - & - \tabularnewline
167 & 2.1 & - & - & - & - & - & - & - \tabularnewline
168 & 1.6 & - & - & - & - & - & - & - \tabularnewline
169 & 1.1 & 1.3448 & 0.968 & 1.7216 & 0.1014 & 0.0922 & 0 & 0.0922 \tabularnewline
170 & 1.2 & 1.2043 & 0.6212 & 1.7874 & 0.4942 & 0.6371 & 0 & 0.0918 \tabularnewline
171 & 0.6 & 1.0725 & 0.3239 & 1.821 & 0.108 & 0.3692 & 0 & 0.0836 \tabularnewline
172 & 0.6 & 1.311 & 0.4239 & 2.198 & 0.0581 & 0.9419 & 0 & 0.2615 \tabularnewline
173 & 0 & 1.0965 & 0.0889 & 2.1041 & 0.0165 & 0.8329 & 0 & 0.1637 \tabularnewline
174 & -0.1 & 0.9059 & -0.2096 & 2.0214 & 0.0386 & 0.9443 & 0 & 0.1113 \tabularnewline
175 & -0.6 & 0.8973 & -0.3165 & 2.1111 & 0.0078 & 0.9463 & 0 & 0.1283 \tabularnewline
176 & -0.2 & 1.0129 & -0.2919 & 2.3177 & 0.0342 & 0.9923 & 0 & 0.1889 \tabularnewline
177 & -0.3 & 1.0254 & -0.3644 & 2.4153 & 0.0308 & 0.958 & 1e-04 & 0.2089 \tabularnewline
178 & -0.1 & 1.1361 & -0.334 & 2.6061 & 0.0497 & 0.9722 & 0.003 & 0.2681 \tabularnewline
179 & 0.5 & 1.6462 & 0.1002 & 3.1921 & 0.0731 & 0.9866 & 0.2825 & 0.5233 \tabularnewline
180 & 0.9 & 1.9293 & 0.3109 & 3.5477 & 0.1063 & 0.9583 & 0.655 & 0.655 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108522&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[168])[/C][/ROW]
[ROW][C]156[/C][C]3.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]157[/C][C]3.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]158[/C][C]3.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]159[/C][C]3.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]160[/C][C]3.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]161[/C][C]3.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]162[/C][C]4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]163[/C][C]4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]164[/C][C]3.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]165[/C][C]3.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]166[/C][C]3.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]167[/C][C]2.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]168[/C][C]1.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]169[/C][C]1.1[/C][C]1.3448[/C][C]0.968[/C][C]1.7216[/C][C]0.1014[/C][C]0.0922[/C][C]0[/C][C]0.0922[/C][/ROW]
[ROW][C]170[/C][C]1.2[/C][C]1.2043[/C][C]0.6212[/C][C]1.7874[/C][C]0.4942[/C][C]0.6371[/C][C]0[/C][C]0.0918[/C][/ROW]
[ROW][C]171[/C][C]0.6[/C][C]1.0725[/C][C]0.3239[/C][C]1.821[/C][C]0.108[/C][C]0.3692[/C][C]0[/C][C]0.0836[/C][/ROW]
[ROW][C]172[/C][C]0.6[/C][C]1.311[/C][C]0.4239[/C][C]2.198[/C][C]0.0581[/C][C]0.9419[/C][C]0[/C][C]0.2615[/C][/ROW]
[ROW][C]173[/C][C]0[/C][C]1.0965[/C][C]0.0889[/C][C]2.1041[/C][C]0.0165[/C][C]0.8329[/C][C]0[/C][C]0.1637[/C][/ROW]
[ROW][C]174[/C][C]-0.1[/C][C]0.9059[/C][C]-0.2096[/C][C]2.0214[/C][C]0.0386[/C][C]0.9443[/C][C]0[/C][C]0.1113[/C][/ROW]
[ROW][C]175[/C][C]-0.6[/C][C]0.8973[/C][C]-0.3165[/C][C]2.1111[/C][C]0.0078[/C][C]0.9463[/C][C]0[/C][C]0.1283[/C][/ROW]
[ROW][C]176[/C][C]-0.2[/C][C]1.0129[/C][C]-0.2919[/C][C]2.3177[/C][C]0.0342[/C][C]0.9923[/C][C]0[/C][C]0.1889[/C][/ROW]
[ROW][C]177[/C][C]-0.3[/C][C]1.0254[/C][C]-0.3644[/C][C]2.4153[/C][C]0.0308[/C][C]0.958[/C][C]1e-04[/C][C]0.2089[/C][/ROW]
[ROW][C]178[/C][C]-0.1[/C][C]1.1361[/C][C]-0.334[/C][C]2.6061[/C][C]0.0497[/C][C]0.9722[/C][C]0.003[/C][C]0.2681[/C][/ROW]
[ROW][C]179[/C][C]0.5[/C][C]1.6462[/C][C]0.1002[/C][C]3.1921[/C][C]0.0731[/C][C]0.9866[/C][C]0.2825[/C][C]0.5233[/C][/ROW]
[ROW][C]180[/C][C]0.9[/C][C]1.9293[/C][C]0.3109[/C][C]3.5477[/C][C]0.1063[/C][C]0.9583[/C][C]0.655[/C][C]0.655[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108522&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108522&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[168])
1563.1-------
1573.2-------
1583.3-------
1593.6-------
1603.3-------
1613.7-------
1624-------
1634-------
1643.8-------
1653.6-------
1663.2-------
1672.1-------
1681.6-------
1691.11.34480.9681.72160.10140.092200.0922
1701.21.20430.62121.78740.49420.637100.0918
1710.61.07250.32391.8210.1080.369200.0836
1720.61.3110.42392.1980.05810.941900.2615
17301.09650.08892.10410.01650.832900.1637
174-0.10.9059-0.20962.02140.03860.944300.1113
175-0.60.8973-0.31652.11110.00780.946300.1283
176-0.21.0129-0.29192.31770.03420.992300.1889
177-0.31.0254-0.36442.41530.03080.9581e-040.2089
178-0.11.1361-0.3342.60610.04970.97220.0030.2681
1790.51.64620.10023.19210.07310.98660.28250.5233
1800.91.92930.31093.54770.10630.95830.6550.655







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1690.1429-0.18200.059900
1700.247-0.00360.092800.030.1731
1710.3561-0.44050.20870.22320.09440.3072
1720.3452-0.54230.29210.50550.19720.444
1730.4688-10.43371.20240.39820.631
1740.6282-1.11040.54651.01190.50050.7074
1750.6902-1.66870.70682.2420.74930.8656
1760.6573-1.19750.76811.47110.83950.9162
1770.6915-1.29260.82641.75670.94140.9703
1780.6602-1.0880.85261.527811
1790.4792-0.69630.83831.31371.02861.0142
1800.428-0.53350.81291.05951.03111.0154

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
169 & 0.1429 & -0.182 & 0 & 0.0599 & 0 & 0 \tabularnewline
170 & 0.247 & -0.0036 & 0.0928 & 0 & 0.03 & 0.1731 \tabularnewline
171 & 0.3561 & -0.4405 & 0.2087 & 0.2232 & 0.0944 & 0.3072 \tabularnewline
172 & 0.3452 & -0.5423 & 0.2921 & 0.5055 & 0.1972 & 0.444 \tabularnewline
173 & 0.4688 & -1 & 0.4337 & 1.2024 & 0.3982 & 0.631 \tabularnewline
174 & 0.6282 & -1.1104 & 0.5465 & 1.0119 & 0.5005 & 0.7074 \tabularnewline
175 & 0.6902 & -1.6687 & 0.7068 & 2.242 & 0.7493 & 0.8656 \tabularnewline
176 & 0.6573 & -1.1975 & 0.7681 & 1.4711 & 0.8395 & 0.9162 \tabularnewline
177 & 0.6915 & -1.2926 & 0.8264 & 1.7567 & 0.9414 & 0.9703 \tabularnewline
178 & 0.6602 & -1.088 & 0.8526 & 1.5278 & 1 & 1 \tabularnewline
179 & 0.4792 & -0.6963 & 0.8383 & 1.3137 & 1.0286 & 1.0142 \tabularnewline
180 & 0.428 & -0.5335 & 0.8129 & 1.0595 & 1.0311 & 1.0154 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108522&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]169[/C][C]0.1429[/C][C]-0.182[/C][C]0[/C][C]0.0599[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]170[/C][C]0.247[/C][C]-0.0036[/C][C]0.0928[/C][C]0[/C][C]0.03[/C][C]0.1731[/C][/ROW]
[ROW][C]171[/C][C]0.3561[/C][C]-0.4405[/C][C]0.2087[/C][C]0.2232[/C][C]0.0944[/C][C]0.3072[/C][/ROW]
[ROW][C]172[/C][C]0.3452[/C][C]-0.5423[/C][C]0.2921[/C][C]0.5055[/C][C]0.1972[/C][C]0.444[/C][/ROW]
[ROW][C]173[/C][C]0.4688[/C][C]-1[/C][C]0.4337[/C][C]1.2024[/C][C]0.3982[/C][C]0.631[/C][/ROW]
[ROW][C]174[/C][C]0.6282[/C][C]-1.1104[/C][C]0.5465[/C][C]1.0119[/C][C]0.5005[/C][C]0.7074[/C][/ROW]
[ROW][C]175[/C][C]0.6902[/C][C]-1.6687[/C][C]0.7068[/C][C]2.242[/C][C]0.7493[/C][C]0.8656[/C][/ROW]
[ROW][C]176[/C][C]0.6573[/C][C]-1.1975[/C][C]0.7681[/C][C]1.4711[/C][C]0.8395[/C][C]0.9162[/C][/ROW]
[ROW][C]177[/C][C]0.6915[/C][C]-1.2926[/C][C]0.8264[/C][C]1.7567[/C][C]0.9414[/C][C]0.9703[/C][/ROW]
[ROW][C]178[/C][C]0.6602[/C][C]-1.088[/C][C]0.8526[/C][C]1.5278[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]179[/C][C]0.4792[/C][C]-0.6963[/C][C]0.8383[/C][C]1.3137[/C][C]1.0286[/C][C]1.0142[/C][/ROW]
[ROW][C]180[/C][C]0.428[/C][C]-0.5335[/C][C]0.8129[/C][C]1.0595[/C][C]1.0311[/C][C]1.0154[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108522&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108522&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
1690.1429-0.18200.059900
1700.247-0.00360.092800.030.1731
1710.3561-0.44050.20870.22320.09440.3072
1720.3452-0.54230.29210.50550.19720.444
1730.4688-10.43371.20240.39820.631
1740.6282-1.11040.54651.01190.50050.7074
1750.6902-1.66870.70682.2420.74930.8656
1760.6573-1.19750.76811.47110.83950.9162
1770.6915-1.29260.82641.75670.94140.9703
1780.6602-1.0880.85261.527811
1790.4792-0.69630.83831.31371.02861.0142
1800.428-0.53350.81291.05951.03111.0154



Parameters (Session):
par1 = 1 ; par2 = 1 ; par3 = 2 ; par4 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; 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,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')