Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 26 Dec 2007 09:39: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/26/t1198686004svrg3wht671nkna.htm/, Retrieved Mon, 29 Apr 2024 20:24:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4894, Retrieved Mon, 29 Apr 2024 20:24:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact293
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Forecasting 48] [2007-12-13 17:01:41] [ede03b06b9ae6a59763c2cc70a5f12fe]
-   PD    [ARIMA Forecasting] [ARIMA Forecasting 48] [2007-12-26 16:39:50] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
114.9
124.5
142.2
159.7
165.2
198.6
207.8
219.6
239.6
235.3
218.5
213.8
205.5
198.4
198.5
190.2
180.7
193.6
192.8
195.5
197.2
196.9
178.9
172.4
156.4
143.7
153.6
168.8
185.8
199.9
205.4
197.5
199.6
200.5
193.7
179.6
169.1
169.8
195.5
194.8
204.5
203.8
204.8
204.9
240.0
248.3
258.4
254.9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time61 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 61 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4894&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]61 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4894&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4894&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 time61 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[36])
24172.4-------
25156.4-------
26143.7-------
27153.6-------
28168.8-------
29185.8-------
30199.9-------
31205.4-------
32197.5-------
33199.6-------
34200.5-------
35193.7-------
36179.6-------
37169.1165.6429149.4031184.04780.35640.06860.83750.0686
38169.8153.7785126.6498188.18780.18070.19140.7170.0707
39195.5153.6826114.0154211.11650.07680.29120.50110.1882
40194.8155.5508102.7697244.43380.19340.18920.38510.2979
41204.5157.430191.7761288.29280.24040.28780.33550.3699
42203.8157.546880.5322342.07270.31160.3090.32640.4074
43204.8154.33868.9892403.17630.34550.34840.34380.4211
44204.9146.73757.437465.97870.36050.36070.37760.4201
45240142.728848.6353563.87120.32540.38620.39560.4319
46248.3138.473941.029693.35540.3490.35990.41330.4422
47258.4132.062334.13849.13680.36490.37540.43310.4483
48254.9123.708228.02371032.24970.38860.38570.4520.452

