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 computationTue, 07 Dec 2010 10:08:07 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/07/t1291716375p1ufctkmxx48q1b.htm/, Retrieved Sat, 04 May 2024 00:59:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106114, Retrieved Sat, 04 May 2024 00:59:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:25:58] [8ef49741e164ec6343c90c7935194465]
-   P         [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:58:46] [8ef49741e164ec6343c90c7935194465]
-                 [ARIMA Forecasting] [WS 9 arima] [2010-12-07 10:08:07] [b47314d83d48c7bf812ec2bcd743b159] [Current]
-   PD              [ARIMA Forecasting] [paper arima forec...] [2010-12-10 12:43:26] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD                [ARIMA Forecasting] [arima forecasting...] [2010-12-22 20:45:09] [8214fe6d084e5ad7598b249a26cc9f06]
-    D                  [ARIMA Forecasting] [arima forecast la...] [2010-12-22 21:48:20] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD                [ARIMA Forecasting] [arima forecasting...] [2010-12-22 22:14:04] [8214fe6d084e5ad7598b249a26cc9f06]
Feedback Forum

Post a new message
Dataseries X:
167.16
179.84
174.44
180.35
193.17
195.16
202.43
189.91
195.98
212.09
205.81
204.31
196.07
199.98
199.1
198.31
195.72
223.04
238.41
259.73
326.54
335.15
321.81
368.62
369.59
425
439.72
362.23
328.76
348.55
328.18
329.34
295.55
237.38
226.85
220.14
239.36
224.69
230.98
233.47
256.7
253.41
224.95
210.37
191.09
198.85
211.04
206.25
201.19
194.37
191.08
192.87
181.61
157.67
196.14
246.35
271.9




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106114&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'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[45])
33295.55-------
34237.38-------
35226.85-------
36220.14-------
37239.36-------
38224.69-------
39230.98-------
40233.47-------
41256.7-------
42253.41-------
43224.95-------
44210.37-------
45191.09-------
46198.85186.3209138.4205234.22140.30410.42260.01830.4226
47211.04186.3209108.6288264.01310.26640.3760.15330.4521
48206.25186.320987.4387285.20310.34640.31210.25130.4623
49201.19186.320970.0484302.59350.4010.36850.18560.468
50194.37186.320954.9401317.70180.45220.41220.28350.4716
51191.08186.320941.3984331.24350.47430.45670.27290.4743
52192.87186.320929.0182343.62370.46750.47640.27840.4763
53181.61186.320917.5436355.09830.47820.46970.20690.4779
54157.67186.32096.801365.84090.37720.52050.23190.4792
55196.14186.3209-3.3341375.97590.45960.61640.34490.4803
56246.35186.3209-12.9543385.59620.27750.46150.40650.4813
57271.9186.3209-22.1311394.7730.21050.28620.48210.4821

