Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 17 Dec 2008 06:20:00 -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/2008/Dec/17/t1229520119p52wydr7zfi8czx.htm/, Retrieved Sun, 26 May 2024 04:47:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34332, Retrieved Sun, 26 May 2024 04:47:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact151
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2008-12-17 13:20:00] [7697536cc4e4fad960a0bd617817c266] [Current]
Feedback Forum

Post a new message
Dataseries X:
6.4
6.8
7.5
7.5
7.6
7.6
7.4
7.3
7.1
6.9
6.8
7.5
7.6
7.8
8
8.1
8.2
8.3
8.2
8
7.9
7.6
7.6
8.2
8.3
8.4
8.4
8.4
8.6
8.9
8.8
8.3
7.5
7.2
7.5
8.8
9.3
9.3
8.7
8.2
8.3
8.5
8.6
8.6
8.2
8.1
8
8.6
8.7
8.8
8.5
8.4
8.5
8.7
8.7
8.6
8.5
8.3
8.1
8.2
8.1
8.1
7.9
7.9
7.9
8
8
7.9
8
7.7
7.2
7.5
7.3
7
7
7
7.2
7.3
7.1
6.8
6.6
6.2
6.2
6.8
6.9




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34332&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34332&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34332&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'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[73])
618.1-------
628.1-------
637.9-------
647.9-------
657.9-------
668-------
678-------
687.9-------
698-------
707.7-------
717.2-------
727.5-------
737.3-------
7477.3897.02517.75290.01810.68411e-040.6841
7577.17256.53797.80710.29710.70290.01230.3469
7677.15226.29458.00990.3640.6360.04370.3678
777.27.09586.14568.04590.41490.57830.04860.3368
787.37.15466.16848.14090.38630.46410.04650.3863
797.17.07066.0668.07520.47710.32720.03490.3272
806.86.92225.88277.96170.40890.36870.03260.2381
816.66.90015.79128.0090.29790.57020.02590.2399
826.26.58085.37317.78860.26830.48760.03470.1216
836.26.12274.82367.42170.45360.45360.0520.0378
846.86.43145.06647.79640.29830.63020.06250.1062
856.96.2484.83787.65820.18240.22150.07190.0719

