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 06:45:48 -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/t1197552622u5fra670d7s1851.htm/, Retrieved Sun, 05 May 2024 12:30:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3525, Retrieved Sun, 05 May 2024 12:30:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsARIMA Forecasting
Estimated Impact180
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper] [2007-12-13 13:45:48] [8ce1ad2ac57e06e10fb37a1292ae8cb6] [Current]
Feedback Forum

Post a new message
Dataseries X:
98,6
98
106,8
96,6
100,1
107,7
91,5
97,8
107,4
117,5
105,6
97,4
99,5
98
104,3
100,6
101,1
103,9
96,9
95,5
108,4
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
129,6
125,8
119,5
115,7
113,6
129,7
112
116,8
126,3
112,9
115,9




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=3525&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=3525&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3525&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[68])
56107.7-------
57127.3-------
58117.2-------
59119.8-------
60116.2-------
61111-------
62112.4-------
63130.6-------
64109.1-------
65118.8-------
66123.9-------
67101.6-------
68112.8-------
69128134.5354153.2455120.36120.81690.00130.15850.0013
70129.6124.5538140.4628112.25840.78940.70860.12050.0305
71125.8122.97138.575110.89170.6770.8590.30350.0494
72119.5123.5086141.8676109.8290.71710.62870.14750.0625
73115.7109.0658122.896498.35920.88770.97190.63840.7529
74113.6113.1794128.5776101.45250.5280.66320.44820.4747
75129.7131.923155.7824115.07650.6020.01650.43880.013
76112111.023126.725999.1760.56420.9990.37520.6156
77116.8114.5794131.7943101.78730.63320.34630.74110.3926
78126.3129.1572153.0365112.40640.63090.07410.26920.0278
79112.9107.0969122.115795.74220.84180.99950.17130.8376
80115.9113.9547131.6793100.90230.61490.43710.43120.4312

