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, 22 Dec 2011 14:29:49 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/22/t1324582200c9sky92dt47kqso.htm/, Retrieved Fri, 03 May 2024 14:26:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159891, Retrieved Fri, 03 May 2024 14:26:27 +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] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMPD    [ARIMA Forecasting] [] [2011-12-22 19:29:49] [aedc5b8e4f26bdca34b1a0cf88d6dfa2] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.2613
1.2646
1.2262
1.1985
1.2007
1.2138
1.2266
1.2176
1.2218
1.249
1.2991
1.3408
1.3119
1.3014
1.3201
1.2938
1.2694
1.2165
1.2037
1.2292
1.2256
1.2015
1.1786
1.1856
1.2103
1.1938
1.202
1.2271
1.277
1.265
1.2684
1.2811
1.2727
1.2611
1.2881
1.3213
1.2999
1.3074
1.3242
1.3516
1.3511
1.3419
1.3716
1.3622
1.3896
1.4227
1.4684
1.457
1.4718
1.4748
1.5527
1.575
1.5557
1.5553
1.577
1.4975
1.437
1.3322
1.2732
1.3449
1.3239
1.2785
1.305
1.319
1.365
1.4016
1.4088
1.4268
1.4562
1.4816
1.4914
1.4614
1.4272
1.3686
1.3569
1.3406
1.2565
1.2208
1.277
1.2894
1.3067
1.3898
1.3661
1.322
1.336
1.3649
1.3999
1.4442
1.4349
1.4388
1.4264
1.4343
1.377
1.3706
1.3556




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159891&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159891&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159891&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 time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







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[83])
711.4914-------
721.4614-------
731.4272-------
741.3686-------
751.3569-------
761.3406-------
771.2565-------
781.2208-------
791.277-------
801.2894-------
811.3067-------
821.3898-------
831.3661-------
841.3221.36021.29561.43540.16010.43840.00420.4384
851.3361.35861.25941.48570.36360.71390.14510.4541
861.36491.35821.23371.53020.46970.60.45290.4642
871.39991.35811.21361.57070.350.47510.50450.4707
881.44421.35811.1971.60860.25030.37180.55440.475
891.43491.35811.18281.6450.29990.27810.75620.4782
901.43881.35811.17031.68030.31170.32020.79820.4806
911.42641.35811.1591.7150.35380.32880.67190.4825
921.43431.35811.14881.74950.35140.36620.63450.484
931.3771.35811.13951.7840.46530.36290.59350.4853
941.37061.35811.13081.81870.47880.46790.44630.4864
951.35561.35811.12271.85360.49610.48030.48740.4874