\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[45]) \tabularnewline
33 & 295.55 & - & - & - & - & - & - & - \tabularnewline
34 & 237.38 & - & - & - & - & - & - & - \tabularnewline
35 & 226.85 & - & - & - & - & - & - & - \tabularnewline
36 & 220.14 & - & - & - & - & - & - & - \tabularnewline
37 & 239.36 & - & - & - & - & - & - & - \tabularnewline
38 & 224.69 & - & - & - & - & - & - & - \tabularnewline
39 & 230.98 & - & - & - & - & - & - & - \tabularnewline
40 & 233.47 & - & - & - & - & - & - & - \tabularnewline
41 & 256.7 & - & - & - & - & - & - & - \tabularnewline
42 & 253.41 & - & - & - & - & - & - & - \tabularnewline
43 & 224.95 & - & - & - & - & - & - & - \tabularnewline
44 & 210.37 & - & - & - & - & - & - & - \tabularnewline
45 & 191.09 & - & - & - & - & - & - & - \tabularnewline
46 & 198.85 & 186.3209 & 138.4205 & 234.2214 & 0.3041 & 0.4226 & 0.0183 & 0.4226 \tabularnewline
47 & 211.04 & 186.3209 & 108.6288 & 264.0131 & 0.2664 & 0.376 & 0.1533 & 0.4521 \tabularnewline
48 & 206.25 & 186.3209 & 87.4387 & 285.2031 & 0.3464 & 0.3121 & 0.2513 & 0.4623 \tabularnewline
49 & 201.19 & 186.3209 & 70.0484 & 302.5935 & 0.401 & 0.3685 & 0.1856 & 0.468 \tabularnewline
50 & 194.37 & 186.3209 & 54.9401 & 317.7018 & 0.4522 & 0.4122 & 0.2835 & 0.4716 \tabularnewline
51 & 191.08 & 186.3209 & 41.3984 & 331.2435 & 0.4743 & 0.4567 & 0.2729 & 0.4743 \tabularnewline
52 & 192.87 & 186.3209 & 29.0182 & 343.6237 & 0.4675 & 0.4764 & 0.2784 & 0.4763 \tabularnewline
53 & 181.61 & 186.3209 & 17.5436 & 355.0983 & 0.4782 & 0.4697 & 0.2069 & 0.4779 \tabularnewline
54 & 157.67 & 186.3209 & 6.801 & 365.8409 & 0.3772 & 0.5205 & 0.2319 & 0.4792 \tabularnewline
55 & 196.14 & 186.3209 & -3.3341 & 375.9759 & 0.4596 & 0.6164 & 0.3449 & 0.4803 \tabularnewline
56 & 246.35 & 186.3209 & -12.9543 & 385.5962 & 0.2775 & 0.4615 & 0.4065 & 0.4813 \tabularnewline
57 & 271.9 & 186.3209 & -22.1311 & 394.773 & 0.2105 & 0.2862 & 0.4821 & 0.4821 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106114&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[45])[/C][/ROW]
[ROW][C]33[/C][C]295.55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]237.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]226.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]220.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]239.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]224.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]230.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]233.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]256.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]253.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]224.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]210.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]191.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]198.85[/C][C]186.3209[/C][C]138.4205[/C][C]234.2214[/C][C]0.3041[/C][C]0.4226[/C][C]0.0183[/C][C]0.4226[/C][/ROW]
[ROW][C]47[/C][C]211.04[/C][C]186.3209[/C][C]108.6288[/C][C]264.0131[/C][C]0.2664[/C][C]0.376[/C][C]0.1533[/C][C]0.4521[/C][/ROW]
[ROW][C]48[/C][C]206.25[/C][C]186.3209[/C][C]87.4387[/C][C]285.2031[/C][C]0.3464[/C][C]0.3121[/C][C]0.2513[/C][C]0.4623[/C][/ROW]
[ROW][C]49[/C][C]201.19[/C][C]186.3209[/C][C]70.0484[/C][C]302.5935[/C][C]0.401[/C][C]0.3685[/C][C]0.1856[/C][C]0.468[/C][/ROW]
[ROW][C]50[/C][C]194.37[/C][C]186.3209[/C][C]54.9401[/C][C]317.7018[/C][C]0.4522[/C][C]0.4122[/C][C]0.2835[/C][C]0.4716[/C][/ROW]
[ROW][C]51[/C][C]191.08[/C][C]186.3209[/C][C]41.3984[/C][C]331.2435[/C][C]0.4743[/C][C]0.4567[/C][C]0.2729[/C][C]0.4743[/C][/ROW]
[ROW][C]52[/C][C]192.87[/C][C]186.3209[/C][C]29.0182[/C][C]343.6237[/C][C]0.4675[/C][C]0.4764[/C][C]0.2784[/C][C]0.4763[/C][/ROW]
[ROW][C]53[/C][C]181.61[/C][C]186.3209[/C][C]17.5436[/C][C]355.0983[/C][C]0.4782[/C][C]0.4697[/C][C]0.2069[/C][C]0.4779[/C][/ROW]
[ROW][C]54[/C][C]157.67[/C][C]186.3209[/C][C]6.801[/C][C]365.8409[/C][C]0.3772[/C][C]0.5205[/C][C]0.2319[/C][C]0.4792[/C][/ROW]
[ROW][C]55[/C][C]196.14[/C][C]186.3209[/C][C]-3.3341[/C][C]375.9759[/C][C]0.4596[/C][C]0.6164[/C][C]0.3449[/C][C]0.4803[/C][/ROW]
[ROW][C]56[/C][C]246.35[/C][C]186.3209[/C][C]-12.9543[/C][C]385.5962[/C][C]0.2775[/C][C]0.4615[/C][C]0.4065[/C][C]0.4813[/C][/ROW]
[ROW][C]57[/C][C]271.9[/C][C]186.3209[/C][C]-22.1311[/C][C]394.773[/C][C]0.2105[/C][C]0.2862[/C][C]0.4821[/C][C]0.4821[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106114&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106114&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[45])
33295.55-------
34237.38-------
35226.85-------
36220.14-------
37239.36-------
38224.69-------
39230.98-------
40233.47-------
41256.7-------
42253.41-------
43224.95-------
44210.37-------
45191.09-------
46198.85186.3209138.4205234.22140.30410.42260.01830.4226
47211.04186.3209108.6288264.01310.26640.3760.15330.4521
48206.25186.320987.4387285.20310.34640.31210.25130.4623
49201.19186.320970.0484302.59350.4010.36850.18560.468
50194.37186.320954.9401317.70180.45220.41220.28350.4716
51191.08186.320941.3984331.24350.47430.45670.27290.4743
52192.87186.320929.0182343.62370.46750.47640.27840.4763
53181.61186.320917.5436355.09830.47820.46970.20690.4779
54157.67186.32096.801365.84090.37720.52050.23190.4792
55196.14186.3209-3.3341375.97590.45960.61640.34490.4803
56246.35186.3209-12.9543385.59620.27750.46150.40650.4813
57271.9186.3209-22.1311394.7730.21050.28620.48210.4821







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
460.13120.06720156.977500
470.21270.13270.1611.0321384.004819.596
480.27080.1070.1023397.1676388.392419.7077
490.31840.07980.0967221.0891346.566618.6163
500.35980.04320.08664.7874290.210717.0356
510.39680.02550.075922.6487245.617115.6722
520.43070.03510.070142.8902216.656114.7192
530.4622-0.02530.064522.1929192.348213.869
540.4916-0.15380.0744820.8761262.184616.1921
550.51930.05270.072296.414245.607615.6719
560.54570.32220.0953603.4886550.869523.4706
570.57080.45930.12537323.77631115.278433.3958

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
46 & 0.1312 & 0.0672 & 0 & 156.9775 & 0 & 0 \tabularnewline
47 & 0.2127 & 0.1327 & 0.1 & 611.0321 & 384.0048 & 19.596 \tabularnewline
48 & 0.2708 & 0.107 & 0.1023 & 397.1676 & 388.3924 & 19.7077 \tabularnewline
49 & 0.3184 & 0.0798 & 0.0967 & 221.0891 & 346.5666 & 18.6163 \tabularnewline
50 & 0.3598 & 0.0432 & 0.086 & 64.7874 & 290.2107 & 17.0356 \tabularnewline
51 & 0.3968 & 0.0255 & 0.0759 & 22.6487 & 245.6171 & 15.6722 \tabularnewline
52 & 0.4307 & 0.0351 & 0.0701 & 42.8902 & 216.6561 & 14.7192 \tabularnewline
53 & 0.4622 & -0.0253 & 0.0645 & 22.1929 & 192.3482 & 13.869 \tabularnewline
54 & 0.4916 & -0.1538 & 0.0744 & 820.8761 & 262.1846 & 16.1921 \tabularnewline
55 & 0.5193 & 0.0527 & 0.0722 & 96.414 & 245.6076 & 15.6719 \tabularnewline
56 & 0.5457 & 0.3222 & 0.095 & 3603.4886 & 550.8695 & 23.4706 \tabularnewline
57 & 0.5708 & 0.4593 & 0.1253 & 7323.7763 & 1115.2784 & 33.3958 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106114&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]46[/C][C]0.1312[/C][C]0.0672[/C][C]0[/C][C]156.9775[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]47[/C][C]0.2127[/C][C]0.1327[/C][C]0.1[/C][C]611.0321[/C][C]384.0048[/C][C]19.596[/C][/ROW]
[ROW][C]48[/C][C]0.2708[/C][C]0.107[/C][C]0.1023[/C][C]397.1676[/C][C]388.3924[/C][C]19.7077[/C][/ROW]
[ROW][C]49[/C][C]0.3184[/C][C]0.0798[/C][C]0.0967[/C][C]221.0891[/C][C]346.5666[/C][C]18.6163[/C][/ROW]
[ROW][C]50[/C][C]0.3598[/C][C]0.0432[/C][C]0.086[/C][C]64.7874[/C][C]290.2107[/C][C]17.0356[/C][/ROW]
[ROW][C]51[/C][C]0.3968[/C][C]0.0255[/C][C]0.0759[/C][C]22.6487[/C][C]245.6171[/C][C]15.6722[/C][/ROW]
[ROW][C]52[/C][C]0.4307[/C][C]0.0351[/C][C]0.0701[/C][C]42.8902[/C][C]216.6561[/C][C]14.7192[/C][/ROW]
[ROW][C]53[/C][C]0.4622[/C][C]-0.0253[/C][C]0.0645[/C][C]22.1929[/C][C]192.3482[/C][C]13.869[/C][/ROW]
[ROW][C]54[/C][C]0.4916[/C][C]-0.1538[/C][C]0.0744[/C][C]820.8761[/C][C]262.1846[/C][C]16.1921[/C][/ROW]
[ROW][C]55[/C][C]0.5193[/C][C]0.0527[/C][C]0.0722[/C][C]96.414[/C][C]245.6076[/C][C]15.6719[/C][/ROW]
[ROW][C]56[/C][C]0.5457[/C][C]0.3222[/C][C]0.095[/C][C]3603.4886[/C][C]550.8695[/C][C]23.4706[/C][/ROW]
[ROW][C]57[/C][C]0.5708[/C][C]0.4593[/C][C]0.1253[/C][C]7323.7763[/C][C]1115.2784[/C][C]33.3958[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106114&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106114&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
460.13120.06720156.977500
470.21270.13270.1611.0321384.004819.596
480.27080.1070.1023397.1676388.392419.7077
490.31840.07980.0967221.0891346.566618.6163
500.35980.04320.08664.7874290.210717.0356
510.39680.02550.075922.6487245.617115.6722
520.43070.03510.070142.8902216.656114.7192
530.4622-0.02530.064522.1929192.348213.869
540.4916-0.15380.0744820.8761262.184616.1921
550.51930.05270.072296.414245.607615.6719
560.54570.32220.0953603.4886550.869523.4706
570.57080.45930.12537323.77631115.278433.3958



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')