Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 16 Dec 2007 04:57:16 -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/16/t1197805292rk5n178dln8az5k.htm/, Retrieved Thu, 02 May 2024 10:32:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4142, Retrieved Thu, 02 May 2024 10:32:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsPaper G12 Vervaardiging producten van metaal
Estimated Impact227
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper G12 Vervaar...] [2007-12-16 11:57:16] [ae3f0dfb5dab6ea17524363c550229d5] [Current]
Feedback Forum

Post a new message
Dataseries X:
97,3
101
113,2
101
105,7
113,9
86,4
96,5
103,3
114,9
105,8
94,2
98,4
99,4
108,8
112,6
104,4
112,2
81,1
97,1
112,6
113,8
107,8
103,2
103,3
101,2
107,7
110,4
101,9
115,9
89,9
88,6
117,2
123,9
100
103,6
94,1
98,7
119,5
112,7
104,4
124,7
89,1
97
121,6
118,8
114
111,5
97,2
102,5
113,4
109,8
104,9
126,1
80
96,8
117,2
112,3
117,3
111,1
102,2
104,3
122,9
107,6
121,3
131,5
89
104,4
128,9
135,9
133,3
121,3
120,5
120,4
137,9
126,1
133,2
146,6
103,4
117,2




Summary of compuational 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 compuational 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=4142&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]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=4142&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4142&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 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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9122.3045111.5301134.11970.1370.99850.80140.9985
70135.9121.6111110.9085133.34650.00850.11170.940.998
71133.3116.4054105.984127.85160.00194e-040.43910.9801
72121.3109.88998.8036122.2180.03481e-040.42370.8086
73120.5102.439992.1532113.87480.0016e-040.51640.3684
74120.4105.782794.9991117.79030.00850.00810.59560.5893
75137.9118.4455105.9893132.36560.00310.39160.26530.976
76126.1112.1057100.2929125.30970.01891e-040.74820.8737
77133.2110.925399.1277124.12695e-040.01210.06170.8337
78146.6124.4583111.0839139.44310.00190.12640.17850.9957
79103.487.671878.234998.24710.001800.40280.001
80117.299.093888.3752111.11240.00160.24130.19340.1934