\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[83]) \tabularnewline
71 & 1.4914 & - & - & - & - & - & - & - \tabularnewline
72 & 1.4614 & - & - & - & - & - & - & - \tabularnewline
73 & 1.4272 & - & - & - & - & - & - & - \tabularnewline
74 & 1.3686 & - & - & - & - & - & - & - \tabularnewline
75 & 1.3569 & - & - & - & - & - & - & - \tabularnewline
76 & 1.3406 & - & - & - & - & - & - & - \tabularnewline
77 & 1.2565 & - & - & - & - & - & - & - \tabularnewline
78 & 1.2208 & - & - & - & - & - & - & - \tabularnewline
79 & 1.277 & - & - & - & - & - & - & - \tabularnewline
80 & 1.2894 & - & - & - & - & - & - & - \tabularnewline
81 & 1.3067 & - & - & - & - & - & - & - \tabularnewline
82 & 1.3898 & - & - & - & - & - & - & - \tabularnewline
83 & 1.3661 & - & - & - & - & - & - & - \tabularnewline
84 & 1.322 & 1.3602 & 1.2956 & 1.4354 & 0.1601 & 0.4384 & 0.0042 & 0.4384 \tabularnewline
85 & 1.336 & 1.3586 & 1.2594 & 1.4857 & 0.3636 & 0.7139 & 0.1451 & 0.4541 \tabularnewline
86 & 1.3649 & 1.3582 & 1.2337 & 1.5302 & 0.4697 & 0.6 & 0.4529 & 0.4642 \tabularnewline
87 & 1.3999 & 1.3581 & 1.2136 & 1.5707 & 0.35 & 0.4751 & 0.5045 & 0.4707 \tabularnewline
88 & 1.4442 & 1.3581 & 1.197 & 1.6086 & 0.2503 & 0.3718 & 0.5544 & 0.475 \tabularnewline
89 & 1.4349 & 1.3581 & 1.1828 & 1.645 & 0.2999 & 0.2781 & 0.7562 & 0.4782 \tabularnewline
90 & 1.4388 & 1.3581 & 1.1703 & 1.6803 & 0.3117 & 0.3202 & 0.7982 & 0.4806 \tabularnewline
91 & 1.4264 & 1.3581 & 1.159 & 1.715 & 0.3538 & 0.3288 & 0.6719 & 0.4825 \tabularnewline
92 & 1.4343 & 1.3581 & 1.1488 & 1.7495 & 0.3514 & 0.3662 & 0.6345 & 0.484 \tabularnewline
93 & 1.377 & 1.3581 & 1.1395 & 1.784 & 0.4653 & 0.3629 & 0.5935 & 0.4853 \tabularnewline
94 & 1.3706 & 1.3581 & 1.1308 & 1.8187 & 0.4788 & 0.4679 & 0.4463 & 0.4864 \tabularnewline
95 & 1.3556 & 1.3581 & 1.1227 & 1.8536 & 0.4961 & 0.4803 & 0.4874 & 0.4874 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159891&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[83])[/C][/ROW]
[ROW][C]71[/C][C]1.4914[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]1.4614[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]1.4272[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1.3686[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1.3569[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1.3406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]1.2565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]1.2208[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]1.277[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]1.2894[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]1.3067[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]1.3898[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]1.3661[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]1.322[/C][C]1.3602[/C][C]1.2956[/C][C]1.4354[/C][C]0.1601[/C][C]0.4384[/C][C]0.0042[/C][C]0.4384[/C][/ROW]
[ROW][C]85[/C][C]1.336[/C][C]1.3586[/C][C]1.2594[/C][C]1.4857[/C][C]0.3636[/C][C]0.7139[/C][C]0.1451[/C][C]0.4541[/C][/ROW]
[ROW][C]86[/C][C]1.3649[/C][C]1.3582[/C][C]1.2337[/C][C]1.5302[/C][C]0.4697[/C][C]0.6[/C][C]0.4529[/C][C]0.4642[/C][/ROW]
[ROW][C]87[/C][C]1.3999[/C][C]1.3581[/C][C]1.2136[/C][C]1.5707[/C][C]0.35[/C][C]0.4751[/C][C]0.5045[/C][C]0.4707[/C][/ROW]
[ROW][C]88[/C][C]1.4442[/C][C]1.3581[/C][C]1.197[/C][C]1.6086[/C][C]0.2503[/C][C]0.3718[/C][C]0.5544[/C][C]0.475[/C][/ROW]
[ROW][C]89[/C][C]1.4349[/C][C]1.3581[/C][C]1.1828[/C][C]1.645[/C][C]0.2999[/C][C]0.2781[/C][C]0.7562[/C][C]0.4782[/C][/ROW]
[ROW][C]90[/C][C]1.4388[/C][C]1.3581[/C][C]1.1703[/C][C]1.6803[/C][C]0.3117[/C][C]0.3202[/C][C]0.7982[/C][C]0.4806[/C][/ROW]
[ROW][C]91[/C][C]1.4264[/C][C]1.3581[/C][C]1.159[/C][C]1.715[/C][C]0.3538[/C][C]0.3288[/C][C]0.6719[/C][C]0.4825[/C][/ROW]
[ROW][C]92[/C][C]1.4343[/C][C]1.3581[/C][C]1.1488[/C][C]1.7495[/C][C]0.3514[/C][C]0.3662[/C][C]0.6345[/C][C]0.484[/C][/ROW]
[ROW][C]93[/C][C]1.377[/C][C]1.3581[/C][C]1.1395[/C][C]1.784[/C][C]0.4653[/C][C]0.3629[/C][C]0.5935[/C][C]0.4853[/C][/ROW]
[ROW][C]94[/C][C]1.3706[/C][C]1.3581[/C][C]1.1308[/C][C]1.8187[/C][C]0.4788[/C][C]0.4679[/C][C]0.4463[/C][C]0.4864[/C][/ROW]
[ROW][C]95[/C][C]1.3556[/C][C]1.3581[/C][C]1.1227[/C][C]1.8536[/C][C]0.4961[/C][C]0.4803[/C][C]0.4874[/C][C]0.4874[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159891&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159891&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[83])
711.4914-------
721.4614-------
731.4272-------
741.3686-------
751.3569-------
761.3406-------
771.2565-------
781.2208-------
791.277-------
801.2894-------
811.3067-------
821.3898-------
831.3661-------
841.3221.36021.29561.43540.16010.43840.00420.4384
851.3361.35861.25941.48570.36360.71390.14510.4541
861.36491.35821.23371.53020.46970.60.45290.4642
871.39991.35811.21361.57070.350.47510.50450.4707
881.44421.35811.1971.60860.25030.37180.55440.475
891.43491.35811.18281.6450.29990.27810.75620.4782
901.43881.35811.17031.68030.31170.32020.79820.4806
911.42641.35811.1591.7150.35380.32880.67190.4825
921.43431.35811.14881.74950.35140.36620.63450.484
931.3771.35811.13951.7840.46530.36290.59350.4853
941.37061.35811.13081.81870.47880.46790.44630.4864
951.35561.35811.12271.85360.49610.48030.48740.4874







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
840.0282-0.02800.001500
850.0477-0.01670.02235e-040.0010.0314
860.06460.00490.016507e-040.0259
870.07990.03080.02010.00179e-040.0306
880.09410.06340.02880.00740.00220.0473
890.10780.05660.03340.00590.00280.0533
900.1210.05940.03710.00650.00340.058
910.13410.05030.03880.00470.00350.0594
920.14710.05610.04070.00580.00380.0615
930.160.01390.0384e-040.00340.0587
940.1730.00920.03542e-040.00310.0561
950.1862-0.00180.032600.00290.0537

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
84 & 0.0282 & -0.028 & 0 & 0.0015 & 0 & 0 \tabularnewline
85 & 0.0477 & -0.0167 & 0.0223 & 5e-04 & 0.001 & 0.0314 \tabularnewline
86 & 0.0646 & 0.0049 & 0.0165 & 0 & 7e-04 & 0.0259 \tabularnewline
87 & 0.0799 & 0.0308 & 0.0201 & 0.0017 & 9e-04 & 0.0306 \tabularnewline
88 & 0.0941 & 0.0634 & 0.0288 & 0.0074 & 0.0022 & 0.0473 \tabularnewline
89 & 0.1078 & 0.0566 & 0.0334 & 0.0059 & 0.0028 & 0.0533 \tabularnewline
90 & 0.121 & 0.0594 & 0.0371 & 0.0065 & 0.0034 & 0.058 \tabularnewline
91 & 0.1341 & 0.0503 & 0.0388 & 0.0047 & 0.0035 & 0.0594 \tabularnewline
92 & 0.1471 & 0.0561 & 0.0407 & 0.0058 & 0.0038 & 0.0615 \tabularnewline
93 & 0.16 & 0.0139 & 0.038 & 4e-04 & 0.0034 & 0.0587 \tabularnewline
94 & 0.173 & 0.0092 & 0.0354 & 2e-04 & 0.0031 & 0.0561 \tabularnewline
95 & 0.1862 & -0.0018 & 0.0326 & 0 & 0.0029 & 0.0537 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159891&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]84[/C][C]0.0282[/C][C]-0.028[/C][C]0[/C][C]0.0015[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]85[/C][C]0.0477[/C][C]-0.0167[/C][C]0.0223[/C][C]5e-04[/C][C]0.001[/C][C]0.0314[/C][/ROW]
[ROW][C]86[/C][C]0.0646[/C][C]0.0049[/C][C]0.0165[/C][C]0[/C][C]7e-04[/C][C]0.0259[/C][/ROW]
[ROW][C]87[/C][C]0.0799[/C][C]0.0308[/C][C]0.0201[/C][C]0.0017[/C][C]9e-04[/C][C]0.0306[/C][/ROW]
[ROW][C]88[/C][C]0.0941[/C][C]0.0634[/C][C]0.0288[/C][C]0.0074[/C][C]0.0022[/C][C]0.0473[/C][/ROW]
[ROW][C]89[/C][C]0.1078[/C][C]0.0566[/C][C]0.0334[/C][C]0.0059[/C][C]0.0028[/C][C]0.0533[/C][/ROW]
[ROW][C]90[/C][C]0.121[/C][C]0.0594[/C][C]0.0371[/C][C]0.0065[/C][C]0.0034[/C][C]0.058[/C][/ROW]
[ROW][C]91[/C][C]0.1341[/C][C]0.0503[/C][C]0.0388[/C][C]0.0047[/C][C]0.0035[/C][C]0.0594[/C][/ROW]
[ROW][C]92[/C][C]0.1471[/C][C]0.0561[/C][C]0.0407[/C][C]0.0058[/C][C]0.0038[/C][C]0.0615[/C][/ROW]
[ROW][C]93[/C][C]0.16[/C][C]0.0139[/C][C]0.038[/C][C]4e-04[/C][C]0.0034[/C][C]0.0587[/C][/ROW]
[ROW][C]94[/C][C]0.173[/C][C]0.0092[/C][C]0.0354[/C][C]2e-04[/C][C]0.0031[/C][C]0.0561[/C][/ROW]
[ROW][C]95[/C][C]0.1862[/C][C]-0.0018[/C][C]0.0326[/C][C]0[/C][C]0.0029[/C][C]0.0537[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159891&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159891&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
840.0282-0.02800.001500
850.0477-0.01670.02235e-040.0010.0314
860.06460.00490.016507e-040.0259
870.07990.03080.02010.00179e-040.0306
880.09410.06340.02880.00740.00220.0473
890.10780.05660.03340.00590.00280.0533
900.1210.05940.03710.00650.00340.058
910.13410.05030.03880.00470.00350.0594
920.14710.05610.04070.00580.00380.0615
930.160.01390.0384e-040.00340.0587
940.1730.00920.03542e-040.00310.0561
950.1862-0.00180.032600.00290.0537



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