Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 14:00:36 -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/13/t1197578768lvwfamt7tbi0a8q.htm/, Retrieved Sun, 05 May 2024 08:54:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3728, Retrieved Sun, 05 May 2024 08:54:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact193
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasting...] [2007-12-13 21:00:36] [757ef2b8266f339cc1cb96dcaefa4cf0] [Current]
Feedback Forum

Post a new message
Dataseries X:
98,8
100,5
110,4
96,4
101,9
106,2
81,0
94,7
101,0
109,4
102,3
90,7
96,2
96,1
106,0
103,1
102,0
104,7
86,0
92,1
106,9
112,6
101,7
92,0
97,4
97,0
105,4
102,7
98,1
104,5
87,4
89,9
109,8
111,7
98,6
96,9
95,1
97,0
112,7
102,9
97,4
111,4
87,4
96,8
114,1
110,3
103,9
101,6
94,6
95,9
104,7
102,8
98,1
113,9
80,9
95,7
113,2
105,9
108,8
102,3
99,0
100,7
115,5
100,7
109,9
114,6
85,4
100,5
114,8
116,5
112,9
102,0
106,0
105,3
118,8
106,1
109,3
117,2
91,9
103,9
115,9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 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=3728&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]3 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=3728&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3728&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 time3 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[69])
57113.2-------
58105.9-------
59108.8-------
60102.3-------
6199-------
62100.7-------
63115.5-------
64100.7-------
65109.9-------
66114.6-------
6785.4-------
68100.5-------
69114.8-------
70116.5108.7308101.4543116.00730.01820.0510.77710.051
71112.9110.7577103.4701118.04530.28220.06120.70070.1385
72102103.549295.9682111.13030.34440.00780.62660.0018
73106100.465892.5474108.38410.08540.35210.64162e-04
74105.3101.650893.7256109.57590.18340.1410.59296e-04
75118.8116.2958108.2559124.33560.27080.99630.57690.6423
76106.1101.432993.3524109.51340.128800.57056e-04
77109.3110.4143102.3211118.50750.39360.85190.54960.1441
78117.2115.0549106.9338123.1760.30230.91760.54370.5245
7991.985.774377.644893.90390.069900.5360
80103.9100.786492.6502108.92250.22660.98390.52754e-04
81115.9115.0478106.9053123.19030.41870.99640.52380.5238

