Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 18 Dec 2009 10:50:14 -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/2009/Dec/18/t1261158703cqygzi4ssi3qcbs.htm/, Retrieved Sat, 27 Apr 2024 07:03:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69437, Retrieved Sat, 27 Apr 2024 07:03:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact135
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-   P         [ARIMA Forecasting] [workshop 10] [2009-12-18 17:50:14] [6c94b261890ba36343a04d1029691995] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.01
103.84
104.48
95.43
104.80
108.64
105.65
108.42
115.35
113.64
115.24
100.33
101.29
104.48
99.26
100.11
103.52
101.18
96.39
97.56
96.39
85.10
79.77
79.13
80.84
82.75
92.55
96.60
96.92
95.32
98.52
100.22
104.91
103.10
97.13
103.42
111.72
118.11
111.62
100.22
102.03
105.76
107.68
110.77
105.44
112.26
114.07
117.90
124.72
126.42
134.73
135.79
143.36
140.37
144.74
151.98
150.92
163.38
154.43
146.66
157.95
162.10
180.42
179.57
171.58
185.43
190.64
203.00
202.36
193.41
186.17
192.24
209.60
206.41
209.82
230.37
235.80
232.07
244.64
242.19
217.48
209.39
211.73
221.00
203.11
214.71
224.19
238.04
238.36
246.24
259.87
249.97
266.48
282.98
306.31
301.73
314.62
332.62
355.51
370.32
408.13
433.58
440.51
386.29
342.84
254.97
203.42
170.09
174.03
167.85
177.01
188.19
211.20
240.91
230.26
251.25
241.66




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69437&T=0

[TABLE]
[ROW][C]Summary of computational 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]2 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=69437&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69437&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 computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97334.4646312.7743356.15500.224610.2246
107203.42344.5283306.931382.1255010.97680.5351
108170.09356.3659307.0342405.6975010.9850.7045
109174.03363.1492305.6192420.6791010.95090.7555
110167.85365.9171301.9046429.9295010.8460.7601
111177.01367.5691297.6716437.4667010.63240.756
112188.19369.7825294.1368445.4283010.49440.7574
113211.2372.7501291.4327454.0674010.19690.7645
114240.91376.0526289.1977462.90740.00110.99990.09710.7732
115230.26379.337287.1112471.56278e-040.99840.09680.781
116251.25382.4982285.054479.94240.00410.99890.46960.7875
117241.66385.5806283.0369488.12430.0030.99490.7930.793

