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 computationTue, 07 Dec 2010 11:50:46 +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/07/t1291722574b1pzo7e06bhgutf.htm/, Retrieved Sat, 04 May 2024 01:52:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106200, Retrieved Sat, 04 May 2024 01:52:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact119
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:26:44] [1f5baf2b24e732d76900bb8178fc04e7]
-                   [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-07 11:50:46] [ee4a783fb13f41eb2e9bc8a0c4f26279] [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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 12 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106200&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]12 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106200&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106200&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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[167])
1553.1-------
1563.1-------
1573.2-------
1583.3-------
1593.6-------
1603.3-------
1613.7-------
1624-------
1634-------
1643.8-------
1653.6-------
1663.2-------
1672.1-------
1681.62.01081.6522.36960.01240.313100.3131
1691.12.00261.45572.54956e-040.925500.3635
1701.21.9621.28152.64260.01410.99351e-040.3455
1710.61.74360.95752.52970.00220.912400.1871
1720.61.94631.07032.82230.00130.99870.00120.3655
17301.68670.73042.6433e-040.98700.1985
174-0.11.49110.46122.5210.00120.997700.1233
175-0.61.52720.42882.62561e-040.998200.1534
176-0.21.69410.53132.8577e-040.99992e-040.247
177-0.31.68170.45782.90578e-040.99870.00110.2515
178-0.11.76450.48243.04660.00220.99920.01410.304
1790.52.30580.96813.64350.00410.99980.61850.6185
1800.92.36421.01853.70990.01650.99670.86710.6498

