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, 17 Dec 2009 03:50:24 -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/2009/Dec/17/t12610470656570ii3in81gsti.htm/, Retrieved Tue, 30 Apr 2024 04:59:57 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68713, Retrieved Tue, 30 Apr 2024 04:59:57 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
F   PD  [ARIMA Forecasting] [Arima Forecast] [2009-12-11 17:36:19] [4395c69e961f9a13a0559fd2f0a72538]
- R P       [ARIMA Forecasting] [WS 10 2] [2009-12-17 10:50:24] [eba9f01697e64705b70041e6f338cb22] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.3
7.6
7.5
7.6
7.9
7.9
8.1
8.2
8
7.5
6.8
6.5
6.6
7.6
8
8.1
7.7
7.5
7.6
7.8
7.8
7.8
7.5
7.5
7.1
7.5
7.5
7.6
7.7
7.7
7.9
8.1
8.2
8.2
8.2
7.9
7.3
6.9
6.6
6.7
6.9
7
7.1
7.2
7.1
6.9
7
6.8
6.4
6.7
6.6
6.4
6.3
6.2
6.5
6.8
6.8
6.4
6.1
5.8
6.1
7.2
7.3
6.9
6.1
5.8
6.2
7.1
7.7
7.9
7.7
7.4
7.5




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

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68713&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68713&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68713&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'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[61])
496.4-------
506.7-------
516.6-------
526.4-------
536.3-------
546.2-------
556.5-------
566.8-------
576.8-------
586.4-------
596.1-------
605.8-------
616.1-------
627.26.36425.91576.81261e-040.87590.07110.8759
637.36.57925.84747.31090.02680.04820.47770.9003
646.96.58335.61117.55560.26160.07430.64420.8351
656.16.46485.38077.54880.25480.21570.61710.7452
665.86.36355.24667.48040.16140.67810.61290.6781
676.26.34195.21287.4710.40270.82660.39190.6627
687.16.37625.23217.52030.10750.61860.23390.682
697.76.41485.24337.58630.01580.12580.25960.7008
707.96.4285.227.6360.00850.01950.51810.7027
717.76.41885.17537.66220.02170.00980.69230.6923
727.46.40455.13167.67740.06270.0230.8240.6804
737.56.39785.09987.69590.0480.06510.67350.6735