\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[105]) \tabularnewline
93 & 266.48 & - & - & - & - & - & - & - \tabularnewline
94 & 282.98 & - & - & - & - & - & - & - \tabularnewline
95 & 306.31 & - & - & - & - & - & - & - \tabularnewline
96 & 301.73 & - & - & - & - & - & - & - \tabularnewline
97 & 314.62 & - & - & - & - & - & - & - \tabularnewline
98 & 332.62 & - & - & - & - & - & - & - \tabularnewline
99 & 355.51 & - & - & - & - & - & - & - \tabularnewline
100 & 370.32 & - & - & - & - & - & - & - \tabularnewline
101 & 408.13 & - & - & - & - & - & - & - \tabularnewline
102 & 433.58 & - & - & - & - & - & - & - \tabularnewline
103 & 440.51 & - & - & - & - & - & - & - \tabularnewline
104 & 386.29 & - & - & - & - & - & - & - \tabularnewline
105 & 342.84 & - & - & - & - & - & - & - \tabularnewline
106 & 254.97 & 334.4646 & 312.7743 & 356.155 & 0 & 0.2246 & 1 & 0.2246 \tabularnewline
107 & 203.42 & 344.5283 & 306.931 & 382.1255 & 0 & 1 & 0.9768 & 0.5351 \tabularnewline
108 & 170.09 & 356.3659 & 307.0342 & 405.6975 & 0 & 1 & 0.985 & 0.7045 \tabularnewline
109 & 174.03 & 363.1492 & 305.6192 & 420.6791 & 0 & 1 & 0.9509 & 0.7555 \tabularnewline
110 & 167.85 & 365.9171 & 301.9046 & 429.9295 & 0 & 1 & 0.846 & 0.7601 \tabularnewline
111 & 177.01 & 367.5691 & 297.6716 & 437.4667 & 0 & 1 & 0.6324 & 0.756 \tabularnewline
112 & 188.19 & 369.7825 & 294.1368 & 445.4283 & 0 & 1 & 0.4944 & 0.7574 \tabularnewline
113 & 211.2 & 372.7501 & 291.4327 & 454.0674 & 0 & 1 & 0.1969 & 0.7645 \tabularnewline
114 & 240.91 & 376.0526 & 289.1977 & 462.9074 & 0.0011 & 0.9999 & 0.0971 & 0.7732 \tabularnewline
115 & 230.26 & 379.337 & 287.1112 & 471.5627 & 8e-04 & 0.9984 & 0.0968 & 0.781 \tabularnewline
116 & 251.25 & 382.4982 & 285.054 & 479.9424 & 0.0041 & 0.9989 & 0.4696 & 0.7875 \tabularnewline
117 & 241.66 & 385.5806 & 283.0369 & 488.1243 & 0.003 & 0.9949 & 0.793 & 0.793 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69437&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[105])[/C][/ROW]
[ROW][C]93[/C][C]266.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]282.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]306.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]301.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]314.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]332.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]355.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]370.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]408.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]433.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]440.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]386.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]342.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]254.97[/C][C]334.4646[/C][C]312.7743[/C][C]356.155[/C][C]0[/C][C]0.2246[/C][C]1[/C][C]0.2246[/C][/ROW]
[ROW][C]107[/C][C]203.42[/C][C]344.5283[/C][C]306.931[/C][C]382.1255[/C][C]0[/C][C]1[/C][C]0.9768[/C][C]0.5351[/C][/ROW]
[ROW][C]108[/C][C]170.09[/C][C]356.3659[/C][C]307.0342[/C][C]405.6975[/C][C]0[/C][C]1[/C][C]0.985[/C][C]0.7045[/C][/ROW]
[ROW][C]109[/C][C]174.03[/C][C]363.1492[/C][C]305.6192[/C][C]420.6791[/C][C]0[/C][C]1[/C][C]0.9509[/C][C]0.7555[/C][/ROW]
[ROW][C]110[/C][C]167.85[/C][C]365.9171[/C][C]301.9046[/C][C]429.9295[/C][C]0[/C][C]1[/C][C]0.846[/C][C]0.7601[/C][/ROW]
[ROW][C]111[/C][C]177.01[/C][C]367.5691[/C][C]297.6716[/C][C]437.4667[/C][C]0[/C][C]1[/C][C]0.6324[/C][C]0.756[/C][/ROW]
[ROW][C]112[/C][C]188.19[/C][C]369.7825[/C][C]294.1368[/C][C]445.4283[/C][C]0[/C][C]1[/C][C]0.4944[/C][C]0.7574[/C][/ROW]
[ROW][C]113[/C][C]211.2[/C][C]372.7501[/C][C]291.4327[/C][C]454.0674[/C][C]0[/C][C]1[/C][C]0.1969[/C][C]0.7645[/C][/ROW]
[ROW][C]114[/C][C]240.91[/C][C]376.0526[/C][C]289.1977[/C][C]462.9074[/C][C]0.0011[/C][C]0.9999[/C][C]0.0971[/C][C]0.7732[/C][/ROW]
[ROW][C]115[/C][C]230.26[/C][C]379.337[/C][C]287.1112[/C][C]471.5627[/C][C]8e-04[/C][C]0.9984[/C][C]0.0968[/C][C]0.781[/C][/ROW]
[ROW][C]116[/C][C]251.25[/C][C]382.4982[/C][C]285.054[/C][C]479.9424[/C][C]0.0041[/C][C]0.9989[/C][C]0.4696[/C][C]0.7875[/C][/ROW]
[ROW][C]117[/C][C]241.66[/C][C]385.5806[/C][C]283.0369[/C][C]488.1243[/C][C]0.003[/C][C]0.9949[/C][C]0.793[/C][C]0.793[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69437&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69437&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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97334.4646312.7743356.15500.224610.2246
107203.42344.5283306.931382.1255010.97680.5351
108170.09356.3659307.0342405.6975010.9850.7045
109174.03363.1492305.6192420.6791010.95090.7555
110167.85365.9171301.9046429.9295010.8460.7601
111177.01367.5691297.6716437.4667010.63240.756
112188.19369.7825294.1368445.4283010.49440.7574
113211.2372.7501291.4327454.0674010.19690.7645
114240.91376.0526289.1977462.90740.00110.99990.09710.7732
115230.26379.337287.1112471.56278e-040.99840.09680.781
116251.25382.4982285.054479.94240.00410.99890.46960.7875
117241.66385.5806283.0369488.12430.0030.99490.7930.793







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.0331-0.23770.01986319.3959526.616322.9481
1070.0557-0.40960.034119911.54461659.295440.7344
1080.0706-0.52270.043634698.69722891.558153.7732
1090.0808-0.52080.043435766.05652980.504754.594
1100.0893-0.54130.045139230.5673269.213957.177
1110.097-0.51840.043236312.78793026.065755.0097
1120.1044-0.49110.040932975.85272747.987752.4213
1130.1113-0.43340.036126098.42112174.868446.6355
1140.1178-0.35940.029918263.51711521.959839.0123
1150.124-0.3930.032722223.93811851.994843.0348
1160.13-0.34310.028617226.09581435.50837.8881
1170.1357-0.37330.031120713.13681726.094741.5463

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.0331 & -0.2377 & 0.0198 & 6319.3959 & 526.6163 & 22.9481 \tabularnewline
107 & 0.0557 & -0.4096 & 0.0341 & 19911.5446 & 1659.2954 & 40.7344 \tabularnewline
108 & 0.0706 & -0.5227 & 0.0436 & 34698.6972 & 2891.5581 & 53.7732 \tabularnewline
109 & 0.0808 & -0.5208 & 0.0434 & 35766.0565 & 2980.5047 & 54.594 \tabularnewline
110 & 0.0893 & -0.5413 & 0.0451 & 39230.567 & 3269.2139 & 57.177 \tabularnewline
111 & 0.097 & -0.5184 & 0.0432 & 36312.7879 & 3026.0657 & 55.0097 \tabularnewline
112 & 0.1044 & -0.4911 & 0.0409 & 32975.8527 & 2747.9877 & 52.4213 \tabularnewline
113 & 0.1113 & -0.4334 & 0.0361 & 26098.4211 & 2174.8684 & 46.6355 \tabularnewline
114 & 0.1178 & -0.3594 & 0.0299 & 18263.5171 & 1521.9598 & 39.0123 \tabularnewline
115 & 0.124 & -0.393 & 0.0327 & 22223.9381 & 1851.9948 & 43.0348 \tabularnewline
116 & 0.13 & -0.3431 & 0.0286 & 17226.0958 & 1435.508 & 37.8881 \tabularnewline
117 & 0.1357 & -0.3733 & 0.0311 & 20713.1368 & 1726.0947 & 41.5463 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69437&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]106[/C][C]0.0331[/C][C]-0.2377[/C][C]0.0198[/C][C]6319.3959[/C][C]526.6163[/C][C]22.9481[/C][/ROW]
[ROW][C]107[/C][C]0.0557[/C][C]-0.4096[/C][C]0.0341[/C][C]19911.5446[/C][C]1659.2954[/C][C]40.7344[/C][/ROW]
[ROW][C]108[/C][C]0.0706[/C][C]-0.5227[/C][C]0.0436[/C][C]34698.6972[/C][C]2891.5581[/C][C]53.7732[/C][/ROW]
[ROW][C]109[/C][C]0.0808[/C][C]-0.5208[/C][C]0.0434[/C][C]35766.0565[/C][C]2980.5047[/C][C]54.594[/C][/ROW]
[ROW][C]110[/C][C]0.0893[/C][C]-0.5413[/C][C]0.0451[/C][C]39230.567[/C][C]3269.2139[/C][C]57.177[/C][/ROW]
[ROW][C]111[/C][C]0.097[/C][C]-0.5184[/C][C]0.0432[/C][C]36312.7879[/C][C]3026.0657[/C][C]55.0097[/C][/ROW]
[ROW][C]112[/C][C]0.1044[/C][C]-0.4911[/C][C]0.0409[/C][C]32975.8527[/C][C]2747.9877[/C][C]52.4213[/C][/ROW]
[ROW][C]113[/C][C]0.1113[/C][C]-0.4334[/C][C]0.0361[/C][C]26098.4211[/C][C]2174.8684[/C][C]46.6355[/C][/ROW]
[ROW][C]114[/C][C]0.1178[/C][C]-0.3594[/C][C]0.0299[/C][C]18263.5171[/C][C]1521.9598[/C][C]39.0123[/C][/ROW]
[ROW][C]115[/C][C]0.124[/C][C]-0.393[/C][C]0.0327[/C][C]22223.9381[/C][C]1851.9948[/C][C]43.0348[/C][/ROW]
[ROW][C]116[/C][C]0.13[/C][C]-0.3431[/C][C]0.0286[/C][C]17226.0958[/C][C]1435.508[/C][C]37.8881[/C][/ROW]
[ROW][C]117[/C][C]0.1357[/C][C]-0.3733[/C][C]0.0311[/C][C]20713.1368[/C][C]1726.0947[/C][C]41.5463[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69437&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69437&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
1060.0331-0.23770.01986319.3959526.616322.9481
1070.0557-0.40960.034119911.54461659.295440.7344
1080.0706-0.52270.043634698.69722891.558153.7732
1090.0808-0.52080.043435766.05652980.504754.594
1100.0893-0.54130.045139230.5673269.213957.177
1110.097-0.51840.043236312.78793026.065755.0097
1120.1044-0.49110.040932975.85272747.987752.4213
1130.1113-0.43340.036126098.42112174.868446.6355
1140.1178-0.35940.029918263.51711521.959839.0123
1150.124-0.3930.032722223.93811851.994843.0348
1160.13-0.34310.028617226.09581435.50837.8881
1170.1357-0.37330.031120713.13681726.094741.5463



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