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, 03 Dec 2010 14:53:43 +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/03/t1291387925z08tg3csz8i0j4q.htm/, Retrieved Wed, 08 May 2024 00:49:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104844, Retrieved Wed, 08 May 2024 00:49:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact150
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] [arima voorspelling] [2010-12-03 14:53:43] [7b4029fa8534fd52dfa7d68267386cff] [Current]
Feedback Forum

Post a new message
Dataseries X:
62.027
56.493
65.566
62.653
53.470
59.600
42.542
42.018
44.038
44.988
43.309
26.843
69.770
64.886
79.354
63.025
54.003
55.926
45.629
40.361
43.039
44.570
43.269
25.563
68.707
60.223
74.283
61.232
61.531
65.305
51.699
44.599
35.221
55.066
45.335
28.702
69.517
69.240
71.525
77.740
62.107
65.450
51.493
43.067
49.172
54.483
38.158
27.898
58.648
56.000
62.381
59.849
48.345
55.376
45.400
38.389
44.098
48.290
41.267
31.238




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104844&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'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[48])
3628.702-------
3769.517-------
3869.24-------
3971.525-------
4077.74-------
4162.107-------
4265.45-------
4351.493-------
4443.067-------
4549.172-------
4654.483-------
4738.158-------
4827.898-------
4958.64868.758757.834279.68320.034810.44591
505665.10753.943676.27040.05490.87160.2341
5162.38172.789761.615883.96360.03390.99840.58781
5259.84969.952158.777781.12650.03820.90790.0861
5348.34559.991648.817271.1660.02050.510.35531
5455.37663.508852.334374.68320.07690.99610.36671
5545.449.867538.693161.04190.21660.1670.38780.9999
5638.38942.980831.806354.15520.21030.33570.4940.9959
5744.09844.203333.028955.37770.49260.84610.19170.9979
5848.2952.326641.152163.5010.23950.92550.35261
5941.26741.213230.038852.38760.49620.10730.7040.9902
6031.23827.60216.428138.77590.26180.00830.47930.4793