\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[167]) \tabularnewline
155 & 3.1 & - & - & - & - & - & - & - \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 & 2.0108 & 1.652 & 2.3696 & 0.0124 & 0.3131 & 0 & 0.3131 \tabularnewline
169 & 1.1 & 2.0026 & 1.4557 & 2.5495 & 6e-04 & 0.9255 & 0 & 0.3635 \tabularnewline
170 & 1.2 & 1.962 & 1.2815 & 2.6426 & 0.0141 & 0.9935 & 1e-04 & 0.3455 \tabularnewline
171 & 0.6 & 1.7436 & 0.9575 & 2.5297 & 0.0022 & 0.9124 & 0 & 0.1871 \tabularnewline
172 & 0.6 & 1.9463 & 1.0703 & 2.8223 & 0.0013 & 0.9987 & 0.0012 & 0.3655 \tabularnewline
173 & 0 & 1.6867 & 0.7304 & 2.643 & 3e-04 & 0.987 & 0 & 0.1985 \tabularnewline
174 & -0.1 & 1.4911 & 0.4612 & 2.521 & 0.0012 & 0.9977 & 0 & 0.1233 \tabularnewline
175 & -0.6 & 1.5272 & 0.4288 & 2.6256 & 1e-04 & 0.9982 & 0 & 0.1534 \tabularnewline
176 & -0.2 & 1.6941 & 0.5313 & 2.857 & 7e-04 & 0.9999 & 2e-04 & 0.247 \tabularnewline
177 & -0.3 & 1.6817 & 0.4578 & 2.9057 & 8e-04 & 0.9987 & 0.0011 & 0.2515 \tabularnewline
178 & -0.1 & 1.7645 & 0.4824 & 3.0466 & 0.0022 & 0.9992 & 0.0141 & 0.304 \tabularnewline
179 & 0.5 & 2.3058 & 0.9681 & 3.6435 & 0.0041 & 0.9998 & 0.6185 & 0.6185 \tabularnewline
180 & 0.9 & 2.3642 & 1.0185 & 3.7099 & 0.0165 & 0.9967 & 0.8671 & 0.6498 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106200&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[167])[/C][/ROW]
[ROW][C]155[/C][C]3.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/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]2.0108[/C][C]1.652[/C][C]2.3696[/C][C]0.0124[/C][C]0.3131[/C][C]0[/C][C]0.3131[/C][/ROW]
[ROW][C]169[/C][C]1.1[/C][C]2.0026[/C][C]1.4557[/C][C]2.5495[/C][C]6e-04[/C][C]0.9255[/C][C]0[/C][C]0.3635[/C][/ROW]
[ROW][C]170[/C][C]1.2[/C][C]1.962[/C][C]1.2815[/C][C]2.6426[/C][C]0.0141[/C][C]0.9935[/C][C]1e-04[/C][C]0.3455[/C][/ROW]
[ROW][C]171[/C][C]0.6[/C][C]1.7436[/C][C]0.9575[/C][C]2.5297[/C][C]0.0022[/C][C]0.9124[/C][C]0[/C][C]0.1871[/C][/ROW]
[ROW][C]172[/C][C]0.6[/C][C]1.9463[/C][C]1.0703[/C][C]2.8223[/C][C]0.0013[/C][C]0.9987[/C][C]0.0012[/C][C]0.3655[/C][/ROW]
[ROW][C]173[/C][C]0[/C][C]1.6867[/C][C]0.7304[/C][C]2.643[/C][C]3e-04[/C][C]0.987[/C][C]0[/C][C]0.1985[/C][/ROW]
[ROW][C]174[/C][C]-0.1[/C][C]1.4911[/C][C]0.4612[/C][C]2.521[/C][C]0.0012[/C][C]0.9977[/C][C]0[/C][C]0.1233[/C][/ROW]
[ROW][C]175[/C][C]-0.6[/C][C]1.5272[/C][C]0.4288[/C][C]2.6256[/C][C]1e-04[/C][C]0.9982[/C][C]0[/C][C]0.1534[/C][/ROW]
[ROW][C]176[/C][C]-0.2[/C][C]1.6941[/C][C]0.5313[/C][C]2.857[/C][C]7e-04[/C][C]0.9999[/C][C]2e-04[/C][C]0.247[/C][/ROW]
[ROW][C]177[/C][C]-0.3[/C][C]1.6817[/C][C]0.4578[/C][C]2.9057[/C][C]8e-04[/C][C]0.9987[/C][C]0.0011[/C][C]0.2515[/C][/ROW]
[ROW][C]178[/C][C]-0.1[/C][C]1.7645[/C][C]0.4824[/C][C]3.0466[/C][C]0.0022[/C][C]0.9992[/C][C]0.0141[/C][C]0.304[/C][/ROW]
[ROW][C]179[/C][C]0.5[/C][C]2.3058[/C][C]0.9681[/C][C]3.6435[/C][C]0.0041[/C][C]0.9998[/C][C]0.6185[/C][C]0.6185[/C][/ROW]
[ROW][C]180[/C][C]0.9[/C][C]2.3642[/C][C]1.0185[/C][C]3.7099[/C][C]0.0165[/C][C]0.9967[/C][C]0.8671[/C][C]0.6498[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106200&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106200&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[167])
1553.1-------
1563.1-------
1573.2-------
1583.3-------
1593.6-------
1603.3-------
1613.7-------
1624-------
1634-------
1643.8-------
1653.6-------
1663.2-------
1672.1-------
1681.62.01081.6522.36960.01240.313100.3131
1691.12.00261.45572.54956e-040.925500.3635
1701.21.9621.28152.64260.01410.99351e-040.3455
1710.61.74360.95752.52970.00220.912400.1871
1720.61.94631.07032.82230.00130.99870.00120.3655
17301.68670.73042.6433e-040.98700.1985
174-0.11.49110.46122.5210.00120.997700.1233
175-0.61.52720.42882.62561e-040.998200.1534
176-0.21.69410.53132.8577e-040.99992e-040.247
177-0.31.68170.45782.90578e-040.99870.00110.2515
178-0.11.76450.48243.04660.00220.99920.01410.304
1790.52.30580.96813.64350.00410.99980.61850.6185
1800.92.36421.01853.70990.01650.99670.86710.6498







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1680.091-0.204300.168800
1690.1393-0.45070.32750.81460.49170.7012
1700.177-0.38840.34780.58070.52140.7221
1710.23-0.65590.42481.30780.7180.8473
1720.2296-0.69170.47821.81260.93690.9679
1730.2893-10.56522.84511.25491.1202
1740.3524-1.06710.63692.53151.43731.1989
1750.367-1.39290.73144.5251.82331.3503
1760.3502-1.11810.77433.58772.01931.421
1770.3713-1.17840.81473.92732.21011.4866
1780.3707-1.05670.83673.47642.32521.5249
1790.296-0.78320.83233.26082.40321.5502
1800.2904-0.61930.81592.14382.38321.5438

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
168 & 0.091 & -0.2043 & 0 & 0.1688 & 0 & 0 \tabularnewline
169 & 0.1393 & -0.4507 & 0.3275 & 0.8146 & 0.4917 & 0.7012 \tabularnewline
170 & 0.177 & -0.3884 & 0.3478 & 0.5807 & 0.5214 & 0.7221 \tabularnewline
171 & 0.23 & -0.6559 & 0.4248 & 1.3078 & 0.718 & 0.8473 \tabularnewline
172 & 0.2296 & -0.6917 & 0.4782 & 1.8126 & 0.9369 & 0.9679 \tabularnewline
173 & 0.2893 & -1 & 0.5652 & 2.8451 & 1.2549 & 1.1202 \tabularnewline
174 & 0.3524 & -1.0671 & 0.6369 & 2.5315 & 1.4373 & 1.1989 \tabularnewline
175 & 0.367 & -1.3929 & 0.7314 & 4.525 & 1.8233 & 1.3503 \tabularnewline
176 & 0.3502 & -1.1181 & 0.7743 & 3.5877 & 2.0193 & 1.421 \tabularnewline
177 & 0.3713 & -1.1784 & 0.8147 & 3.9273 & 2.2101 & 1.4866 \tabularnewline
178 & 0.3707 & -1.0567 & 0.8367 & 3.4764 & 2.3252 & 1.5249 \tabularnewline
179 & 0.296 & -0.7832 & 0.8323 & 3.2608 & 2.4032 & 1.5502 \tabularnewline
180 & 0.2904 & -0.6193 & 0.8159 & 2.1438 & 2.3832 & 1.5438 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106200&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]168[/C][C]0.091[/C][C]-0.2043[/C][C]0[/C][C]0.1688[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]169[/C][C]0.1393[/C][C]-0.4507[/C][C]0.3275[/C][C]0.8146[/C][C]0.4917[/C][C]0.7012[/C][/ROW]
[ROW][C]170[/C][C]0.177[/C][C]-0.3884[/C][C]0.3478[/C][C]0.5807[/C][C]0.5214[/C][C]0.7221[/C][/ROW]
[ROW][C]171[/C][C]0.23[/C][C]-0.6559[/C][C]0.4248[/C][C]1.3078[/C][C]0.718[/C][C]0.8473[/C][/ROW]
[ROW][C]172[/C][C]0.2296[/C][C]-0.6917[/C][C]0.4782[/C][C]1.8126[/C][C]0.9369[/C][C]0.9679[/C][/ROW]
[ROW][C]173[/C][C]0.2893[/C][C]-1[/C][C]0.5652[/C][C]2.8451[/C][C]1.2549[/C][C]1.1202[/C][/ROW]
[ROW][C]174[/C][C]0.3524[/C][C]-1.0671[/C][C]0.6369[/C][C]2.5315[/C][C]1.4373[/C][C]1.1989[/C][/ROW]
[ROW][C]175[/C][C]0.367[/C][C]-1.3929[/C][C]0.7314[/C][C]4.525[/C][C]1.8233[/C][C]1.3503[/C][/ROW]
[ROW][C]176[/C][C]0.3502[/C][C]-1.1181[/C][C]0.7743[/C][C]3.5877[/C][C]2.0193[/C][C]1.421[/C][/ROW]
[ROW][C]177[/C][C]0.3713[/C][C]-1.1784[/C][C]0.8147[/C][C]3.9273[/C][C]2.2101[/C][C]1.4866[/C][/ROW]
[ROW][C]178[/C][C]0.3707[/C][C]-1.0567[/C][C]0.8367[/C][C]3.4764[/C][C]2.3252[/C][C]1.5249[/C][/ROW]
[ROW][C]179[/C][C]0.296[/C][C]-0.7832[/C][C]0.8323[/C][C]3.2608[/C][C]2.4032[/C][C]1.5502[/C][/ROW]
[ROW][C]180[/C][C]0.2904[/C][C]-0.6193[/C][C]0.8159[/C][C]2.1438[/C][C]2.3832[/C][C]1.5438[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106200&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106200&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
1680.091-0.204300.168800
1690.1393-0.45070.32750.81460.49170.7012
1700.177-0.38840.34780.58070.52140.7221
1710.23-0.65590.42481.30780.7180.8473
1720.2296-0.69170.47821.81260.93690.9679
1730.2893-10.56522.84511.25491.1202
1740.3524-1.06710.63692.53151.43731.1989
1750.367-1.39290.73144.5251.82331.3503
1760.3502-1.11810.77433.58772.01931.421
1770.3713-1.17840.81473.92732.21011.4866
1780.3707-1.05670.83673.47642.32521.5249
1790.296-0.78320.83233.26082.40321.5502
1800.2904-0.61930.81592.14382.38321.5438



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