\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[36]) \tabularnewline
24 & 172.4 & - & - & - & - & - & - & - \tabularnewline
25 & 156.4 & - & - & - & - & - & - & - \tabularnewline
26 & 143.7 & - & - & - & - & - & - & - \tabularnewline
27 & 153.6 & - & - & - & - & - & - & - \tabularnewline
28 & 168.8 & - & - & - & - & - & - & - \tabularnewline
29 & 185.8 & - & - & - & - & - & - & - \tabularnewline
30 & 199.9 & - & - & - & - & - & - & - \tabularnewline
31 & 205.4 & - & - & - & - & - & - & - \tabularnewline
32 & 197.5 & - & - & - & - & - & - & - \tabularnewline
33 & 199.6 & - & - & - & - & - & - & - \tabularnewline
34 & 200.5 & - & - & - & - & - & - & - \tabularnewline
35 & 193.7 & - & - & - & - & - & - & - \tabularnewline
36 & 179.6 & - & - & - & - & - & - & - \tabularnewline
37 & 169.1 & 165.6429 & 149.4031 & 184.0478 & 0.3564 & 0.0686 & 0.8375 & 0.0686 \tabularnewline
38 & 169.8 & 153.7785 & 126.6498 & 188.1878 & 0.1807 & 0.1914 & 0.717 & 0.0707 \tabularnewline
39 & 195.5 & 153.6826 & 114.0154 & 211.1165 & 0.0768 & 0.2912 & 0.5011 & 0.1882 \tabularnewline
40 & 194.8 & 155.5508 & 102.7697 & 244.4338 & 0.1934 & 0.1892 & 0.3851 & 0.2979 \tabularnewline
41 & 204.5 & 157.4301 & 91.7761 & 288.2928 & 0.2404 & 0.2878 & 0.3355 & 0.3699 \tabularnewline
42 & 203.8 & 157.5468 & 80.5322 & 342.0727 & 0.3116 & 0.309 & 0.3264 & 0.4074 \tabularnewline
43 & 204.8 & 154.338 & 68.9892 & 403.1763 & 0.3455 & 0.3484 & 0.3438 & 0.4211 \tabularnewline
44 & 204.9 & 146.737 & 57.437 & 465.9787 & 0.3605 & 0.3607 & 0.3776 & 0.4201 \tabularnewline
45 & 240 & 142.7288 & 48.6353 & 563.8712 & 0.3254 & 0.3862 & 0.3956 & 0.4319 \tabularnewline
46 & 248.3 & 138.4739 & 41.029 & 693.3554 & 0.349 & 0.3599 & 0.4133 & 0.4422 \tabularnewline
47 & 258.4 & 132.0623 & 34.13 & 849.1368 & 0.3649 & 0.3754 & 0.4331 & 0.4483 \tabularnewline
48 & 254.9 & 123.7082 & 28.0237 & 1032.2497 & 0.3886 & 0.3857 & 0.452 & 0.452 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4894&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[36])[/C][/ROW]
[ROW][C]24[/C][C]172.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]156.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]143.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]153.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]168.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]185.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]199.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]205.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]197.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]199.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]200.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]193.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]179.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]169.1[/C][C]165.6429[/C][C]149.4031[/C][C]184.0478[/C][C]0.3564[/C][C]0.0686[/C][C]0.8375[/C][C]0.0686[/C][/ROW]
[ROW][C]38[/C][C]169.8[/C][C]153.7785[/C][C]126.6498[/C][C]188.1878[/C][C]0.1807[/C][C]0.1914[/C][C]0.717[/C][C]0.0707[/C][/ROW]
[ROW][C]39[/C][C]195.5[/C][C]153.6826[/C][C]114.0154[/C][C]211.1165[/C][C]0.0768[/C][C]0.2912[/C][C]0.5011[/C][C]0.1882[/C][/ROW]
[ROW][C]40[/C][C]194.8[/C][C]155.5508[/C][C]102.7697[/C][C]244.4338[/C][C]0.1934[/C][C]0.1892[/C][C]0.3851[/C][C]0.2979[/C][/ROW]
[ROW][C]41[/C][C]204.5[/C][C]157.4301[/C][C]91.7761[/C][C]288.2928[/C][C]0.2404[/C][C]0.2878[/C][C]0.3355[/C][C]0.3699[/C][/ROW]
[ROW][C]42[/C][C]203.8[/C][C]157.5468[/C][C]80.5322[/C][C]342.0727[/C][C]0.3116[/C][C]0.309[/C][C]0.3264[/C][C]0.4074[/C][/ROW]
[ROW][C]43[/C][C]204.8[/C][C]154.338[/C][C]68.9892[/C][C]403.1763[/C][C]0.3455[/C][C]0.3484[/C][C]0.3438[/C][C]0.4211[/C][/ROW]
[ROW][C]44[/C][C]204.9[/C][C]146.737[/C][C]57.437[/C][C]465.9787[/C][C]0.3605[/C][C]0.3607[/C][C]0.3776[/C][C]0.4201[/C][/ROW]
[ROW][C]45[/C][C]240[/C][C]142.7288[/C][C]48.6353[/C][C]563.8712[/C][C]0.3254[/C][C]0.3862[/C][C]0.3956[/C][C]0.4319[/C][/ROW]
[ROW][C]46[/C][C]248.3[/C][C]138.4739[/C][C]41.029[/C][C]693.3554[/C][C]0.349[/C][C]0.3599[/C][C]0.4133[/C][C]0.4422[/C][/ROW]
[ROW][C]47[/C][C]258.4[/C][C]132.0623[/C][C]34.13[/C][C]849.1368[/C][C]0.3649[/C][C]0.3754[/C][C]0.4331[/C][C]0.4483[/C][/ROW]
[ROW][C]48[/C][C]254.9[/C][C]123.7082[/C][C]28.0237[/C][C]1032.2497[/C][C]0.3886[/C][C]0.3857[/C][C]0.452[/C][C]0.452[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4894&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4894&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[36])
24172.4-------
25156.4-------
26143.7-------
27153.6-------
28168.8-------
29185.8-------
30199.9-------
31205.4-------
32197.5-------
33199.6-------
34200.5-------
35193.7-------
36179.6-------
37169.1165.6429149.4031184.04780.35640.06860.83750.0686
38169.8153.7785126.6498188.18780.18070.19140.7170.0707
39195.5153.6826114.0154211.11650.07680.29120.50110.1882
40194.8155.5508102.7697244.43380.19340.18920.38510.2979
41204.5157.430191.7761288.29280.24040.28780.33550.3699
42203.8157.546880.5322342.07270.31160.3090.32640.4074
43204.8154.33868.9892403.17630.34550.34840.34380.4211
44204.9146.73757.437465.97870.36050.36070.37760.4201
45240142.728848.6353563.87120.32540.38620.39560.4319
46248.3138.473941.029693.35540.3490.35990.41330.4422
47258.4132.062334.13849.13680.36490.37540.43310.4483
48254.9123.708228.02371032.24970.38860.38570.4520.452







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.05670.02090.001711.95140.9960.998
380.11420.10420.0087256.688721.39074.625
390.19070.27210.02271748.6979145.724812.0717
400.29150.25230.0211540.5006128.375111.3303
410.42410.2990.02492215.5751184.631313.5879
420.59760.29360.02452139.3608178.280113.3522
430.82260.3270.02722546.4122212.20114.5671
441.110.39640.0333382.933281.911116.7902
451.50540.68150.05689461.6866788.473928.0798
462.04440.79310.066112061.77821005.148231.7041
472.77030.95670.079715961.22691330.102236.4706
483.74711.06050.088417211.28051434.273437.8718

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0567 & 0.0209 & 0.0017 & 11.9514 & 0.996 & 0.998 \tabularnewline
38 & 0.1142 & 0.1042 & 0.0087 & 256.6887 & 21.3907 & 4.625 \tabularnewline
39 & 0.1907 & 0.2721 & 0.0227 & 1748.6979 & 145.7248 & 12.0717 \tabularnewline
40 & 0.2915 & 0.2523 & 0.021 & 1540.5006 & 128.3751 & 11.3303 \tabularnewline
41 & 0.4241 & 0.299 & 0.0249 & 2215.5751 & 184.6313 & 13.5879 \tabularnewline
42 & 0.5976 & 0.2936 & 0.0245 & 2139.3608 & 178.2801 & 13.3522 \tabularnewline
43 & 0.8226 & 0.327 & 0.0272 & 2546.4122 & 212.201 & 14.5671 \tabularnewline
44 & 1.11 & 0.3964 & 0.033 & 3382.933 & 281.9111 & 16.7902 \tabularnewline
45 & 1.5054 & 0.6815 & 0.0568 & 9461.6866 & 788.4739 & 28.0798 \tabularnewline
46 & 2.0444 & 0.7931 & 0.0661 & 12061.7782 & 1005.1482 & 31.7041 \tabularnewline
47 & 2.7703 & 0.9567 & 0.0797 & 15961.2269 & 1330.1022 & 36.4706 \tabularnewline
48 & 3.7471 & 1.0605 & 0.0884 & 17211.2805 & 1434.2734 & 37.8718 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4894&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]37[/C][C]0.0567[/C][C]0.0209[/C][C]0.0017[/C][C]11.9514[/C][C]0.996[/C][C]0.998[/C][/ROW]
[ROW][C]38[/C][C]0.1142[/C][C]0.1042[/C][C]0.0087[/C][C]256.6887[/C][C]21.3907[/C][C]4.625[/C][/ROW]
[ROW][C]39[/C][C]0.1907[/C][C]0.2721[/C][C]0.0227[/C][C]1748.6979[/C][C]145.7248[/C][C]12.0717[/C][/ROW]
[ROW][C]40[/C][C]0.2915[/C][C]0.2523[/C][C]0.021[/C][C]1540.5006[/C][C]128.3751[/C][C]11.3303[/C][/ROW]
[ROW][C]41[/C][C]0.4241[/C][C]0.299[/C][C]0.0249[/C][C]2215.5751[/C][C]184.6313[/C][C]13.5879[/C][/ROW]
[ROW][C]42[/C][C]0.5976[/C][C]0.2936[/C][C]0.0245[/C][C]2139.3608[/C][C]178.2801[/C][C]13.3522[/C][/ROW]
[ROW][C]43[/C][C]0.8226[/C][C]0.327[/C][C]0.0272[/C][C]2546.4122[/C][C]212.201[/C][C]14.5671[/C][/ROW]
[ROW][C]44[/C][C]1.11[/C][C]0.3964[/C][C]0.033[/C][C]3382.933[/C][C]281.9111[/C][C]16.7902[/C][/ROW]
[ROW][C]45[/C][C]1.5054[/C][C]0.6815[/C][C]0.0568[/C][C]9461.6866[/C][C]788.4739[/C][C]28.0798[/C][/ROW]
[ROW][C]46[/C][C]2.0444[/C][C]0.7931[/C][C]0.0661[/C][C]12061.7782[/C][C]1005.1482[/C][C]31.7041[/C][/ROW]
[ROW][C]47[/C][C]2.7703[/C][C]0.9567[/C][C]0.0797[/C][C]15961.2269[/C][C]1330.1022[/C][C]36.4706[/C][/ROW]
[ROW][C]48[/C][C]3.7471[/C][C]1.0605[/C][C]0.0884[/C][C]17211.2805[/C][C]1434.2734[/C][C]37.8718[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4894&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4894&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
370.05670.02090.001711.95140.9960.998
380.11420.10420.0087256.688721.39074.625
390.19070.27210.02271748.6979145.724812.0717
400.29150.25230.0211540.5006128.375111.3303
410.42410.2990.02492215.5751184.631313.5879
420.59760.29360.02452139.3608178.280113.3522
430.82260.3270.02722546.4122212.20114.5671
441.110.39640.0333382.933281.911116.7902
451.50540.68150.05689461.6866788.473928.0798
462.04440.79310.066112061.77821005.148231.7041
472.77030.95670.079715961.22691330.102236.4706
483.74711.06050.088417211.28051434.273437.8718



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