\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[48]) \tabularnewline
36 & 28.702 & - & - & - & - & - & - & - \tabularnewline
37 & 69.517 & - & - & - & - & - & - & - \tabularnewline
38 & 69.24 & - & - & - & - & - & - & - \tabularnewline
39 & 71.525 & - & - & - & - & - & - & - \tabularnewline
40 & 77.74 & - & - & - & - & - & - & - \tabularnewline
41 & 62.107 & - & - & - & - & - & - & - \tabularnewline
42 & 65.45 & - & - & - & - & - & - & - \tabularnewline
43 & 51.493 & - & - & - & - & - & - & - \tabularnewline
44 & 43.067 & - & - & - & - & - & - & - \tabularnewline
45 & 49.172 & - & - & - & - & - & - & - \tabularnewline
46 & 54.483 & - & - & - & - & - & - & - \tabularnewline
47 & 38.158 & - & - & - & - & - & - & - \tabularnewline
48 & 27.898 & - & - & - & - & - & - & - \tabularnewline
49 & 58.648 & 68.7587 & 57.8342 & 79.6832 & 0.0348 & 1 & 0.4459 & 1 \tabularnewline
50 & 56 & 65.107 & 53.9436 & 76.2704 & 0.0549 & 0.8716 & 0.234 & 1 \tabularnewline
51 & 62.381 & 72.7897 & 61.6158 & 83.9636 & 0.0339 & 0.9984 & 0.5878 & 1 \tabularnewline
52 & 59.849 & 69.9521 & 58.7777 & 81.1265 & 0.0382 & 0.9079 & 0.086 & 1 \tabularnewline
53 & 48.345 & 59.9916 & 48.8172 & 71.166 & 0.0205 & 0.51 & 0.3553 & 1 \tabularnewline
54 & 55.376 & 63.5088 & 52.3343 & 74.6832 & 0.0769 & 0.9961 & 0.3667 & 1 \tabularnewline
55 & 45.4 & 49.8675 & 38.6931 & 61.0419 & 0.2166 & 0.167 & 0.3878 & 0.9999 \tabularnewline
56 & 38.389 & 42.9808 & 31.8063 & 54.1552 & 0.2103 & 0.3357 & 0.494 & 0.9959 \tabularnewline
57 & 44.098 & 44.2033 & 33.0289 & 55.3777 & 0.4926 & 0.8461 & 0.1917 & 0.9979 \tabularnewline
58 & 48.29 & 52.3266 & 41.1521 & 63.501 & 0.2395 & 0.9255 & 0.3526 & 1 \tabularnewline
59 & 41.267 & 41.2132 & 30.0388 & 52.3876 & 0.4962 & 0.1073 & 0.704 & 0.9902 \tabularnewline
60 & 31.238 & 27.602 & 16.4281 & 38.7759 & 0.2618 & 0.0083 & 0.4793 & 0.4793 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104844&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[48])[/C][/ROW]
[ROW][C]36[/C][C]28.702[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]69.517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]69.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]71.525[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]77.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]62.107[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]65.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]51.493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]43.067[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]49.172[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]54.483[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]38.158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]27.898[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]58.648[/C][C]68.7587[/C][C]57.8342[/C][C]79.6832[/C][C]0.0348[/C][C]1[/C][C]0.4459[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]56[/C][C]65.107[/C][C]53.9436[/C][C]76.2704[/C][C]0.0549[/C][C]0.8716[/C][C]0.234[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]62.381[/C][C]72.7897[/C][C]61.6158[/C][C]83.9636[/C][C]0.0339[/C][C]0.9984[/C][C]0.5878[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]59.849[/C][C]69.9521[/C][C]58.7777[/C][C]81.1265[/C][C]0.0382[/C][C]0.9079[/C][C]0.086[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]48.345[/C][C]59.9916[/C][C]48.8172[/C][C]71.166[/C][C]0.0205[/C][C]0.51[/C][C]0.3553[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]55.376[/C][C]63.5088[/C][C]52.3343[/C][C]74.6832[/C][C]0.0769[/C][C]0.9961[/C][C]0.3667[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]45.4[/C][C]49.8675[/C][C]38.6931[/C][C]61.0419[/C][C]0.2166[/C][C]0.167[/C][C]0.3878[/C][C]0.9999[/C][/ROW]
[ROW][C]56[/C][C]38.389[/C][C]42.9808[/C][C]31.8063[/C][C]54.1552[/C][C]0.2103[/C][C]0.3357[/C][C]0.494[/C][C]0.9959[/C][/ROW]
[ROW][C]57[/C][C]44.098[/C][C]44.2033[/C][C]33.0289[/C][C]55.3777[/C][C]0.4926[/C][C]0.8461[/C][C]0.1917[/C][C]0.9979[/C][/ROW]
[ROW][C]58[/C][C]48.29[/C][C]52.3266[/C][C]41.1521[/C][C]63.501[/C][C]0.2395[/C][C]0.9255[/C][C]0.3526[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]41.267[/C][C]41.2132[/C][C]30.0388[/C][C]52.3876[/C][C]0.4962[/C][C]0.1073[/C][C]0.704[/C][C]0.9902[/C][/ROW]
[ROW][C]60[/C][C]31.238[/C][C]27.602[/C][C]16.4281[/C][C]38.7759[/C][C]0.2618[/C][C]0.0083[/C][C]0.4793[/C][C]0.4793[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104844&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104844&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[48])
3628.702-------
3769.517-------
3869.24-------
3971.525-------
4077.74-------
4162.107-------
4265.45-------
4351.493-------
4443.067-------
4549.172-------
4654.483-------
4738.158-------
4827.898-------
4958.64868.758757.834279.68320.034810.44591
505665.10753.943676.27040.05490.87160.2341
5162.38172.789761.615883.96360.03390.99840.58781
5259.84969.952158.777781.12650.03820.90790.0861
5348.34559.991648.817271.1660.02050.510.35531
5455.37663.508852.334374.68320.07690.99610.36671
5545.449.867538.693161.04190.21660.1670.38780.9999
5638.38942.980831.806354.15520.21030.33570.4940.9959
5744.09844.203333.028955.37770.49260.84610.19170.9979
5848.2952.326641.152163.5010.23950.92550.35261
5941.26741.213230.038852.38760.49620.10730.7040.9902
6031.23827.60216.428138.77590.26180.00830.47930.4793







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0811-0.1470102.225500
500.0875-0.13990.143582.937292.58149.6219
510.0783-0.1430.1433108.340697.83449.8911
520.0815-0.14440.1436102.072498.89399.9445
530.095-0.19410.1537135.6426106.243710.3075
540.0898-0.12810.149466.141899.569.978
550.1143-0.08960.140919.958388.18849.3909
560.1326-0.10680.136621.084279.80038.9331
570.129-0.00240.12170.011170.93498.4223
580.109-0.07710.117216.293865.47088.0914
590.13830.00130.10670.002959.51917.7149
600.20650.13170.108813.220455.66097.4606

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0811 & -0.147 & 0 & 102.2255 & 0 & 0 \tabularnewline
50 & 0.0875 & -0.1399 & 0.1435 & 82.9372 & 92.5814 & 9.6219 \tabularnewline
51 & 0.0783 & -0.143 & 0.1433 & 108.3406 & 97.8344 & 9.8911 \tabularnewline
52 & 0.0815 & -0.1444 & 0.1436 & 102.0724 & 98.8939 & 9.9445 \tabularnewline
53 & 0.095 & -0.1941 & 0.1537 & 135.6426 & 106.2437 & 10.3075 \tabularnewline
54 & 0.0898 & -0.1281 & 0.1494 & 66.1418 & 99.56 & 9.978 \tabularnewline
55 & 0.1143 & -0.0896 & 0.1409 & 19.9583 & 88.1884 & 9.3909 \tabularnewline
56 & 0.1326 & -0.1068 & 0.1366 & 21.0842 & 79.8003 & 8.9331 \tabularnewline
57 & 0.129 & -0.0024 & 0.1217 & 0.0111 & 70.9349 & 8.4223 \tabularnewline
58 & 0.109 & -0.0771 & 0.1172 & 16.2938 & 65.4708 & 8.0914 \tabularnewline
59 & 0.1383 & 0.0013 & 0.1067 & 0.0029 & 59.5191 & 7.7149 \tabularnewline
60 & 0.2065 & 0.1317 & 0.1088 & 13.2204 & 55.6609 & 7.4606 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104844&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]49[/C][C]0.0811[/C][C]-0.147[/C][C]0[/C][C]102.2255[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0875[/C][C]-0.1399[/C][C]0.1435[/C][C]82.9372[/C][C]92.5814[/C][C]9.6219[/C][/ROW]
[ROW][C]51[/C][C]0.0783[/C][C]-0.143[/C][C]0.1433[/C][C]108.3406[/C][C]97.8344[/C][C]9.8911[/C][/ROW]
[ROW][C]52[/C][C]0.0815[/C][C]-0.1444[/C][C]0.1436[/C][C]102.0724[/C][C]98.8939[/C][C]9.9445[/C][/ROW]
[ROW][C]53[/C][C]0.095[/C][C]-0.1941[/C][C]0.1537[/C][C]135.6426[/C][C]106.2437[/C][C]10.3075[/C][/ROW]
[ROW][C]54[/C][C]0.0898[/C][C]-0.1281[/C][C]0.1494[/C][C]66.1418[/C][C]99.56[/C][C]9.978[/C][/ROW]
[ROW][C]55[/C][C]0.1143[/C][C]-0.0896[/C][C]0.1409[/C][C]19.9583[/C][C]88.1884[/C][C]9.3909[/C][/ROW]
[ROW][C]56[/C][C]0.1326[/C][C]-0.1068[/C][C]0.1366[/C][C]21.0842[/C][C]79.8003[/C][C]8.9331[/C][/ROW]
[ROW][C]57[/C][C]0.129[/C][C]-0.0024[/C][C]0.1217[/C][C]0.0111[/C][C]70.9349[/C][C]8.4223[/C][/ROW]
[ROW][C]58[/C][C]0.109[/C][C]-0.0771[/C][C]0.1172[/C][C]16.2938[/C][C]65.4708[/C][C]8.0914[/C][/ROW]
[ROW][C]59[/C][C]0.1383[/C][C]0.0013[/C][C]0.1067[/C][C]0.0029[/C][C]59.5191[/C][C]7.7149[/C][/ROW]
[ROW][C]60[/C][C]0.2065[/C][C]0.1317[/C][C]0.1088[/C][C]13.2204[/C][C]55.6609[/C][C]7.4606[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104844&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104844&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
490.0811-0.1470102.225500
500.0875-0.13990.143582.937292.58149.6219
510.0783-0.1430.1433108.340697.83449.8911
520.0815-0.14440.1436102.072498.89399.9445
530.095-0.19410.1537135.6426106.243710.3075
540.0898-0.12810.149466.141899.569.978
550.1143-0.08960.140919.958388.18849.3909
560.1326-0.10680.136621.084279.80038.9331
570.129-0.00240.12170.011170.93498.4223
580.109-0.07710.117216.293865.47088.0914
590.13830.00130.10670.002959.51917.7149
600.20650.13170.108813.220455.66097.4606



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