\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[73]) \tabularnewline
61 & 8.1 & - & - & - & - & - & - & - \tabularnewline
62 & 8.1 & - & - & - & - & - & - & - \tabularnewline
63 & 7.9 & - & - & - & - & - & - & - \tabularnewline
64 & 7.9 & - & - & - & - & - & - & - \tabularnewline
65 & 7.9 & - & - & - & - & - & - & - \tabularnewline
66 & 8 & - & - & - & - & - & - & - \tabularnewline
67 & 8 & - & - & - & - & - & - & - \tabularnewline
68 & 7.9 & - & - & - & - & - & - & - \tabularnewline
69 & 8 & - & - & - & - & - & - & - \tabularnewline
70 & 7.7 & - & - & - & - & - & - & - \tabularnewline
71 & 7.2 & - & - & - & - & - & - & - \tabularnewline
72 & 7.5 & - & - & - & - & - & - & - \tabularnewline
73 & 7.3 & - & - & - & - & - & - & - \tabularnewline
74 & 7 & 7.389 & 7.0251 & 7.7529 & 0.0181 & 0.6841 & 1e-04 & 0.6841 \tabularnewline
75 & 7 & 7.1725 & 6.5379 & 7.8071 & 0.2971 & 0.7029 & 0.0123 & 0.3469 \tabularnewline
76 & 7 & 7.1522 & 6.2945 & 8.0099 & 0.364 & 0.636 & 0.0437 & 0.3678 \tabularnewline
77 & 7.2 & 7.0958 & 6.1456 & 8.0459 & 0.4149 & 0.5783 & 0.0486 & 0.3368 \tabularnewline
78 & 7.3 & 7.1546 & 6.1684 & 8.1409 & 0.3863 & 0.4641 & 0.0465 & 0.3863 \tabularnewline
79 & 7.1 & 7.0706 & 6.066 & 8.0752 & 0.4771 & 0.3272 & 0.0349 & 0.3272 \tabularnewline
80 & 6.8 & 6.9222 & 5.8827 & 7.9617 & 0.4089 & 0.3687 & 0.0326 & 0.2381 \tabularnewline
81 & 6.6 & 6.9001 & 5.7912 & 8.009 & 0.2979 & 0.5702 & 0.0259 & 0.2399 \tabularnewline
82 & 6.2 & 6.5808 & 5.3731 & 7.7886 & 0.2683 & 0.4876 & 0.0347 & 0.1216 \tabularnewline
83 & 6.2 & 6.1227 & 4.8236 & 7.4217 & 0.4536 & 0.4536 & 0.052 & 0.0378 \tabularnewline
84 & 6.8 & 6.4314 & 5.0664 & 7.7964 & 0.2983 & 0.6302 & 0.0625 & 0.1062 \tabularnewline
85 & 6.9 & 6.248 & 4.8378 & 7.6582 & 0.1824 & 0.2215 & 0.0719 & 0.0719 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34332&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[73])[/C][/ROW]
[ROW][C]61[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]7.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]7[/C][C]7.389[/C][C]7.0251[/C][C]7.7529[/C][C]0.0181[/C][C]0.6841[/C][C]1e-04[/C][C]0.6841[/C][/ROW]
[ROW][C]75[/C][C]7[/C][C]7.1725[/C][C]6.5379[/C][C]7.8071[/C][C]0.2971[/C][C]0.7029[/C][C]0.0123[/C][C]0.3469[/C][/ROW]
[ROW][C]76[/C][C]7[/C][C]7.1522[/C][C]6.2945[/C][C]8.0099[/C][C]0.364[/C][C]0.636[/C][C]0.0437[/C][C]0.3678[/C][/ROW]
[ROW][C]77[/C][C]7.2[/C][C]7.0958[/C][C]6.1456[/C][C]8.0459[/C][C]0.4149[/C][C]0.5783[/C][C]0.0486[/C][C]0.3368[/C][/ROW]
[ROW][C]78[/C][C]7.3[/C][C]7.1546[/C][C]6.1684[/C][C]8.1409[/C][C]0.3863[/C][C]0.4641[/C][C]0.0465[/C][C]0.3863[/C][/ROW]
[ROW][C]79[/C][C]7.1[/C][C]7.0706[/C][C]6.066[/C][C]8.0752[/C][C]0.4771[/C][C]0.3272[/C][C]0.0349[/C][C]0.3272[/C][/ROW]
[ROW][C]80[/C][C]6.8[/C][C]6.9222[/C][C]5.8827[/C][C]7.9617[/C][C]0.4089[/C][C]0.3687[/C][C]0.0326[/C][C]0.2381[/C][/ROW]
[ROW][C]81[/C][C]6.6[/C][C]6.9001[/C][C]5.7912[/C][C]8.009[/C][C]0.2979[/C][C]0.5702[/C][C]0.0259[/C][C]0.2399[/C][/ROW]
[ROW][C]82[/C][C]6.2[/C][C]6.5808[/C][C]5.3731[/C][C]7.7886[/C][C]0.2683[/C][C]0.4876[/C][C]0.0347[/C][C]0.1216[/C][/ROW]
[ROW][C]83[/C][C]6.2[/C][C]6.1227[/C][C]4.8236[/C][C]7.4217[/C][C]0.4536[/C][C]0.4536[/C][C]0.052[/C][C]0.0378[/C][/ROW]
[ROW][C]84[/C][C]6.8[/C][C]6.4314[/C][C]5.0664[/C][C]7.7964[/C][C]0.2983[/C][C]0.6302[/C][C]0.0625[/C][C]0.1062[/C][/ROW]
[ROW][C]85[/C][C]6.9[/C][C]6.248[/C][C]4.8378[/C][C]7.6582[/C][C]0.1824[/C][C]0.2215[/C][C]0.0719[/C][C]0.0719[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34332&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34332&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[73])
618.1-------
628.1-------
637.9-------
647.9-------
657.9-------
668-------
678-------
687.9-------
698-------
707.7-------
717.2-------
727.5-------
737.3-------
7477.3897.02517.75290.01810.68411e-040.6841
7577.17256.53797.80710.29710.70290.01230.3469
7677.15226.29458.00990.3640.6360.04370.3678
777.27.09586.14568.04590.41490.57830.04860.3368
787.37.15466.16848.14090.38630.46410.04650.3863
797.17.07066.0668.07520.47710.32720.03490.3272
806.86.92225.88277.96170.40890.36870.03260.2381
816.66.90015.79128.0090.29790.57020.02590.2399
826.26.58085.37317.78860.26830.48760.03470.1216
836.26.12274.82367.42170.45360.45360.0520.0378
846.86.43145.06647.79640.29830.63020.06250.1062
856.96.2484.83787.65820.18240.22150.07190.0719







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.0251-0.05260.00440.15130.01260.1123
750.0451-0.0240.0020.02980.00250.0498
760.0612-0.02130.00180.02320.00190.0439
770.06830.01470.00120.01099e-040.0301
780.07030.02030.00170.02110.00180.042
790.07250.00423e-049e-041e-040.0085
800.0766-0.01760.00150.01490.00120.0353
810.082-0.04350.00360.09010.00750.0866
820.0936-0.05790.00480.1450.01210.1099
830.10820.01260.00110.0065e-040.0223
840.10830.05730.00480.13590.01130.1064
850.11520.10430.00870.42510.03540.1882

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0251 & -0.0526 & 0.0044 & 0.1513 & 0.0126 & 0.1123 \tabularnewline
75 & 0.0451 & -0.024 & 0.002 & 0.0298 & 0.0025 & 0.0498 \tabularnewline
76 & 0.0612 & -0.0213 & 0.0018 & 0.0232 & 0.0019 & 0.0439 \tabularnewline
77 & 0.0683 & 0.0147 & 0.0012 & 0.0109 & 9e-04 & 0.0301 \tabularnewline
78 & 0.0703 & 0.0203 & 0.0017 & 0.0211 & 0.0018 & 0.042 \tabularnewline
79 & 0.0725 & 0.0042 & 3e-04 & 9e-04 & 1e-04 & 0.0085 \tabularnewline
80 & 0.0766 & -0.0176 & 0.0015 & 0.0149 & 0.0012 & 0.0353 \tabularnewline
81 & 0.082 & -0.0435 & 0.0036 & 0.0901 & 0.0075 & 0.0866 \tabularnewline
82 & 0.0936 & -0.0579 & 0.0048 & 0.145 & 0.0121 & 0.1099 \tabularnewline
83 & 0.1082 & 0.0126 & 0.0011 & 0.006 & 5e-04 & 0.0223 \tabularnewline
84 & 0.1083 & 0.0573 & 0.0048 & 0.1359 & 0.0113 & 0.1064 \tabularnewline
85 & 0.1152 & 0.1043 & 0.0087 & 0.4251 & 0.0354 & 0.1882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34332&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]74[/C][C]0.0251[/C][C]-0.0526[/C][C]0.0044[/C][C]0.1513[/C][C]0.0126[/C][C]0.1123[/C][/ROW]
[ROW][C]75[/C][C]0.0451[/C][C]-0.024[/C][C]0.002[/C][C]0.0298[/C][C]0.0025[/C][C]0.0498[/C][/ROW]
[ROW][C]76[/C][C]0.0612[/C][C]-0.0213[/C][C]0.0018[/C][C]0.0232[/C][C]0.0019[/C][C]0.0439[/C][/ROW]
[ROW][C]77[/C][C]0.0683[/C][C]0.0147[/C][C]0.0012[/C][C]0.0109[/C][C]9e-04[/C][C]0.0301[/C][/ROW]
[ROW][C]78[/C][C]0.0703[/C][C]0.0203[/C][C]0.0017[/C][C]0.0211[/C][C]0.0018[/C][C]0.042[/C][/ROW]
[ROW][C]79[/C][C]0.0725[/C][C]0.0042[/C][C]3e-04[/C][C]9e-04[/C][C]1e-04[/C][C]0.0085[/C][/ROW]
[ROW][C]80[/C][C]0.0766[/C][C]-0.0176[/C][C]0.0015[/C][C]0.0149[/C][C]0.0012[/C][C]0.0353[/C][/ROW]
[ROW][C]81[/C][C]0.082[/C][C]-0.0435[/C][C]0.0036[/C][C]0.0901[/C][C]0.0075[/C][C]0.0866[/C][/ROW]
[ROW][C]82[/C][C]0.0936[/C][C]-0.0579[/C][C]0.0048[/C][C]0.145[/C][C]0.0121[/C][C]0.1099[/C][/ROW]
[ROW][C]83[/C][C]0.1082[/C][C]0.0126[/C][C]0.0011[/C][C]0.006[/C][C]5e-04[/C][C]0.0223[/C][/ROW]
[ROW][C]84[/C][C]0.1083[/C][C]0.0573[/C][C]0.0048[/C][C]0.1359[/C][C]0.0113[/C][C]0.1064[/C][/ROW]
[ROW][C]85[/C][C]0.1152[/C][C]0.1043[/C][C]0.0087[/C][C]0.4251[/C][C]0.0354[/C][C]0.1882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34332&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34332&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
740.0251-0.05260.00440.15130.01260.1123
750.0451-0.0240.0020.02980.00250.0498
760.0612-0.02130.00180.02320.00190.0439
770.06830.01470.00120.01099e-040.0301
780.07030.02030.00170.02110.00180.042
790.07250.00423e-049e-041e-040.0085
800.0766-0.01760.00150.01490.00120.0353
810.082-0.04350.00360.09010.00750.0866
820.0936-0.05790.00480.1450.01210.1099
830.10820.01260.00110.0065e-040.0223
840.10830.05730.00480.13590.01130.1064
850.11520.10430.00870.42510.03540.1882



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