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, 09 Dec 2010 18:58:49 +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/09/t1291921008nve2ckhv9t8y1np.htm/, Retrieved Sun, 28 Apr 2024 23:10:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=107328, Retrieved Sun, 28 Apr 2024 23:10:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
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 Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
- RMPD      [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-03 12:22:40] [4a7069087cf9e0eda253aeed7d8c30d6]
-   P         [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-03 14:11:30] [4a7069087cf9e0eda253aeed7d8c30d6]
-   P             [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-09 18:58:49] [cfd788255f1b1b5389e58d7f218c70bf] [Current]
Feedback Forum

Post a new message
Dataseries X:
376.974
377.632
378.205
370.861
369.167
371.551
382.842
381.903
384.502
392.058
384.359
388.884
386.586
387.495
385.705
378.67
377.367
376.911
389.827
387.82
387.267
380.575
372.402
376.74
377.795
376.126
370.804
367.98
367.866
366.121
379.421
378.519
372.423
355.072
344.693
342.892
344.178
337.606
327.103
323.953
316.532
306.307
327.225
329.573
313.761
307.836
300.074
304.198
306.122
300.414
292.133
290.616
280.244
285.179
305.486
305.957
293.886
289.441
288.776
299.149
306.532
309.914
313.468
314.901
309.16
316.15
336.544
339.196
326.738
320.838
318.62
331.533
335.378




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 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 & 5 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107328&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]5 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=107328&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107328&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 time5 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[61])
49306.122-------
50300.414-------
51292.133-------
52290.616-------
53280.244-------
54285.179-------
55305.486-------
56305.957-------
57293.886-------
58289.441-------
59288.776-------
60299.149-------
61306.532-------
62309.914303.4241293.39313.45830.10250.27190.72170.2719
63313.468297.2839282.6171311.95060.01530.04570.75440.1083
64314.901297.4821278.8953316.06890.03310.04590.76550.17
65309.16288.0339264.716311.35180.03790.0120.74370.06
66316.15293.694266.2488321.13920.05440.13470.72840.1796
67336.544314.5506283.3385345.76280.08360.460.71540.6927
68339.196315.3435280.4503350.23670.09020.11690.7010.6897
69326.738303.5166265.2231341.81010.11730.03390.6890.4387
70320.838299.2502257.773340.72740.15380.0970.67850.3654
71318.62298.6959254.1866343.20520.19010.16480.66890.365
72331.533309.1508261.7793356.52240.17720.34760.66050.5431
73335.378316.5924266.5025366.68240.23110.27940.65310.6531