\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 & 107.7 & - & - & - & - & - & - & - \tabularnewline
57 & 127.3 & - & - & - & - & - & - & - \tabularnewline
58 & 117.2 & - & - & - & - & - & - & - \tabularnewline
59 & 119.8 & - & - & - & - & - & - & - \tabularnewline
60 & 116.2 & - & - & - & - & - & - & - \tabularnewline
61 & 111 & - & - & - & - & - & - & - \tabularnewline
62 & 112.4 & - & - & - & - & - & - & - \tabularnewline
63 & 130.6 & - & - & - & - & - & - & - \tabularnewline
64 & 109.1 & - & - & - & - & - & - & - \tabularnewline
65 & 118.8 & - & - & - & - & - & - & - \tabularnewline
66 & 123.9 & - & - & - & - & - & - & - \tabularnewline
67 & 101.6 & - & - & - & - & - & - & - \tabularnewline
68 & 112.8 & - & - & - & - & - & - & - \tabularnewline
69 & 128 & 134.5354 & 153.2455 & 120.3612 & 0.8169 & 0.0013 & 0.1585 & 0.0013 \tabularnewline
70 & 129.6 & 124.5538 & 140.4628 & 112.2584 & 0.7894 & 0.7086 & 0.1205 & 0.0305 \tabularnewline
71 & 125.8 & 122.97 & 138.575 & 110.8917 & 0.677 & 0.859 & 0.3035 & 0.0494 \tabularnewline
72 & 119.5 & 123.5086 & 141.8676 & 109.829 & 0.7171 & 0.6287 & 0.1475 & 0.0625 \tabularnewline
73 & 115.7 & 109.0658 & 122.8964 & 98.3592 & 0.8877 & 0.9719 & 0.6384 & 0.7529 \tabularnewline
74 & 113.6 & 113.1794 & 128.5776 & 101.4525 & 0.528 & 0.6632 & 0.4482 & 0.4747 \tabularnewline
75 & 129.7 & 131.923 & 155.7824 & 115.0765 & 0.602 & 0.0165 & 0.4388 & 0.013 \tabularnewline
76 & 112 & 111.023 & 126.7259 & 99.176 & 0.5642 & 0.999 & 0.3752 & 0.6156 \tabularnewline
77 & 116.8 & 114.5794 & 131.7943 & 101.7873 & 0.6332 & 0.3463 & 0.7411 & 0.3926 \tabularnewline
78 & 126.3 & 129.1572 & 153.0365 & 112.4064 & 0.6309 & 0.0741 & 0.2692 & 0.0278 \tabularnewline
79 & 112.9 & 107.0969 & 122.1157 & 95.7422 & 0.8418 & 0.9995 & 0.1713 & 0.8376 \tabularnewline
80 & 115.9 & 113.9547 & 131.6793 & 100.9023 & 0.6149 & 0.4371 & 0.4312 & 0.4312 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3525&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]107.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]127.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]101.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]128[/C][C]134.5354[/C][C]153.2455[/C][C]120.3612[/C][C]0.8169[/C][C]0.0013[/C][C]0.1585[/C][C]0.0013[/C][/ROW]
[ROW][C]70[/C][C]129.6[/C][C]124.5538[/C][C]140.4628[/C][C]112.2584[/C][C]0.7894[/C][C]0.7086[/C][C]0.1205[/C][C]0.0305[/C][/ROW]
[ROW][C]71[/C][C]125.8[/C][C]122.97[/C][C]138.575[/C][C]110.8917[/C][C]0.677[/C][C]0.859[/C][C]0.3035[/C][C]0.0494[/C][/ROW]
[ROW][C]72[/C][C]119.5[/C][C]123.5086[/C][C]141.8676[/C][C]109.829[/C][C]0.7171[/C][C]0.6287[/C][C]0.1475[/C][C]0.0625[/C][/ROW]
[ROW][C]73[/C][C]115.7[/C][C]109.0658[/C][C]122.8964[/C][C]98.3592[/C][C]0.8877[/C][C]0.9719[/C][C]0.6384[/C][C]0.7529[/C][/ROW]
[ROW][C]74[/C][C]113.6[/C][C]113.1794[/C][C]128.5776[/C][C]101.4525[/C][C]0.528[/C][C]0.6632[/C][C]0.4482[/C][C]0.4747[/C][/ROW]
[ROW][C]75[/C][C]129.7[/C][C]131.923[/C][C]155.7824[/C][C]115.0765[/C][C]0.602[/C][C]0.0165[/C][C]0.4388[/C][C]0.013[/C][/ROW]
[ROW][C]76[/C][C]112[/C][C]111.023[/C][C]126.7259[/C][C]99.176[/C][C]0.5642[/C][C]0.999[/C][C]0.3752[/C][C]0.6156[/C][/ROW]
[ROW][C]77[/C][C]116.8[/C][C]114.5794[/C][C]131.7943[/C][C]101.7873[/C][C]0.6332[/C][C]0.3463[/C][C]0.7411[/C][C]0.3926[/C][/ROW]
[ROW][C]78[/C][C]126.3[/C][C]129.1572[/C][C]153.0365[/C][C]112.4064[/C][C]0.6309[/C][C]0.0741[/C][C]0.2692[/C][C]0.0278[/C][/ROW]
[ROW][C]79[/C][C]112.9[/C][C]107.0969[/C][C]122.1157[/C][C]95.7422[/C][C]0.8418[/C][C]0.9995[/C][C]0.1713[/C][C]0.8376[/C][/ROW]
[ROW][C]80[/C][C]115.9[/C][C]113.9547[/C][C]131.6793[/C][C]100.9023[/C][C]0.6149[/C][C]0.4371[/C][C]0.4312[/C][C]0.4312[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3525&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3525&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])
56107.7-------
57127.3-------
58117.2-------
59119.8-------
60116.2-------
61111-------
62112.4-------
63130.6-------
64109.1-------
65118.8-------
66123.9-------
67101.6-------
68112.8-------
69128134.5354153.2455120.36120.81690.00130.15850.0013
70129.6124.5538140.4628112.25840.78940.70860.12050.0305
71125.8122.97138.575110.89170.6770.8590.30350.0494
72119.5123.5086141.8676109.8290.71710.62870.14750.0625
73115.7109.0658122.896498.35920.88770.97190.63840.7529
74113.6113.1794128.5776101.45250.5280.66320.44820.4747
75129.7131.923155.7824115.07650.6020.01650.43880.013
76112111.023126.725999.1760.56420.9990.37520.6156
77116.8114.5794131.7943101.78730.63320.34630.74110.3926
78126.3129.1572153.0365112.40640.63090.07410.26920.0278
79112.9107.0969122.115795.74220.84180.99950.17130.8376
80115.9113.9547131.6793100.90230.61490.43710.43120.4312







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
69-0.0538-0.04860.00442.71133.55931.8866
70-0.05040.04050.003425.4642.1221.4567
71-0.05010.0230.00198.0090.66740.817
72-0.0565-0.03250.002716.06911.33911.1572
73-0.05010.06080.005144.01273.66771.9151
74-0.05290.00373e-040.17690.01470.1214
75-0.0652-0.01690.00144.94170.41180.6417
76-0.05440.00887e-040.95450.07950.282
77-0.0570.01940.00164.93120.41090.641
78-0.0662-0.02210.00188.16360.68030.8248
79-0.05410.05420.004533.67632.80641.6752
80-0.05840.01710.00143.7840.31530.5615

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & -0.0538 & -0.0486 & 0.004 & 42.7113 & 3.5593 & 1.8866 \tabularnewline
70 & -0.0504 & 0.0405 & 0.0034 & 25.464 & 2.122 & 1.4567 \tabularnewline
71 & -0.0501 & 0.023 & 0.0019 & 8.009 & 0.6674 & 0.817 \tabularnewline
72 & -0.0565 & -0.0325 & 0.0027 & 16.0691 & 1.3391 & 1.1572 \tabularnewline
73 & -0.0501 & 0.0608 & 0.0051 & 44.0127 & 3.6677 & 1.9151 \tabularnewline
74 & -0.0529 & 0.0037 & 3e-04 & 0.1769 & 0.0147 & 0.1214 \tabularnewline
75 & -0.0652 & -0.0169 & 0.0014 & 4.9417 & 0.4118 & 0.6417 \tabularnewline
76 & -0.0544 & 0.0088 & 7e-04 & 0.9545 & 0.0795 & 0.282 \tabularnewline
77 & -0.057 & 0.0194 & 0.0016 & 4.9312 & 0.4109 & 0.641 \tabularnewline
78 & -0.0662 & -0.0221 & 0.0018 & 8.1636 & 0.6803 & 0.8248 \tabularnewline
79 & -0.0541 & 0.0542 & 0.0045 & 33.6763 & 2.8064 & 1.6752 \tabularnewline
80 & -0.0584 & 0.0171 & 0.0014 & 3.784 & 0.3153 & 0.5615 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3525&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.0538[/C][C]-0.0486[/C][C]0.004[/C][C]42.7113[/C][C]3.5593[/C][C]1.8866[/C][/ROW]
[ROW][C]70[/C][C]-0.0504[/C][C]0.0405[/C][C]0.0034[/C][C]25.464[/C][C]2.122[/C][C]1.4567[/C][/ROW]
[ROW][C]71[/C][C]-0.0501[/C][C]0.023[/C][C]0.0019[/C][C]8.009[/C][C]0.6674[/C][C]0.817[/C][/ROW]
[ROW][C]72[/C][C]-0.0565[/C][C]-0.0325[/C][C]0.0027[/C][C]16.0691[/C][C]1.3391[/C][C]1.1572[/C][/ROW]
[ROW][C]73[/C][C]-0.0501[/C][C]0.0608[/C][C]0.0051[/C][C]44.0127[/C][C]3.6677[/C][C]1.9151[/C][/ROW]
[ROW][C]74[/C][C]-0.0529[/C][C]0.0037[/C][C]3e-04[/C][C]0.1769[/C][C]0.0147[/C][C]0.1214[/C][/ROW]
[ROW][C]75[/C][C]-0.0652[/C][C]-0.0169[/C][C]0.0014[/C][C]4.9417[/C][C]0.4118[/C][C]0.6417[/C][/ROW]
[ROW][C]76[/C][C]-0.0544[/C][C]0.0088[/C][C]7e-04[/C][C]0.9545[/C][C]0.0795[/C][C]0.282[/C][/ROW]
[ROW][C]77[/C][C]-0.057[/C][C]0.0194[/C][C]0.0016[/C][C]4.9312[/C][C]0.4109[/C][C]0.641[/C][/ROW]
[ROW][C]78[/C][C]-0.0662[/C][C]-0.0221[/C][C]0.0018[/C][C]8.1636[/C][C]0.6803[/C][C]0.8248[/C][/ROW]
[ROW][C]79[/C][C]-0.0541[/C][C]0.0542[/C][C]0.0045[/C][C]33.6763[/C][C]2.8064[/C][C]1.6752[/C][/ROW]
[ROW][C]80[/C][C]-0.0584[/C][C]0.0171[/C][C]0.0014[/C][C]3.784[/C][C]0.3153[/C][C]0.5615[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3525&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3525&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
69-0.0538-0.04860.00442.71133.55931.8866
70-0.05040.04050.003425.4642.1221.4567
71-0.05010.0230.00198.0090.66740.817
72-0.0565-0.03250.002716.06911.33911.1572
73-0.05010.06080.005144.01273.66771.9151
74-0.05290.00373e-040.17690.01470.1214
75-0.0652-0.01690.00144.94170.41180.6417
76-0.05440.00887e-040.95450.07950.282
77-0.0570.01940.00164.93120.41090.641
78-0.0662-0.02210.00188.16360.68030.8248
79-0.05410.05420.004533.67632.80641.6752
80-0.05840.01710.00143.7840.31530.5615



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