\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[69]) \tabularnewline
57 & 113.2 & - & - & - & - & - & - & - \tabularnewline
58 & 105.9 & - & - & - & - & - & - & - \tabularnewline
59 & 108.8 & - & - & - & - & - & - & - \tabularnewline
60 & 102.3 & - & - & - & - & - & - & - \tabularnewline
61 & 99 & - & - & - & - & - & - & - \tabularnewline
62 & 100.7 & - & - & - & - & - & - & - \tabularnewline
63 & 115.5 & - & - & - & - & - & - & - \tabularnewline
64 & 100.7 & - & - & - & - & - & - & - \tabularnewline
65 & 109.9 & - & - & - & - & - & - & - \tabularnewline
66 & 114.6 & - & - & - & - & - & - & - \tabularnewline
67 & 85.4 & - & - & - & - & - & - & - \tabularnewline
68 & 100.5 & - & - & - & - & - & - & - \tabularnewline
69 & 114.8 & - & - & - & - & - & - & - \tabularnewline
70 & 116.5 & 108.7308 & 101.4543 & 116.0073 & 0.0182 & 0.051 & 0.7771 & 0.051 \tabularnewline
71 & 112.9 & 110.7577 & 103.4701 & 118.0453 & 0.2822 & 0.0612 & 0.7007 & 0.1385 \tabularnewline
72 & 102 & 103.5492 & 95.9682 & 111.1303 & 0.3444 & 0.0078 & 0.6266 & 0.0018 \tabularnewline
73 & 106 & 100.4658 & 92.5474 & 108.3841 & 0.0854 & 0.3521 & 0.6416 & 2e-04 \tabularnewline
74 & 105.3 & 101.6508 & 93.7256 & 109.5759 & 0.1834 & 0.141 & 0.5929 & 6e-04 \tabularnewline
75 & 118.8 & 116.2958 & 108.2559 & 124.3356 & 0.2708 & 0.9963 & 0.5769 & 0.6423 \tabularnewline
76 & 106.1 & 101.4329 & 93.3524 & 109.5134 & 0.1288 & 0 & 0.5705 & 6e-04 \tabularnewline
77 & 109.3 & 110.4143 & 102.3211 & 118.5075 & 0.3936 & 0.8519 & 0.5496 & 0.1441 \tabularnewline
78 & 117.2 & 115.0549 & 106.9338 & 123.176 & 0.3023 & 0.9176 & 0.5437 & 0.5245 \tabularnewline
79 & 91.9 & 85.7743 & 77.6448 & 93.9039 & 0.0699 & 0 & 0.536 & 0 \tabularnewline
80 & 103.9 & 100.7864 & 92.6502 & 108.9225 & 0.2266 & 0.9839 & 0.5275 & 4e-04 \tabularnewline
81 & 115.9 & 115.0478 & 106.9053 & 123.1903 & 0.4187 & 0.9964 & 0.5238 & 0.5238 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3728&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[69])[/C][/ROW]
[ROW][C]57[/C][C]113.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]105.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]108.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]102.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]100.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]115.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]100.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]109.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]114.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]85.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]100.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]114.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]116.5[/C][C]108.7308[/C][C]101.4543[/C][C]116.0073[/C][C]0.0182[/C][C]0.051[/C][C]0.7771[/C][C]0.051[/C][/ROW]
[ROW][C]71[/C][C]112.9[/C][C]110.7577[/C][C]103.4701[/C][C]118.0453[/C][C]0.2822[/C][C]0.0612[/C][C]0.7007[/C][C]0.1385[/C][/ROW]
[ROW][C]72[/C][C]102[/C][C]103.5492[/C][C]95.9682[/C][C]111.1303[/C][C]0.3444[/C][C]0.0078[/C][C]0.6266[/C][C]0.0018[/C][/ROW]
[ROW][C]73[/C][C]106[/C][C]100.4658[/C][C]92.5474[/C][C]108.3841[/C][C]0.0854[/C][C]0.3521[/C][C]0.6416[/C][C]2e-04[/C][/ROW]
[ROW][C]74[/C][C]105.3[/C][C]101.6508[/C][C]93.7256[/C][C]109.5759[/C][C]0.1834[/C][C]0.141[/C][C]0.5929[/C][C]6e-04[/C][/ROW]
[ROW][C]75[/C][C]118.8[/C][C]116.2958[/C][C]108.2559[/C][C]124.3356[/C][C]0.2708[/C][C]0.9963[/C][C]0.5769[/C][C]0.6423[/C][/ROW]
[ROW][C]76[/C][C]106.1[/C][C]101.4329[/C][C]93.3524[/C][C]109.5134[/C][C]0.1288[/C][C]0[/C][C]0.5705[/C][C]6e-04[/C][/ROW]
[ROW][C]77[/C][C]109.3[/C][C]110.4143[/C][C]102.3211[/C][C]118.5075[/C][C]0.3936[/C][C]0.8519[/C][C]0.5496[/C][C]0.1441[/C][/ROW]
[ROW][C]78[/C][C]117.2[/C][C]115.0549[/C][C]106.9338[/C][C]123.176[/C][C]0.3023[/C][C]0.9176[/C][C]0.5437[/C][C]0.5245[/C][/ROW]
[ROW][C]79[/C][C]91.9[/C][C]85.7743[/C][C]77.6448[/C][C]93.9039[/C][C]0.0699[/C][C]0[/C][C]0.536[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]103.9[/C][C]100.7864[/C][C]92.6502[/C][C]108.9225[/C][C]0.2266[/C][C]0.9839[/C][C]0.5275[/C][C]4e-04[/C][/ROW]
[ROW][C]81[/C][C]115.9[/C][C]115.0478[/C][C]106.9053[/C][C]123.1903[/C][C]0.4187[/C][C]0.9964[/C][C]0.5238[/C][C]0.5238[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3728&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3728&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[69])
57113.2-------
58105.9-------
59108.8-------
60102.3-------
6199-------
62100.7-------
63115.5-------
64100.7-------
65109.9-------
66114.6-------
6785.4-------
68100.5-------
69114.8-------
70116.5108.7308101.4543116.00730.01820.0510.77710.051
71112.9110.7577103.4701118.04530.28220.06120.70070.1385
72102103.549295.9682111.13030.34440.00780.62660.0018
73106100.465892.5474108.38410.08540.35210.64162e-04
74105.3101.650893.7256109.57590.18340.1410.59296e-04
75118.8116.2958108.2559124.33560.27080.99630.57690.6423
76106.1101.432993.3524109.51340.128800.57056e-04
77109.3110.4143102.3211118.50750.39360.85190.54960.1441
78117.2115.0549106.9338123.1760.30230.91760.54370.5245
7991.985.774377.644893.90390.069900.5360
80103.9100.786492.6502108.92250.22660.98390.52754e-04
81115.9115.0478106.9053123.19030.41870.99640.52380.5238







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.03410.07150.00660.36065.03012.2428
710.03360.01930.00164.58950.38250.6184
720.0374-0.0150.00122.40010.20.4472
730.04020.05510.004630.62772.55231.5976
740.03980.03590.00313.31691.10971.0534
750.03530.02150.00186.27120.52260.7229
760.04060.0460.003821.7821.81521.3473
770.0374-0.01018e-041.24160.10350.3217
780.0360.01860.00164.60150.38350.6192
790.04840.07140.00637.52363.1271.7683
800.04120.03090.00269.69480.80790.8988
810.03610.00746e-040.72630.06050.246

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.0341 & 0.0715 & 0.006 & 60.3606 & 5.0301 & 2.2428 \tabularnewline
71 & 0.0336 & 0.0193 & 0.0016 & 4.5895 & 0.3825 & 0.6184 \tabularnewline
72 & 0.0374 & -0.015 & 0.0012 & 2.4001 & 0.2 & 0.4472 \tabularnewline
73 & 0.0402 & 0.0551 & 0.0046 & 30.6277 & 2.5523 & 1.5976 \tabularnewline
74 & 0.0398 & 0.0359 & 0.003 & 13.3169 & 1.1097 & 1.0534 \tabularnewline
75 & 0.0353 & 0.0215 & 0.0018 & 6.2712 & 0.5226 & 0.7229 \tabularnewline
76 & 0.0406 & 0.046 & 0.0038 & 21.782 & 1.8152 & 1.3473 \tabularnewline
77 & 0.0374 & -0.0101 & 8e-04 & 1.2416 & 0.1035 & 0.3217 \tabularnewline
78 & 0.036 & 0.0186 & 0.0016 & 4.6015 & 0.3835 & 0.6192 \tabularnewline
79 & 0.0484 & 0.0714 & 0.006 & 37.5236 & 3.127 & 1.7683 \tabularnewline
80 & 0.0412 & 0.0309 & 0.0026 & 9.6948 & 0.8079 & 0.8988 \tabularnewline
81 & 0.0361 & 0.0074 & 6e-04 & 0.7263 & 0.0605 & 0.246 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3728&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]70[/C][C]0.0341[/C][C]0.0715[/C][C]0.006[/C][C]60.3606[/C][C]5.0301[/C][C]2.2428[/C][/ROW]
[ROW][C]71[/C][C]0.0336[/C][C]0.0193[/C][C]0.0016[/C][C]4.5895[/C][C]0.3825[/C][C]0.6184[/C][/ROW]
[ROW][C]72[/C][C]0.0374[/C][C]-0.015[/C][C]0.0012[/C][C]2.4001[/C][C]0.2[/C][C]0.4472[/C][/ROW]
[ROW][C]73[/C][C]0.0402[/C][C]0.0551[/C][C]0.0046[/C][C]30.6277[/C][C]2.5523[/C][C]1.5976[/C][/ROW]
[ROW][C]74[/C][C]0.0398[/C][C]0.0359[/C][C]0.003[/C][C]13.3169[/C][C]1.1097[/C][C]1.0534[/C][/ROW]
[ROW][C]75[/C][C]0.0353[/C][C]0.0215[/C][C]0.0018[/C][C]6.2712[/C][C]0.5226[/C][C]0.7229[/C][/ROW]
[ROW][C]76[/C][C]0.0406[/C][C]0.046[/C][C]0.0038[/C][C]21.782[/C][C]1.8152[/C][C]1.3473[/C][/ROW]
[ROW][C]77[/C][C]0.0374[/C][C]-0.0101[/C][C]8e-04[/C][C]1.2416[/C][C]0.1035[/C][C]0.3217[/C][/ROW]
[ROW][C]78[/C][C]0.036[/C][C]0.0186[/C][C]0.0016[/C][C]4.6015[/C][C]0.3835[/C][C]0.6192[/C][/ROW]
[ROW][C]79[/C][C]0.0484[/C][C]0.0714[/C][C]0.006[/C][C]37.5236[/C][C]3.127[/C][C]1.7683[/C][/ROW]
[ROW][C]80[/C][C]0.0412[/C][C]0.0309[/C][C]0.0026[/C][C]9.6948[/C][C]0.8079[/C][C]0.8988[/C][/ROW]
[ROW][C]81[/C][C]0.0361[/C][C]0.0074[/C][C]6e-04[/C][C]0.7263[/C][C]0.0605[/C][C]0.246[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3728&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3728&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
700.03410.07150.00660.36065.03012.2428
710.03360.01930.00164.58950.38250.6184
720.0374-0.0150.00122.40010.20.4472
730.04020.05510.004630.62772.55231.5976
740.03980.03590.00313.31691.10971.0534
750.03530.02150.00186.27120.52260.7229
760.04060.0460.003821.7821.81521.3473
770.0374-0.01018e-041.24160.10350.3217
780.0360.01860.00164.60150.38350.6192
790.04840.07140.00637.52363.1271.7683
800.04120.03090.00269.69480.80790.8988
810.03610.00746e-040.72630.06050.246



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