\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[68]) \tabularnewline
56 & 96.8 & - & - & - & - & - & - & - \tabularnewline
57 & 117.2 & - & - & - & - & - & - & - \tabularnewline
58 & 112.3 & - & - & - & - & - & - & - \tabularnewline
59 & 117.3 & - & - & - & - & - & - & - \tabularnewline
60 & 111.1 & - & - & - & - & - & - & - \tabularnewline
61 & 102.2 & - & - & - & - & - & - & - \tabularnewline
62 & 104.3 & - & - & - & - & - & - & - \tabularnewline
63 & 122.9 & - & - & - & - & - & - & - \tabularnewline
64 & 107.6 & - & - & - & - & - & - & - \tabularnewline
65 & 121.3 & - & - & - & - & - & - & - \tabularnewline
66 & 131.5 & - & - & - & - & - & - & - \tabularnewline
67 & 89 & - & - & - & - & - & - & - \tabularnewline
68 & 104.4 & - & - & - & - & - & - & - \tabularnewline
69 & 128.9 & 122.3045 & 111.5301 & 134.1197 & 0.137 & 0.9985 & 0.8014 & 0.9985 \tabularnewline
70 & 135.9 & 121.6111 & 110.9085 & 133.3465 & 0.0085 & 0.1117 & 0.94 & 0.998 \tabularnewline
71 & 133.3 & 116.4054 & 105.984 & 127.8516 & 0.0019 & 4e-04 & 0.4391 & 0.9801 \tabularnewline
72 & 121.3 & 109.889 & 98.8036 & 122.218 & 0.0348 & 1e-04 & 0.4237 & 0.8086 \tabularnewline
73 & 120.5 & 102.4399 & 92.1532 & 113.8748 & 0.001 & 6e-04 & 0.5164 & 0.3684 \tabularnewline
74 & 120.4 & 105.7827 & 94.9991 & 117.7903 & 0.0085 & 0.0081 & 0.5956 & 0.5893 \tabularnewline
75 & 137.9 & 118.4455 & 105.9893 & 132.3656 & 0.0031 & 0.3916 & 0.2653 & 0.976 \tabularnewline
76 & 126.1 & 112.1057 & 100.2929 & 125.3097 & 0.0189 & 1e-04 & 0.7482 & 0.8737 \tabularnewline
77 & 133.2 & 110.9253 & 99.1277 & 124.1269 & 5e-04 & 0.0121 & 0.0617 & 0.8337 \tabularnewline
78 & 146.6 & 124.4583 & 111.0839 & 139.4431 & 0.0019 & 0.1264 & 0.1785 & 0.9957 \tabularnewline
79 & 103.4 & 87.6718 & 78.2349 & 98.2471 & 0.0018 & 0 & 0.4028 & 0.001 \tabularnewline
80 & 117.2 & 99.0938 & 88.3752 & 111.1124 & 0.0016 & 0.2413 & 0.1934 & 0.1934 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4142&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[68])[/C][/ROW]
[ROW][C]56[/C][C]96.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]112.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]122.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]107.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]121.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]131.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]128.9[/C][C]122.3045[/C][C]111.5301[/C][C]134.1197[/C][C]0.137[/C][C]0.9985[/C][C]0.8014[/C][C]0.9985[/C][/ROW]
[ROW][C]70[/C][C]135.9[/C][C]121.6111[/C][C]110.9085[/C][C]133.3465[/C][C]0.0085[/C][C]0.1117[/C][C]0.94[/C][C]0.998[/C][/ROW]
[ROW][C]71[/C][C]133.3[/C][C]116.4054[/C][C]105.984[/C][C]127.8516[/C][C]0.0019[/C][C]4e-04[/C][C]0.4391[/C][C]0.9801[/C][/ROW]
[ROW][C]72[/C][C]121.3[/C][C]109.889[/C][C]98.8036[/C][C]122.218[/C][C]0.0348[/C][C]1e-04[/C][C]0.4237[/C][C]0.8086[/C][/ROW]
[ROW][C]73[/C][C]120.5[/C][C]102.4399[/C][C]92.1532[/C][C]113.8748[/C][C]0.001[/C][C]6e-04[/C][C]0.5164[/C][C]0.3684[/C][/ROW]
[ROW][C]74[/C][C]120.4[/C][C]105.7827[/C][C]94.9991[/C][C]117.7903[/C][C]0.0085[/C][C]0.0081[/C][C]0.5956[/C][C]0.5893[/C][/ROW]
[ROW][C]75[/C][C]137.9[/C][C]118.4455[/C][C]105.9893[/C][C]132.3656[/C][C]0.0031[/C][C]0.3916[/C][C]0.2653[/C][C]0.976[/C][/ROW]
[ROW][C]76[/C][C]126.1[/C][C]112.1057[/C][C]100.2929[/C][C]125.3097[/C][C]0.0189[/C][C]1e-04[/C][C]0.7482[/C][C]0.8737[/C][/ROW]
[ROW][C]77[/C][C]133.2[/C][C]110.9253[/C][C]99.1277[/C][C]124.1269[/C][C]5e-04[/C][C]0.0121[/C][C]0.0617[/C][C]0.8337[/C][/ROW]
[ROW][C]78[/C][C]146.6[/C][C]124.4583[/C][C]111.0839[/C][C]139.4431[/C][C]0.0019[/C][C]0.1264[/C][C]0.1785[/C][C]0.9957[/C][/ROW]
[ROW][C]79[/C][C]103.4[/C][C]87.6718[/C][C]78.2349[/C][C]98.2471[/C][C]0.0018[/C][C]0[/C][C]0.4028[/C][C]0.001[/C][/ROW]
[ROW][C]80[/C][C]117.2[/C][C]99.0938[/C][C]88.3752[/C][C]111.1124[/C][C]0.0016[/C][C]0.2413[/C][C]0.1934[/C][C]0.1934[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4142&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4142&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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9122.3045111.5301134.11970.1370.99850.80140.9985
70135.9121.6111110.9085133.34650.00850.11170.940.998
71133.3116.4054105.984127.85160.00194e-040.43910.9801
72121.3109.88998.8036122.2180.03481e-040.42370.8086
73120.5102.439992.1532113.87480.0016e-040.51640.3684
74120.4105.782794.9991117.79030.00850.00810.59560.5893
75137.9118.4455105.9893132.36560.00310.39160.26530.976
76126.1112.1057100.2929125.30970.01891e-040.74820.8737
77133.2110.925399.1277124.12695e-040.01210.06170.8337
78146.6124.4583111.0839139.44310.00190.12640.17850.9957
79103.487.671878.234998.24710.001800.40280.001
80117.299.093888.3752111.11240.00160.24130.19340.1934







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.04930.05390.004543.50123.62511.904
700.04920.11750.0098204.172417.01444.1248
710.05020.14510.0121285.426723.78564.877
720.05720.10380.0087130.21210.8513.2941
730.0570.17630.0147326.16727.18065.2135
740.05790.13820.0115213.665917.80554.2197
750.060.16420.0137378.477831.53985.616
760.06010.12480.0104195.841816.32014.0398
770.06070.20080.0167496.164541.3476.4302
780.06140.17790.0148490.253140.85446.3917
790.06150.17940.0149247.375320.61464.5403
800.06190.18270.0152327.833827.31955.2268

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0493 & 0.0539 & 0.0045 & 43.5012 & 3.6251 & 1.904 \tabularnewline
70 & 0.0492 & 0.1175 & 0.0098 & 204.1724 & 17.0144 & 4.1248 \tabularnewline
71 & 0.0502 & 0.1451 & 0.0121 & 285.4267 & 23.7856 & 4.877 \tabularnewline
72 & 0.0572 & 0.1038 & 0.0087 & 130.212 & 10.851 & 3.2941 \tabularnewline
73 & 0.057 & 0.1763 & 0.0147 & 326.167 & 27.1806 & 5.2135 \tabularnewline
74 & 0.0579 & 0.1382 & 0.0115 & 213.6659 & 17.8055 & 4.2197 \tabularnewline
75 & 0.06 & 0.1642 & 0.0137 & 378.4778 & 31.5398 & 5.616 \tabularnewline
76 & 0.0601 & 0.1248 & 0.0104 & 195.8418 & 16.3201 & 4.0398 \tabularnewline
77 & 0.0607 & 0.2008 & 0.0167 & 496.1645 & 41.347 & 6.4302 \tabularnewline
78 & 0.0614 & 0.1779 & 0.0148 & 490.2531 & 40.8544 & 6.3917 \tabularnewline
79 & 0.0615 & 0.1794 & 0.0149 & 247.3753 & 20.6146 & 4.5403 \tabularnewline
80 & 0.0619 & 0.1827 & 0.0152 & 327.8338 & 27.3195 & 5.2268 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4142&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]69[/C][C]0.0493[/C][C]0.0539[/C][C]0.0045[/C][C]43.5012[/C][C]3.6251[/C][C]1.904[/C][/ROW]
[ROW][C]70[/C][C]0.0492[/C][C]0.1175[/C][C]0.0098[/C][C]204.1724[/C][C]17.0144[/C][C]4.1248[/C][/ROW]
[ROW][C]71[/C][C]0.0502[/C][C]0.1451[/C][C]0.0121[/C][C]285.4267[/C][C]23.7856[/C][C]4.877[/C][/ROW]
[ROW][C]72[/C][C]0.0572[/C][C]0.1038[/C][C]0.0087[/C][C]130.212[/C][C]10.851[/C][C]3.2941[/C][/ROW]
[ROW][C]73[/C][C]0.057[/C][C]0.1763[/C][C]0.0147[/C][C]326.167[/C][C]27.1806[/C][C]5.2135[/C][/ROW]
[ROW][C]74[/C][C]0.0579[/C][C]0.1382[/C][C]0.0115[/C][C]213.6659[/C][C]17.8055[/C][C]4.2197[/C][/ROW]
[ROW][C]75[/C][C]0.06[/C][C]0.1642[/C][C]0.0137[/C][C]378.4778[/C][C]31.5398[/C][C]5.616[/C][/ROW]
[ROW][C]76[/C][C]0.0601[/C][C]0.1248[/C][C]0.0104[/C][C]195.8418[/C][C]16.3201[/C][C]4.0398[/C][/ROW]
[ROW][C]77[/C][C]0.0607[/C][C]0.2008[/C][C]0.0167[/C][C]496.1645[/C][C]41.347[/C][C]6.4302[/C][/ROW]
[ROW][C]78[/C][C]0.0614[/C][C]0.1779[/C][C]0.0148[/C][C]490.2531[/C][C]40.8544[/C][C]6.3917[/C][/ROW]
[ROW][C]79[/C][C]0.0615[/C][C]0.1794[/C][C]0.0149[/C][C]247.3753[/C][C]20.6146[/C][C]4.5403[/C][/ROW]
[ROW][C]80[/C][C]0.0619[/C][C]0.1827[/C][C]0.0152[/C][C]327.8338[/C][C]27.3195[/C][C]5.2268[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4142&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4142&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
690.04930.05390.004543.50123.62511.904
700.04920.11750.0098204.172417.01444.1248
710.05020.14510.0121285.426723.78564.877
720.05720.10380.0087130.21210.8513.2941
730.0570.17630.0147326.16727.18065.2135
740.05790.13820.0115213.665917.80554.2197
750.060.16420.0137378.477831.53985.616
760.06010.12480.0104195.841816.32014.0398
770.06070.20080.0167496.164541.3476.4302
780.06140.17790.0148490.253140.85446.3917
790.06150.17940.0149247.375320.61464.5403
800.06190.18270.0152327.833827.31955.2268



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