Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 06:35:50 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/08/t1197120356wbs10daf4bnud50.htm/, Retrieved Mon, 29 Apr 2024 00:51:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2921, Retrieved Mon, 29 Apr 2024 00:51:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact230
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Totale werklooshe...] [2007-12-08 13:35:50] [52c41ae5b11545a88aa57081ae5e5ffc] [Current]
Feedback Forum

Post a new message
Dataseries X:
7,4
7,2
7
6,6
6,4
6,4
6,8
7,3
7
7
6,7
6,7
6,3
6,2
6
6,3
6,2
6,1
6,2
6,6
6,6
7,8
7,4
7,4
7,5
7,4
7,4
7
6,9
6,9
7,6
7,7
7,6
8,2
8
8,1
8,3
8,2
8,1
7,7
7,6
7,7
8,2
8,4
8,4
8,6
8,4
8,5
8,7
8,7
8,6
7,4
7,3
7,4
9
9,2
9,2
8,5
8,3
8,3
8,6
8,6
8,5
8,1
8,1
8
8,6
8,7
8,7
8,6
8,4
8,4
8,7
8,7
8,5
8,3
8,3
8,3
8,1
8,2
8,1
8,1
7,9
7,7
8,1
8
7,7
7,8
7,6
7,4
7,7
7,9
7,6




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2921&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2921&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2921&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[81])
698.7-------
708.6-------
718.4-------
728.4-------
738.7-------
748.7-------
758.5-------
768.3-------
778.3-------
788.3-------
798.1-------
808.2-------
818.1-------
828.18.15387.61178.73460.42790.57210.06610.5721
837.98.04237.28688.8760.3690.4460.20020.446
847.78.0667.13969.11250.24650.6220.26580.4746
858.18.02987.05519.13910.45060.71990.11820.4506
8688.03627.01519.2060.47580.45750.1330.4575
877.77.90786.86239.11270.36760.44040.16770.3773
887.88.0756.9429.39280.34130.71150.36890.4852
897.68.09566.89659.50320.2450.65970.3880.4976
907.48.07136.81549.55860.18820.73270.38160.4849
917.77.77366.51859.27030.46160.68770.33450.3345
927.97.83386.5269.40370.46710.56630.32380.3698
937.67.82576.47869.45290.39290.46430.37050.3705

