Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 14:18:31 -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/10/t1197320648pctzhqyqy6p7t24.htm/, Retrieved Mon, 06 May 2024 11:08:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3055, Retrieved Mon, 06 May 2024 11:08:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact198
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2007-12-10 21:18:31] [52b0ae29b3b0ac57b71db95ac12f6d2e] [Current]
Feedback Forum

Post a new message
Dataseries X:
117
103,8
100,8
110,6
104
112,6
107,3
98,9
109,8
104,9
102,2
123,9
124,9
112,7
121,9
100,6
104,3
120,4
107,5
102,9
125,6
107,5
108,8
128,4
121,1
119,5
128,7
108,7
105,5
119,8
111,3
110,6
120,1
97,5
107,7
127,3
117,2
119,8
116,2
111
112,4
130,6
109,1
118,8
123,9
101,6
112,8
128




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3055&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3055&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3055&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
24128.4-------
25121.1-------
26119.5-------
27128.7-------
28108.7-------
29105.5-------
30119.8-------
31111.3-------
32110.6-------
33120.1-------
3497.5-------
35107.7-------
36127.3-------
37117.2117.0845103.5569130.61220.49330.06940.28040.0694
38119.8116.068102.2081129.92780.29880.43640.31370.0561
39116.2123.1216109.2408137.00250.16420.68050.21540.2776
40111108.826693.9448123.70850.38730.16570.50670.0075
41112.4104.973689.8974120.04990.16720.21670.47270.0019
42130.6118.2169103.1129133.32090.0540.77480.41860.1193
43109.1110.288895.0048125.57280.43940.00460.44840.0146
44118.8108.153792.7975123.510.08710.45190.37740.0073
45123.9117.2438101.8706132.61710.1980.42140.35790.0999
46101.698.451983.0396113.86420.34456e-040.54821e-04
47112.8106.194790.7595121.630.20080.72020.42420.0037
48128126.3894110.9465141.83220.4190.95770.4540.454