\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 & 6.4 & - & - & - & - & - & - & - \tabularnewline
50 & 6.7 & - & - & - & - & - & - & - \tabularnewline
51 & 6.6 & - & - & - & - & - & - & - \tabularnewline
52 & 6.4 & - & - & - & - & - & - & - \tabularnewline
53 & 6.3 & - & - & - & - & - & - & - \tabularnewline
54 & 6.2 & - & - & - & - & - & - & - \tabularnewline
55 & 6.5 & - & - & - & - & - & - & - \tabularnewline
56 & 6.8 & - & - & - & - & - & - & - \tabularnewline
57 & 6.8 & - & - & - & - & - & - & - \tabularnewline
58 & 6.4 & - & - & - & - & - & - & - \tabularnewline
59 & 6.1 & - & - & - & - & - & - & - \tabularnewline
60 & 5.8 & - & - & - & - & - & - & - \tabularnewline
61 & 6.1 & - & - & - & - & - & - & - \tabularnewline
62 & 7.2 & 6.3642 & 5.9157 & 6.8126 & 1e-04 & 0.8759 & 0.0711 & 0.8759 \tabularnewline
63 & 7.3 & 6.5792 & 5.8474 & 7.3109 & 0.0268 & 0.0482 & 0.4777 & 0.9003 \tabularnewline
64 & 6.9 & 6.5833 & 5.6111 & 7.5556 & 0.2616 & 0.0743 & 0.6442 & 0.8351 \tabularnewline
65 & 6.1 & 6.4648 & 5.3807 & 7.5488 & 0.2548 & 0.2157 & 0.6171 & 0.7452 \tabularnewline
66 & 5.8 & 6.3635 & 5.2466 & 7.4804 & 0.1614 & 0.6781 & 0.6129 & 0.6781 \tabularnewline
67 & 6.2 & 6.3419 & 5.2128 & 7.471 & 0.4027 & 0.8266 & 0.3919 & 0.6627 \tabularnewline
68 & 7.1 & 6.3762 & 5.2321 & 7.5203 & 0.1075 & 0.6186 & 0.2339 & 0.682 \tabularnewline
69 & 7.7 & 6.4148 & 5.2433 & 7.5863 & 0.0158 & 0.1258 & 0.2596 & 0.7008 \tabularnewline
70 & 7.9 & 6.428 & 5.22 & 7.636 & 0.0085 & 0.0195 & 0.5181 & 0.7027 \tabularnewline
71 & 7.7 & 6.4188 & 5.1753 & 7.6622 & 0.0217 & 0.0098 & 0.6923 & 0.6923 \tabularnewline
72 & 7.4 & 6.4045 & 5.1316 & 7.6774 & 0.0627 & 0.023 & 0.824 & 0.6804 \tabularnewline
73 & 7.5 & 6.3978 & 5.0998 & 7.6959 & 0.048 & 0.0651 & 0.6735 & 0.6735 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68713&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]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]6.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]6.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]6.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]5.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]6.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]7.2[/C][C]6.3642[/C][C]5.9157[/C][C]6.8126[/C][C]1e-04[/C][C]0.8759[/C][C]0.0711[/C][C]0.8759[/C][/ROW]
[ROW][C]63[/C][C]7.3[/C][C]6.5792[/C][C]5.8474[/C][C]7.3109[/C][C]0.0268[/C][C]0.0482[/C][C]0.4777[/C][C]0.9003[/C][/ROW]
[ROW][C]64[/C][C]6.9[/C][C]6.5833[/C][C]5.6111[/C][C]7.5556[/C][C]0.2616[/C][C]0.0743[/C][C]0.6442[/C][C]0.8351[/C][/ROW]
[ROW][C]65[/C][C]6.1[/C][C]6.4648[/C][C]5.3807[/C][C]7.5488[/C][C]0.2548[/C][C]0.2157[/C][C]0.6171[/C][C]0.7452[/C][/ROW]
[ROW][C]66[/C][C]5.8[/C][C]6.3635[/C][C]5.2466[/C][C]7.4804[/C][C]0.1614[/C][C]0.6781[/C][C]0.6129[/C][C]0.6781[/C][/ROW]
[ROW][C]67[/C][C]6.2[/C][C]6.3419[/C][C]5.2128[/C][C]7.471[/C][C]0.4027[/C][C]0.8266[/C][C]0.3919[/C][C]0.6627[/C][/ROW]
[ROW][C]68[/C][C]7.1[/C][C]6.3762[/C][C]5.2321[/C][C]7.5203[/C][C]0.1075[/C][C]0.6186[/C][C]0.2339[/C][C]0.682[/C][/ROW]
[ROW][C]69[/C][C]7.7[/C][C]6.4148[/C][C]5.2433[/C][C]7.5863[/C][C]0.0158[/C][C]0.1258[/C][C]0.2596[/C][C]0.7008[/C][/ROW]
[ROW][C]70[/C][C]7.9[/C][C]6.428[/C][C]5.22[/C][C]7.636[/C][C]0.0085[/C][C]0.0195[/C][C]0.5181[/C][C]0.7027[/C][/ROW]
[ROW][C]71[/C][C]7.7[/C][C]6.4188[/C][C]5.1753[/C][C]7.6622[/C][C]0.0217[/C][C]0.0098[/C][C]0.6923[/C][C]0.6923[/C][/ROW]
[ROW][C]72[/C][C]7.4[/C][C]6.4045[/C][C]5.1316[/C][C]7.6774[/C][C]0.0627[/C][C]0.023[/C][C]0.824[/C][C]0.6804[/C][/ROW]
[ROW][C]73[/C][C]7.5[/C][C]6.3978[/C][C]5.0998[/C][C]7.6959[/C][C]0.048[/C][C]0.0651[/C][C]0.6735[/C][C]0.6735[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68713&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68713&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])
496.4-------
506.7-------
516.6-------
526.4-------
536.3-------
546.2-------
556.5-------
566.8-------
576.8-------
586.4-------
596.1-------
605.8-------
616.1-------
627.26.36425.91576.81261e-040.87590.07110.8759
637.36.57925.84747.31090.02680.04820.47770.9003
646.96.58335.61117.55560.26160.07430.64420.8351
656.16.46485.38077.54880.25480.21570.61710.7452
665.86.36355.24667.48040.16140.67810.61290.6781
676.26.34195.21287.4710.40270.82660.39190.6627
687.16.37625.23217.52030.10750.61860.23390.682
697.76.41485.24337.58630.01580.12580.25960.7008
707.96.4285.227.6360.00850.01950.51810.7027
717.76.41885.17537.66220.02170.00980.69230.6923
727.46.40455.13167.67740.06270.0230.8240.6804
737.56.39785.09987.69590.0480.06510.67350.6735







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.0360.131300.698600
630.05670.10960.12040.51960.60910.7805
640.07540.04810.09630.10030.43950.6629
650.0856-0.05640.08640.13310.36290.6024
660.0895-0.08860.08680.31750.35380.5948
670.0908-0.02240.07610.02010.29820.5461
680.09150.11350.08140.52380.33040.5748
690.09320.20040.09631.65180.49560.704
700.09590.2290.1112.16670.68130.8254
710.09880.19960.11991.64150.77730.8816
720.10140.15540.12310.9910.79670.8926
730.10350.17230.12721.21470.83160.9119

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.036 & 0.1313 & 0 & 0.6986 & 0 & 0 \tabularnewline
63 & 0.0567 & 0.1096 & 0.1204 & 0.5196 & 0.6091 & 0.7805 \tabularnewline
64 & 0.0754 & 0.0481 & 0.0963 & 0.1003 & 0.4395 & 0.6629 \tabularnewline
65 & 0.0856 & -0.0564 & 0.0864 & 0.1331 & 0.3629 & 0.6024 \tabularnewline
66 & 0.0895 & -0.0886 & 0.0868 & 0.3175 & 0.3538 & 0.5948 \tabularnewline
67 & 0.0908 & -0.0224 & 0.0761 & 0.0201 & 0.2982 & 0.5461 \tabularnewline
68 & 0.0915 & 0.1135 & 0.0814 & 0.5238 & 0.3304 & 0.5748 \tabularnewline
69 & 0.0932 & 0.2004 & 0.0963 & 1.6518 & 0.4956 & 0.704 \tabularnewline
70 & 0.0959 & 0.229 & 0.111 & 2.1667 & 0.6813 & 0.8254 \tabularnewline
71 & 0.0988 & 0.1996 & 0.1199 & 1.6415 & 0.7773 & 0.8816 \tabularnewline
72 & 0.1014 & 0.1554 & 0.1231 & 0.991 & 0.7967 & 0.8926 \tabularnewline
73 & 0.1035 & 0.1723 & 0.1272 & 1.2147 & 0.8316 & 0.9119 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68713&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.036[/C][C]0.1313[/C][C]0[/C][C]0.6986[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0567[/C][C]0.1096[/C][C]0.1204[/C][C]0.5196[/C][C]0.6091[/C][C]0.7805[/C][/ROW]
[ROW][C]64[/C][C]0.0754[/C][C]0.0481[/C][C]0.0963[/C][C]0.1003[/C][C]0.4395[/C][C]0.6629[/C][/ROW]
[ROW][C]65[/C][C]0.0856[/C][C]-0.0564[/C][C]0.0864[/C][C]0.1331[/C][C]0.3629[/C][C]0.6024[/C][/ROW]
[ROW][C]66[/C][C]0.0895[/C][C]-0.0886[/C][C]0.0868[/C][C]0.3175[/C][C]0.3538[/C][C]0.5948[/C][/ROW]
[ROW][C]67[/C][C]0.0908[/C][C]-0.0224[/C][C]0.0761[/C][C]0.0201[/C][C]0.2982[/C][C]0.5461[/C][/ROW]
[ROW][C]68[/C][C]0.0915[/C][C]0.1135[/C][C]0.0814[/C][C]0.5238[/C][C]0.3304[/C][C]0.5748[/C][/ROW]
[ROW][C]69[/C][C]0.0932[/C][C]0.2004[/C][C]0.0963[/C][C]1.6518[/C][C]0.4956[/C][C]0.704[/C][/ROW]
[ROW][C]70[/C][C]0.0959[/C][C]0.229[/C][C]0.111[/C][C]2.1667[/C][C]0.6813[/C][C]0.8254[/C][/ROW]
[ROW][C]71[/C][C]0.0988[/C][C]0.1996[/C][C]0.1199[/C][C]1.6415[/C][C]0.7773[/C][C]0.8816[/C][/ROW]
[ROW][C]72[/C][C]0.1014[/C][C]0.1554[/C][C]0.1231[/C][C]0.991[/C][C]0.7967[/C][C]0.8926[/C][/ROW]
[ROW][C]73[/C][C]0.1035[/C][C]0.1723[/C][C]0.1272[/C][C]1.2147[/C][C]0.8316[/C][C]0.9119[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68713&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68713&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.0360.131300.698600
630.05670.10960.12040.51960.60910.7805
640.07540.04810.09630.10030.43950.6629
650.0856-0.05640.08640.13310.36290.6024
660.0895-0.08860.08680.31750.35380.5948
670.0908-0.02240.07610.02010.29820.5461
680.09150.11350.08140.52380.33040.5748
690.09320.20040.09631.65180.49560.704
700.09590.2290.1112.16670.68130.8254
710.09880.19960.11991.64150.77730.8816
720.10140.15540.12310.9910.79670.8926
730.10350.17230.12721.21470.83160.9119



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