\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[61]) \tabularnewline
49 & 306.122 & - & - & - & - & - & - & - \tabularnewline
50 & 300.414 & - & - & - & - & - & - & - \tabularnewline
51 & 292.133 & - & - & - & - & - & - & - \tabularnewline
52 & 290.616 & - & - & - & - & - & - & - \tabularnewline
53 & 280.244 & - & - & - & - & - & - & - \tabularnewline
54 & 285.179 & - & - & - & - & - & - & - \tabularnewline
55 & 305.486 & - & - & - & - & - & - & - \tabularnewline
56 & 305.957 & - & - & - & - & - & - & - \tabularnewline
57 & 293.886 & - & - & - & - & - & - & - \tabularnewline
58 & 289.441 & - & - & - & - & - & - & - \tabularnewline
59 & 288.776 & - & - & - & - & - & - & - \tabularnewline
60 & 299.149 & - & - & - & - & - & - & - \tabularnewline
61 & 306.532 & - & - & - & - & - & - & - \tabularnewline
62 & 309.914 & 303.4241 & 293.39 & 313.4583 & 0.1025 & 0.2719 & 0.7217 & 0.2719 \tabularnewline
63 & 313.468 & 297.2839 & 282.6171 & 311.9506 & 0.0153 & 0.0457 & 0.7544 & 0.1083 \tabularnewline
64 & 314.901 & 297.4821 & 278.8953 & 316.0689 & 0.0331 & 0.0459 & 0.7655 & 0.17 \tabularnewline
65 & 309.16 & 288.0339 & 264.716 & 311.3518 & 0.0379 & 0.012 & 0.7437 & 0.06 \tabularnewline
66 & 316.15 & 293.694 & 266.2488 & 321.1392 & 0.0544 & 0.1347 & 0.7284 & 0.1796 \tabularnewline
67 & 336.544 & 314.5506 & 283.3385 & 345.7628 & 0.0836 & 0.46 & 0.7154 & 0.6927 \tabularnewline
68 & 339.196 & 315.3435 & 280.4503 & 350.2367 & 0.0902 & 0.1169 & 0.701 & 0.6897 \tabularnewline
69 & 326.738 & 303.5166 & 265.2231 & 341.8101 & 0.1173 & 0.0339 & 0.689 & 0.4387 \tabularnewline
70 & 320.838 & 299.2502 & 257.773 & 340.7274 & 0.1538 & 0.097 & 0.6785 & 0.3654 \tabularnewline
71 & 318.62 & 298.6959 & 254.1866 & 343.2052 & 0.1901 & 0.1648 & 0.6689 & 0.365 \tabularnewline
72 & 331.533 & 309.1508 & 261.7793 & 356.5224 & 0.1772 & 0.3476 & 0.6605 & 0.5431 \tabularnewline
73 & 335.378 & 316.5924 & 266.5025 & 366.6824 & 0.2311 & 0.2794 & 0.6531 & 0.6531 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107328&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[61])[/C][/ROW]
[ROW][C]49[/C][C]306.122[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]300.414[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]292.133[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]290.616[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]280.244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]285.179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]305.486[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]305.957[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]293.886[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]289.441[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]288.776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]299.149[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]306.532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]309.914[/C][C]303.4241[/C][C]293.39[/C][C]313.4583[/C][C]0.1025[/C][C]0.2719[/C][C]0.7217[/C][C]0.2719[/C][/ROW]
[ROW][C]63[/C][C]313.468[/C][C]297.2839[/C][C]282.6171[/C][C]311.9506[/C][C]0.0153[/C][C]0.0457[/C][C]0.7544[/C][C]0.1083[/C][/ROW]
[ROW][C]64[/C][C]314.901[/C][C]297.4821[/C][C]278.8953[/C][C]316.0689[/C][C]0.0331[/C][C]0.0459[/C][C]0.7655[/C][C]0.17[/C][/ROW]
[ROW][C]65[/C][C]309.16[/C][C]288.0339[/C][C]264.716[/C][C]311.3518[/C][C]0.0379[/C][C]0.012[/C][C]0.7437[/C][C]0.06[/C][/ROW]
[ROW][C]66[/C][C]316.15[/C][C]293.694[/C][C]266.2488[/C][C]321.1392[/C][C]0.0544[/C][C]0.1347[/C][C]0.7284[/C][C]0.1796[/C][/ROW]
[ROW][C]67[/C][C]336.544[/C][C]314.5506[/C][C]283.3385[/C][C]345.7628[/C][C]0.0836[/C][C]0.46[/C][C]0.7154[/C][C]0.6927[/C][/ROW]
[ROW][C]68[/C][C]339.196[/C][C]315.3435[/C][C]280.4503[/C][C]350.2367[/C][C]0.0902[/C][C]0.1169[/C][C]0.701[/C][C]0.6897[/C][/ROW]
[ROW][C]69[/C][C]326.738[/C][C]303.5166[/C][C]265.2231[/C][C]341.8101[/C][C]0.1173[/C][C]0.0339[/C][C]0.689[/C][C]0.4387[/C][/ROW]
[ROW][C]70[/C][C]320.838[/C][C]299.2502[/C][C]257.773[/C][C]340.7274[/C][C]0.1538[/C][C]0.097[/C][C]0.6785[/C][C]0.3654[/C][/ROW]
[ROW][C]71[/C][C]318.62[/C][C]298.6959[/C][C]254.1866[/C][C]343.2052[/C][C]0.1901[/C][C]0.1648[/C][C]0.6689[/C][C]0.365[/C][/ROW]
[ROW][C]72[/C][C]331.533[/C][C]309.1508[/C][C]261.7793[/C][C]356.5224[/C][C]0.1772[/C][C]0.3476[/C][C]0.6605[/C][C]0.5431[/C][/ROW]
[ROW][C]73[/C][C]335.378[/C][C]316.5924[/C][C]266.5025[/C][C]366.6824[/C][C]0.2311[/C][C]0.2794[/C][C]0.6531[/C][C]0.6531[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107328&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107328&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[61])
49306.122-------
50300.414-------
51292.133-------
52290.616-------
53280.244-------
54285.179-------
55305.486-------
56305.957-------
57293.886-------
58289.441-------
59288.776-------
60299.149-------
61306.532-------
62309.914303.4241293.39313.45830.10250.27190.72170.2719
63313.468297.2839282.6171311.95060.01530.04570.75440.1083
64314.901297.4821278.8953316.06890.03310.04590.76550.17
65309.16288.0339264.716311.35180.03790.0120.74370.06
66316.15293.694266.2488321.13920.05440.13470.72840.1796
67336.544314.5506283.3385345.76280.08360.460.71540.6927
68339.196315.3435280.4503350.23670.09020.11690.7010.6897
69326.738303.5166265.2231341.81010.11730.03390.6890.4387
70320.838299.2502257.773340.72740.15380.0970.67850.3654
71318.62298.6959254.1866343.20520.19010.16480.66890.365
72331.533309.1508261.7793356.52240.17720.34760.66050.5431
73335.378316.5924266.5025366.68240.23110.27940.65310.6531







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.01690.0214042.118400
630.02520.05440.0379261.9264152.022412.3297
640.03190.05860.0448303.4167202.487214.2298
650.04130.07330.0519446.3117263.443316.2309
660.04770.07650.0568504.2714311.608917.6524
670.05060.06990.059483.7081340.292118.447
680.05650.07560.0614568.9421372.956419.3121
690.06440.07650.0633539.2346393.741219.8429
700.07070.07210.0643466.0328401.773620.0443
710.0760.06670.0645396.9689401.293120.0323
720.07820.07240.0652500.9624410.35420.2572
730.08070.05930.0647352.8969405.565920.1387

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0169 & 0.0214 & 0 & 42.1184 & 0 & 0 \tabularnewline
63 & 0.0252 & 0.0544 & 0.0379 & 261.9264 & 152.0224 & 12.3297 \tabularnewline
64 & 0.0319 & 0.0586 & 0.0448 & 303.4167 & 202.4872 & 14.2298 \tabularnewline
65 & 0.0413 & 0.0733 & 0.0519 & 446.3117 & 263.4433 & 16.2309 \tabularnewline
66 & 0.0477 & 0.0765 & 0.0568 & 504.2714 & 311.6089 & 17.6524 \tabularnewline
67 & 0.0506 & 0.0699 & 0.059 & 483.7081 & 340.2921 & 18.447 \tabularnewline
68 & 0.0565 & 0.0756 & 0.0614 & 568.9421 & 372.9564 & 19.3121 \tabularnewline
69 & 0.0644 & 0.0765 & 0.0633 & 539.2346 & 393.7412 & 19.8429 \tabularnewline
70 & 0.0707 & 0.0721 & 0.0643 & 466.0328 & 401.7736 & 20.0443 \tabularnewline
71 & 0.076 & 0.0667 & 0.0645 & 396.9689 & 401.2931 & 20.0323 \tabularnewline
72 & 0.0782 & 0.0724 & 0.0652 & 500.9624 & 410.354 & 20.2572 \tabularnewline
73 & 0.0807 & 0.0593 & 0.0647 & 352.8969 & 405.5659 & 20.1387 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107328&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]62[/C][C]0.0169[/C][C]0.0214[/C][C]0[/C][C]42.1184[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0252[/C][C]0.0544[/C][C]0.0379[/C][C]261.9264[/C][C]152.0224[/C][C]12.3297[/C][/ROW]
[ROW][C]64[/C][C]0.0319[/C][C]0.0586[/C][C]0.0448[/C][C]303.4167[/C][C]202.4872[/C][C]14.2298[/C][/ROW]
[ROW][C]65[/C][C]0.0413[/C][C]0.0733[/C][C]0.0519[/C][C]446.3117[/C][C]263.4433[/C][C]16.2309[/C][/ROW]
[ROW][C]66[/C][C]0.0477[/C][C]0.0765[/C][C]0.0568[/C][C]504.2714[/C][C]311.6089[/C][C]17.6524[/C][/ROW]
[ROW][C]67[/C][C]0.0506[/C][C]0.0699[/C][C]0.059[/C][C]483.7081[/C][C]340.2921[/C][C]18.447[/C][/ROW]
[ROW][C]68[/C][C]0.0565[/C][C]0.0756[/C][C]0.0614[/C][C]568.9421[/C][C]372.9564[/C][C]19.3121[/C][/ROW]
[ROW][C]69[/C][C]0.0644[/C][C]0.0765[/C][C]0.0633[/C][C]539.2346[/C][C]393.7412[/C][C]19.8429[/C][/ROW]
[ROW][C]70[/C][C]0.0707[/C][C]0.0721[/C][C]0.0643[/C][C]466.0328[/C][C]401.7736[/C][C]20.0443[/C][/ROW]
[ROW][C]71[/C][C]0.076[/C][C]0.0667[/C][C]0.0645[/C][C]396.9689[/C][C]401.2931[/C][C]20.0323[/C][/ROW]
[ROW][C]72[/C][C]0.0782[/C][C]0.0724[/C][C]0.0652[/C][C]500.9624[/C][C]410.354[/C][C]20.2572[/C][/ROW]
[ROW][C]73[/C][C]0.0807[/C][C]0.0593[/C][C]0.0647[/C][C]352.8969[/C][C]405.5659[/C][C]20.1387[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107328&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107328&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
620.01690.0214042.118400
630.02520.05440.0379261.9264152.022412.3297
640.03190.05860.0448303.4167202.487214.2298
650.04130.07330.0519446.3117263.443316.2309
660.04770.07650.0568504.2714311.608917.6524
670.05060.06990.059483.7081340.292118.447
680.05650.07560.0614568.9421372.956419.3121
690.06440.07650.0633539.2346393.741219.8429
700.07070.07210.0643466.0328401.773620.0443
710.0760.06670.0645396.9689401.293120.0323
720.07820.07240.0652500.9624410.35420.2572
730.08070.05930.0647352.8969405.565920.1387



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