\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 & 128.4 & - & - & - & - & - & - & - \tabularnewline
25 & 121.1 & - & - & - & - & - & - & - \tabularnewline
26 & 119.5 & - & - & - & - & - & - & - \tabularnewline
27 & 128.7 & - & - & - & - & - & - & - \tabularnewline
28 & 108.7 & - & - & - & - & - & - & - \tabularnewline
29 & 105.5 & - & - & - & - & - & - & - \tabularnewline
30 & 119.8 & - & - & - & - & - & - & - \tabularnewline
31 & 111.3 & - & - & - & - & - & - & - \tabularnewline
32 & 110.6 & - & - & - & - & - & - & - \tabularnewline
33 & 120.1 & - & - & - & - & - & - & - \tabularnewline
34 & 97.5 & - & - & - & - & - & - & - \tabularnewline
35 & 107.7 & - & - & - & - & - & - & - \tabularnewline
36 & 127.3 & - & - & - & - & - & - & - \tabularnewline
37 & 117.2 & 117.0845 & 103.5569 & 130.6122 & 0.4933 & 0.0694 & 0.2804 & 0.0694 \tabularnewline
38 & 119.8 & 116.068 & 102.2081 & 129.9278 & 0.2988 & 0.4364 & 0.3137 & 0.0561 \tabularnewline
39 & 116.2 & 123.1216 & 109.2408 & 137.0025 & 0.1642 & 0.6805 & 0.2154 & 0.2776 \tabularnewline
40 & 111 & 108.8266 & 93.9448 & 123.7085 & 0.3873 & 0.1657 & 0.5067 & 0.0075 \tabularnewline
41 & 112.4 & 104.9736 & 89.8974 & 120.0499 & 0.1672 & 0.2167 & 0.4727 & 0.0019 \tabularnewline
42 & 130.6 & 118.2169 & 103.1129 & 133.3209 & 0.054 & 0.7748 & 0.4186 & 0.1193 \tabularnewline
43 & 109.1 & 110.2888 & 95.0048 & 125.5728 & 0.4394 & 0.0046 & 0.4484 & 0.0146 \tabularnewline
44 & 118.8 & 108.1537 & 92.7975 & 123.51 & 0.0871 & 0.4519 & 0.3774 & 0.0073 \tabularnewline
45 & 123.9 & 117.2438 & 101.8706 & 132.6171 & 0.198 & 0.4214 & 0.3579 & 0.0999 \tabularnewline
46 & 101.6 & 98.4519 & 83.0396 & 113.8642 & 0.3445 & 6e-04 & 0.5482 & 1e-04 \tabularnewline
47 & 112.8 & 106.1947 & 90.7595 & 121.63 & 0.2008 & 0.7202 & 0.4242 & 0.0037 \tabularnewline
48 & 128 & 126.3894 & 110.9465 & 141.8322 & 0.419 & 0.9577 & 0.454 & 0.454 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3055&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]128.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]121.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]119.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]128.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]108.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]105.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]111.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]110.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]120.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]97.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]107.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]127.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]117.2[/C][C]117.0845[/C][C]103.5569[/C][C]130.6122[/C][C]0.4933[/C][C]0.0694[/C][C]0.2804[/C][C]0.0694[/C][/ROW]
[ROW][C]38[/C][C]119.8[/C][C]116.068[/C][C]102.2081[/C][C]129.9278[/C][C]0.2988[/C][C]0.4364[/C][C]0.3137[/C][C]0.0561[/C][/ROW]
[ROW][C]39[/C][C]116.2[/C][C]123.1216[/C][C]109.2408[/C][C]137.0025[/C][C]0.1642[/C][C]0.6805[/C][C]0.2154[/C][C]0.2776[/C][/ROW]
[ROW][C]40[/C][C]111[/C][C]108.8266[/C][C]93.9448[/C][C]123.7085[/C][C]0.3873[/C][C]0.1657[/C][C]0.5067[/C][C]0.0075[/C][/ROW]
[ROW][C]41[/C][C]112.4[/C][C]104.9736[/C][C]89.8974[/C][C]120.0499[/C][C]0.1672[/C][C]0.2167[/C][C]0.4727[/C][C]0.0019[/C][/ROW]
[ROW][C]42[/C][C]130.6[/C][C]118.2169[/C][C]103.1129[/C][C]133.3209[/C][C]0.054[/C][C]0.7748[/C][C]0.4186[/C][C]0.1193[/C][/ROW]
[ROW][C]43[/C][C]109.1[/C][C]110.2888[/C][C]95.0048[/C][C]125.5728[/C][C]0.4394[/C][C]0.0046[/C][C]0.4484[/C][C]0.0146[/C][/ROW]
[ROW][C]44[/C][C]118.8[/C][C]108.1537[/C][C]92.7975[/C][C]123.51[/C][C]0.0871[/C][C]0.4519[/C][C]0.3774[/C][C]0.0073[/C][/ROW]
[ROW][C]45[/C][C]123.9[/C][C]117.2438[/C][C]101.8706[/C][C]132.6171[/C][C]0.198[/C][C]0.4214[/C][C]0.3579[/C][C]0.0999[/C][/ROW]
[ROW][C]46[/C][C]101.6[/C][C]98.4519[/C][C]83.0396[/C][C]113.8642[/C][C]0.3445[/C][C]6e-04[/C][C]0.5482[/C][C]1e-04[/C][/ROW]
[ROW][C]47[/C][C]112.8[/C][C]106.1947[/C][C]90.7595[/C][C]121.63[/C][C]0.2008[/C][C]0.7202[/C][C]0.4242[/C][C]0.0037[/C][/ROW]
[ROW][C]48[/C][C]128[/C][C]126.3894[/C][C]110.9465[/C][C]141.8322[/C][C]0.419[/C][C]0.9577[/C][C]0.454[/C][C]0.454[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3055&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3055&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])
24128.4-------
25121.1-------
26119.5-------
27128.7-------
28108.7-------
29105.5-------
30119.8-------
31111.3-------
32110.6-------
33120.1-------
3497.5-------
35107.7-------
36127.3-------
37117.2117.0845103.5569130.61220.49330.06940.28040.0694
38119.8116.068102.2081129.92780.29880.43640.31370.0561
39116.2123.1216109.2408137.00250.16420.68050.21540.2776
40111108.826693.9448123.70850.38730.16570.50670.0075
41112.4104.973689.8974120.04990.16720.21670.47270.0019
42130.6118.2169103.1129133.32090.0540.77480.41860.1193
43109.1110.288895.0048125.57280.43940.00460.44840.0146
44118.8108.153792.7975123.510.08710.45190.37740.0073
45123.9117.2438101.8706132.61710.1980.42140.35790.0999
46101.698.451983.0396113.86420.34456e-040.54821e-04
47112.8106.194790.7595121.630.20080.72020.42420.0037
48128126.3894110.9465141.83220.4190.95770.4540.454







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.05890.0011e-040.01330.00110.0333
380.06090.03220.002713.92811.16071.0773
390.0575-0.05620.004747.90923.99241.9981
400.06980.020.00174.72360.39360.6274
410.07330.07070.005955.15094.59592.1438
420.06520.10470.0087153.341212.77843.5747
430.0707-0.01089e-041.41320.11780.3432
440.07240.09840.0082113.34289.44523.0733
450.06690.05680.004744.30463.69211.9215
460.07990.0320.00279.91040.82590.9088
470.07420.06220.005243.62973.63581.9068
480.06230.01270.00112.59410.21620.465

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0589 & 0.001 & 1e-04 & 0.0133 & 0.0011 & 0.0333 \tabularnewline
38 & 0.0609 & 0.0322 & 0.0027 & 13.9281 & 1.1607 & 1.0773 \tabularnewline
39 & 0.0575 & -0.0562 & 0.0047 & 47.9092 & 3.9924 & 1.9981 \tabularnewline
40 & 0.0698 & 0.02 & 0.0017 & 4.7236 & 0.3936 & 0.6274 \tabularnewline
41 & 0.0733 & 0.0707 & 0.0059 & 55.1509 & 4.5959 & 2.1438 \tabularnewline
42 & 0.0652 & 0.1047 & 0.0087 & 153.3412 & 12.7784 & 3.5747 \tabularnewline
43 & 0.0707 & -0.0108 & 9e-04 & 1.4132 & 0.1178 & 0.3432 \tabularnewline
44 & 0.0724 & 0.0984 & 0.0082 & 113.3428 & 9.4452 & 3.0733 \tabularnewline
45 & 0.0669 & 0.0568 & 0.0047 & 44.3046 & 3.6921 & 1.9215 \tabularnewline
46 & 0.0799 & 0.032 & 0.0027 & 9.9104 & 0.8259 & 0.9088 \tabularnewline
47 & 0.0742 & 0.0622 & 0.0052 & 43.6297 & 3.6358 & 1.9068 \tabularnewline
48 & 0.0623 & 0.0127 & 0.0011 & 2.5941 & 0.2162 & 0.465 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3055&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.0589[/C][C]0.001[/C][C]1e-04[/C][C]0.0133[/C][C]0.0011[/C][C]0.0333[/C][/ROW]
[ROW][C]38[/C][C]0.0609[/C][C]0.0322[/C][C]0.0027[/C][C]13.9281[/C][C]1.1607[/C][C]1.0773[/C][/ROW]
[ROW][C]39[/C][C]0.0575[/C][C]-0.0562[/C][C]0.0047[/C][C]47.9092[/C][C]3.9924[/C][C]1.9981[/C][/ROW]
[ROW][C]40[/C][C]0.0698[/C][C]0.02[/C][C]0.0017[/C][C]4.7236[/C][C]0.3936[/C][C]0.6274[/C][/ROW]
[ROW][C]41[/C][C]0.0733[/C][C]0.0707[/C][C]0.0059[/C][C]55.1509[/C][C]4.5959[/C][C]2.1438[/C][/ROW]
[ROW][C]42[/C][C]0.0652[/C][C]0.1047[/C][C]0.0087[/C][C]153.3412[/C][C]12.7784[/C][C]3.5747[/C][/ROW]
[ROW][C]43[/C][C]0.0707[/C][C]-0.0108[/C][C]9e-04[/C][C]1.4132[/C][C]0.1178[/C][C]0.3432[/C][/ROW]
[ROW][C]44[/C][C]0.0724[/C][C]0.0984[/C][C]0.0082[/C][C]113.3428[/C][C]9.4452[/C][C]3.0733[/C][/ROW]
[ROW][C]45[/C][C]0.0669[/C][C]0.0568[/C][C]0.0047[/C][C]44.3046[/C][C]3.6921[/C][C]1.9215[/C][/ROW]
[ROW][C]46[/C][C]0.0799[/C][C]0.032[/C][C]0.0027[/C][C]9.9104[/C][C]0.8259[/C][C]0.9088[/C][/ROW]
[ROW][C]47[/C][C]0.0742[/C][C]0.0622[/C][C]0.0052[/C][C]43.6297[/C][C]3.6358[/C][C]1.9068[/C][/ROW]
[ROW][C]48[/C][C]0.0623[/C][C]0.0127[/C][C]0.0011[/C][C]2.5941[/C][C]0.2162[/C][C]0.465[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3055&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3055&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.05890.0011e-040.01330.00110.0333
380.06090.03220.002713.92811.16071.0773
390.0575-0.05620.004747.90923.99241.9981
400.06980.020.00174.72360.39360.6274
410.07330.07070.005955.15094.59592.1438
420.06520.10470.0087153.341212.77843.5747
430.0707-0.01089e-041.41320.11780.3432
440.07240.09840.0082113.34289.44523.0733
450.06690.05680.004744.30463.69211.9215
460.07990.0320.00279.91040.82590.9088
470.07420.06220.005243.62973.63581.9068
480.06230.01270.00112.59410.21620.465



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