\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[81]) \tabularnewline
69 & 8.7 & - & - & - & - & - & - & - \tabularnewline
70 & 8.6 & - & - & - & - & - & - & - \tabularnewline
71 & 8.4 & - & - & - & - & - & - & - \tabularnewline
72 & 8.4 & - & - & - & - & - & - & - \tabularnewline
73 & 8.7 & - & - & - & - & - & - & - \tabularnewline
74 & 8.7 & - & - & - & - & - & - & - \tabularnewline
75 & 8.5 & - & - & - & - & - & - & - \tabularnewline
76 & 8.3 & - & - & - & - & - & - & - \tabularnewline
77 & 8.3 & - & - & - & - & - & - & - \tabularnewline
78 & 8.3 & - & - & - & - & - & - & - \tabularnewline
79 & 8.1 & - & - & - & - & - & - & - \tabularnewline
80 & 8.2 & - & - & - & - & - & - & - \tabularnewline
81 & 8.1 & - & - & - & - & - & - & - \tabularnewline
82 & 8.1 & 8.1538 & 7.6117 & 8.7346 & 0.4279 & 0.5721 & 0.0661 & 0.5721 \tabularnewline
83 & 7.9 & 8.0423 & 7.2868 & 8.876 & 0.369 & 0.446 & 0.2002 & 0.446 \tabularnewline
84 & 7.7 & 8.066 & 7.1396 & 9.1125 & 0.2465 & 0.622 & 0.2658 & 0.4746 \tabularnewline
85 & 8.1 & 8.0298 & 7.0551 & 9.1391 & 0.4506 & 0.7199 & 0.1182 & 0.4506 \tabularnewline
86 & 8 & 8.0362 & 7.0151 & 9.206 & 0.4758 & 0.4575 & 0.133 & 0.4575 \tabularnewline
87 & 7.7 & 7.9078 & 6.8623 & 9.1127 & 0.3676 & 0.4404 & 0.1677 & 0.3773 \tabularnewline
88 & 7.8 & 8.075 & 6.942 & 9.3928 & 0.3413 & 0.7115 & 0.3689 & 0.4852 \tabularnewline
89 & 7.6 & 8.0956 & 6.8965 & 9.5032 & 0.245 & 0.6597 & 0.388 & 0.4976 \tabularnewline
90 & 7.4 & 8.0713 & 6.8154 & 9.5586 & 0.1882 & 0.7327 & 0.3816 & 0.4849 \tabularnewline
91 & 7.7 & 7.7736 & 6.5185 & 9.2703 & 0.4616 & 0.6877 & 0.3345 & 0.3345 \tabularnewline
92 & 7.9 & 7.8338 & 6.526 & 9.4037 & 0.4671 & 0.5663 & 0.3238 & 0.3698 \tabularnewline
93 & 7.6 & 7.8257 & 6.4786 & 9.4529 & 0.3929 & 0.4643 & 0.3705 & 0.3705 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2921&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[81])[/C][/ROW]
[ROW][C]69[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]8.1[/C][C]8.1538[/C][C]7.6117[/C][C]8.7346[/C][C]0.4279[/C][C]0.5721[/C][C]0.0661[/C][C]0.5721[/C][/ROW]
[ROW][C]83[/C][C]7.9[/C][C]8.0423[/C][C]7.2868[/C][C]8.876[/C][C]0.369[/C][C]0.446[/C][C]0.2002[/C][C]0.446[/C][/ROW]
[ROW][C]84[/C][C]7.7[/C][C]8.066[/C][C]7.1396[/C][C]9.1125[/C][C]0.2465[/C][C]0.622[/C][C]0.2658[/C][C]0.4746[/C][/ROW]
[ROW][C]85[/C][C]8.1[/C][C]8.0298[/C][C]7.0551[/C][C]9.1391[/C][C]0.4506[/C][C]0.7199[/C][C]0.1182[/C][C]0.4506[/C][/ROW]
[ROW][C]86[/C][C]8[/C][C]8.0362[/C][C]7.0151[/C][C]9.206[/C][C]0.4758[/C][C]0.4575[/C][C]0.133[/C][C]0.4575[/C][/ROW]
[ROW][C]87[/C][C]7.7[/C][C]7.9078[/C][C]6.8623[/C][C]9.1127[/C][C]0.3676[/C][C]0.4404[/C][C]0.1677[/C][C]0.3773[/C][/ROW]
[ROW][C]88[/C][C]7.8[/C][C]8.075[/C][C]6.942[/C][C]9.3928[/C][C]0.3413[/C][C]0.7115[/C][C]0.3689[/C][C]0.4852[/C][/ROW]
[ROW][C]89[/C][C]7.6[/C][C]8.0956[/C][C]6.8965[/C][C]9.5032[/C][C]0.245[/C][C]0.6597[/C][C]0.388[/C][C]0.4976[/C][/ROW]
[ROW][C]90[/C][C]7.4[/C][C]8.0713[/C][C]6.8154[/C][C]9.5586[/C][C]0.1882[/C][C]0.7327[/C][C]0.3816[/C][C]0.4849[/C][/ROW]
[ROW][C]91[/C][C]7.7[/C][C]7.7736[/C][C]6.5185[/C][C]9.2703[/C][C]0.4616[/C][C]0.6877[/C][C]0.3345[/C][C]0.3345[/C][/ROW]
[ROW][C]92[/C][C]7.9[/C][C]7.8338[/C][C]6.526[/C][C]9.4037[/C][C]0.4671[/C][C]0.5663[/C][C]0.3238[/C][C]0.3698[/C][/ROW]
[ROW][C]93[/C][C]7.6[/C][C]7.8257[/C][C]6.4786[/C][C]9.4529[/C][C]0.3929[/C][C]0.4643[/C][C]0.3705[/C][C]0.3705[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2921&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2921&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[81])
698.7-------
708.6-------
718.4-------
728.4-------
738.7-------
748.7-------
758.5-------
768.3-------
778.3-------
788.3-------
798.1-------
808.2-------
818.1-------
828.18.15387.61178.73460.42790.57210.06610.5721
837.98.04237.28688.8760.3690.4460.20020.446
847.78.0667.13969.11250.24650.6220.26580.4746
858.18.02987.05519.13910.45060.71990.11820.4506
8688.03627.01519.2060.47580.45750.1330.4575
877.77.90786.86239.11270.36760.44040.16770.3773
887.88.0756.9429.39280.34130.71150.36890.4852
897.68.09566.89659.50320.2450.65970.3880.4976
907.48.07136.81549.55860.18820.73270.38160.4849
917.77.77366.51859.27030.46160.68770.33450.3345
927.97.83386.5269.40370.46710.56630.32380.3698
937.67.82576.47869.45290.39290.46430.37050.3705







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
820.0363-0.00665e-040.00292e-040.0155
830.0529-0.01770.00150.02020.00170.0411
840.0662-0.04540.00380.13390.01120.1056
850.07050.00877e-040.00494e-040.0203
860.0743-0.00454e-040.00131e-040.0105
870.0777-0.02630.00220.04320.00360.06
880.0833-0.03410.00280.07560.00630.0794
890.0887-0.06120.00510.24570.02050.1431
900.094-0.08320.00690.45060.03760.1938
910.0982-0.00958e-040.00545e-040.0212
920.10220.00857e-040.00444e-040.0191
930.1061-0.02880.00240.05090.00420.0651

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
82 & 0.0363 & -0.0066 & 5e-04 & 0.0029 & 2e-04 & 0.0155 \tabularnewline
83 & 0.0529 & -0.0177 & 0.0015 & 0.0202 & 0.0017 & 0.0411 \tabularnewline
84 & 0.0662 & -0.0454 & 0.0038 & 0.1339 & 0.0112 & 0.1056 \tabularnewline
85 & 0.0705 & 0.0087 & 7e-04 & 0.0049 & 4e-04 & 0.0203 \tabularnewline
86 & 0.0743 & -0.0045 & 4e-04 & 0.0013 & 1e-04 & 0.0105 \tabularnewline
87 & 0.0777 & -0.0263 & 0.0022 & 0.0432 & 0.0036 & 0.06 \tabularnewline
88 & 0.0833 & -0.0341 & 0.0028 & 0.0756 & 0.0063 & 0.0794 \tabularnewline
89 & 0.0887 & -0.0612 & 0.0051 & 0.2457 & 0.0205 & 0.1431 \tabularnewline
90 & 0.094 & -0.0832 & 0.0069 & 0.4506 & 0.0376 & 0.1938 \tabularnewline
91 & 0.0982 & -0.0095 & 8e-04 & 0.0054 & 5e-04 & 0.0212 \tabularnewline
92 & 0.1022 & 0.0085 & 7e-04 & 0.0044 & 4e-04 & 0.0191 \tabularnewline
93 & 0.1061 & -0.0288 & 0.0024 & 0.0509 & 0.0042 & 0.0651 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2921&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]82[/C][C]0.0363[/C][C]-0.0066[/C][C]5e-04[/C][C]0.0029[/C][C]2e-04[/C][C]0.0155[/C][/ROW]
[ROW][C]83[/C][C]0.0529[/C][C]-0.0177[/C][C]0.0015[/C][C]0.0202[/C][C]0.0017[/C][C]0.0411[/C][/ROW]
[ROW][C]84[/C][C]0.0662[/C][C]-0.0454[/C][C]0.0038[/C][C]0.1339[/C][C]0.0112[/C][C]0.1056[/C][/ROW]
[ROW][C]85[/C][C]0.0705[/C][C]0.0087[/C][C]7e-04[/C][C]0.0049[/C][C]4e-04[/C][C]0.0203[/C][/ROW]
[ROW][C]86[/C][C]0.0743[/C][C]-0.0045[/C][C]4e-04[/C][C]0.0013[/C][C]1e-04[/C][C]0.0105[/C][/ROW]
[ROW][C]87[/C][C]0.0777[/C][C]-0.0263[/C][C]0.0022[/C][C]0.0432[/C][C]0.0036[/C][C]0.06[/C][/ROW]
[ROW][C]88[/C][C]0.0833[/C][C]-0.0341[/C][C]0.0028[/C][C]0.0756[/C][C]0.0063[/C][C]0.0794[/C][/ROW]
[ROW][C]89[/C][C]0.0887[/C][C]-0.0612[/C][C]0.0051[/C][C]0.2457[/C][C]0.0205[/C][C]0.1431[/C][/ROW]
[ROW][C]90[/C][C]0.094[/C][C]-0.0832[/C][C]0.0069[/C][C]0.4506[/C][C]0.0376[/C][C]0.1938[/C][/ROW]
[ROW][C]91[/C][C]0.0982[/C][C]-0.0095[/C][C]8e-04[/C][C]0.0054[/C][C]5e-04[/C][C]0.0212[/C][/ROW]
[ROW][C]92[/C][C]0.1022[/C][C]0.0085[/C][C]7e-04[/C][C]0.0044[/C][C]4e-04[/C][C]0.0191[/C][/ROW]
[ROW][C]93[/C][C]0.1061[/C][C]-0.0288[/C][C]0.0024[/C][C]0.0509[/C][C]0.0042[/C][C]0.0651[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2921&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2921&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
820.0363-0.00665e-040.00292e-040.0155
830.0529-0.01770.00150.02020.00170.0411
840.0662-0.04540.00380.13390.01120.1056
850.07050.00877e-040.00494e-040.0203
860.0743-0.00454e-040.00131e-040.0105
870.0777-0.02630.00220.04320.00360.06
880.0833-0.03410.00280.07560.00630.0794
890.0887-0.06120.00510.24570.02050.1431
900.094-0.08320.00690.45060.03760.1938
910.0982-0.00958e-040.00545e-040.0212
920.10220.00857e-040.00444e-040.0191
930.1061-0.02880.00240.05090.00420.0651



Parameters (Session):
par1 = 12 ; par2 = 0.0 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; 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,fx))
(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)
}
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')