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, 21 Dec 2010 16:44:15 +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/21/t1292949749ibp8k66cegl93gt.htm/, Retrieved Sat, 18 May 2024 11:49:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113746, Retrieved Sat, 18 May 2024 11:49:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact148
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]
- R PD            [ARIMA Forecasting] [Paper; ARIMA Fore...] [2010-12-21 16:44:15] [50e0b5177c9c80b42996aa89930b928a] [Current]
Feedback Forum

Post a new message
Dataseries X:
108.35
109.87
111.30
115.50
116.22
116.63
116.84
116.63
117.03
117.00
117.14
116.64
117.24
117.52
117.83
119.79
120.86
120.75
120.63
120.89
120.23
121.19
120.79
120.09
120.86
121.10
121.47
122.01
123.94
125.78
125.31
125.79
126.12
125.57
125.44
126.12
126.01
126.50
126.13
126.66
126.33
126.61
126.36
126.83
125.90
126.29
126.37
125.11




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113746&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]1 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=113746&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113746&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 time1 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[36])
24120.09-------
25120.86-------
26121.1-------
27121.47-------
28122.01-------
29123.94-------
30125.78-------
31125.31-------
32125.79-------
33126.12-------
34125.57-------
35125.44-------
36126.12-------
37126.01126.3765124.7171128.03590.33250.619110.6191
38126.5126.5851123.9743129.19580.47450.66710.6365
39126.13127.1138123.6679130.55960.28790.63650.99930.714
40126.66127.4197122.9232131.91620.37030.7130.99080.7145
41126.33128.4252122.9251133.92540.22760.73530.9450.7943
42126.61129.4509123.0025135.89920.19390.82860.86770.8443
43126.36129.2757121.8663136.68510.22030.75960.85290.7981
44126.83129.5562121.219137.89350.26080.77380.8120.7904
45125.9129.777120.5501139.00380.20510.73430.78140.7814
46126.29129.5466119.453139.64020.26360.76060.780.7471
47126.37129.5136118.584140.44310.28650.71840.76750.7286
48125.11129.8721118.1377141.60640.21320.72070.73460.7346

\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 & 120.09 & - & - & - & - & - & - & - \tabularnewline
25 & 120.86 & - & - & - & - & - & - & - \tabularnewline
26 & 121.1 & - & - & - & - & - & - & - \tabularnewline
27 & 121.47 & - & - & - & - & - & - & - \tabularnewline
28 & 122.01 & - & - & - & - & - & - & - \tabularnewline
29 & 123.94 & - & - & - & - & - & - & - \tabularnewline
30 & 125.78 & - & - & - & - & - & - & - \tabularnewline
31 & 125.31 & - & - & - & - & - & - & - \tabularnewline
32 & 125.79 & - & - & - & - & - & - & - \tabularnewline
33 & 126.12 & - & - & - & - & - & - & - \tabularnewline
34 & 125.57 & - & - & - & - & - & - & - \tabularnewline
35 & 125.44 & - & - & - & - & - & - & - \tabularnewline
36 & 126.12 & - & - & - & - & - & - & - \tabularnewline
37 & 126.01 & 126.3765 & 124.7171 & 128.0359 & 0.3325 & 0.6191 & 1 & 0.6191 \tabularnewline
38 & 126.5 & 126.5851 & 123.9743 & 129.1958 & 0.4745 & 0.667 & 1 & 0.6365 \tabularnewline
39 & 126.13 & 127.1138 & 123.6679 & 130.5596 & 0.2879 & 0.6365 & 0.9993 & 0.714 \tabularnewline
40 & 126.66 & 127.4197 & 122.9232 & 131.9162 & 0.3703 & 0.713 & 0.9908 & 0.7145 \tabularnewline
41 & 126.33 & 128.4252 & 122.9251 & 133.9254 & 0.2276 & 0.7353 & 0.945 & 0.7943 \tabularnewline
42 & 126.61 & 129.4509 & 123.0025 & 135.8992 & 0.1939 & 0.8286 & 0.8677 & 0.8443 \tabularnewline
43 & 126.36 & 129.2757 & 121.8663 & 136.6851 & 0.2203 & 0.7596 & 0.8529 & 0.7981 \tabularnewline
44 & 126.83 & 129.5562 & 121.219 & 137.8935 & 0.2608 & 0.7738 & 0.812 & 0.7904 \tabularnewline
45 & 125.9 & 129.777 & 120.5501 & 139.0038 & 0.2051 & 0.7343 & 0.7814 & 0.7814 \tabularnewline
46 & 126.29 & 129.5466 & 119.453 & 139.6402 & 0.2636 & 0.7606 & 0.78 & 0.7471 \tabularnewline
47 & 126.37 & 129.5136 & 118.584 & 140.4431 & 0.2865 & 0.7184 & 0.7675 & 0.7286 \tabularnewline
48 & 125.11 & 129.8721 & 118.1377 & 141.6064 & 0.2132 & 0.7207 & 0.7346 & 0.7346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113746&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]120.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]120.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]121.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]121.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]122.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]123.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]125.78[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]125.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]125.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]126.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]125.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]125.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]126.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]126.01[/C][C]126.3765[/C][C]124.7171[/C][C]128.0359[/C][C]0.3325[/C][C]0.6191[/C][C]1[/C][C]0.6191[/C][/ROW]
[ROW][C]38[/C][C]126.5[/C][C]126.5851[/C][C]123.9743[/C][C]129.1958[/C][C]0.4745[/C][C]0.667[/C][C]1[/C][C]0.6365[/C][/ROW]
[ROW][C]39[/C][C]126.13[/C][C]127.1138[/C][C]123.6679[/C][C]130.5596[/C][C]0.2879[/C][C]0.6365[/C][C]0.9993[/C][C]0.714[/C][/ROW]
[ROW][C]40[/C][C]126.66[/C][C]127.4197[/C][C]122.9232[/C][C]131.9162[/C][C]0.3703[/C][C]0.713[/C][C]0.9908[/C][C]0.7145[/C][/ROW]
[ROW][C]41[/C][C]126.33[/C][C]128.4252[/C][C]122.9251[/C][C]133.9254[/C][C]0.2276[/C][C]0.7353[/C][C]0.945[/C][C]0.7943[/C][/ROW]
[ROW][C]42[/C][C]126.61[/C][C]129.4509[/C][C]123.0025[/C][C]135.8992[/C][C]0.1939[/C][C]0.8286[/C][C]0.8677[/C][C]0.8443[/C][/ROW]
[ROW][C]43[/C][C]126.36[/C][C]129.2757[/C][C]121.8663[/C][C]136.6851[/C][C]0.2203[/C][C]0.7596[/C][C]0.8529[/C][C]0.7981[/C][/ROW]
[ROW][C]44[/C][C]126.83[/C][C]129.5562[/C][C]121.219[/C][C]137.8935[/C][C]0.2608[/C][C]0.7738[/C][C]0.812[/C][C]0.7904[/C][/ROW]
[ROW][C]45[/C][C]125.9[/C][C]129.777[/C][C]120.5501[/C][C]139.0038[/C][C]0.2051[/C][C]0.7343[/C][C]0.7814[/C][C]0.7814[/C][/ROW]
[ROW][C]46[/C][C]126.29[/C][C]129.5466[/C][C]119.453[/C][C]139.6402[/C][C]0.2636[/C][C]0.7606[/C][C]0.78[/C][C]0.7471[/C][/ROW]
[ROW][C]47[/C][C]126.37[/C][C]129.5136[/C][C]118.584[/C][C]140.4431[/C][C]0.2865[/C][C]0.7184[/C][C]0.7675[/C][C]0.7286[/C][/ROW]
[ROW][C]48[/C][C]125.11[/C][C]129.8721[/C][C]118.1377[/C][C]141.6064[/C][C]0.2132[/C][C]0.7207[/C][C]0.7346[/C][C]0.7346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113746&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113746&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])
24120.09-------
25120.86-------
26121.1-------
27121.47-------
28122.01-------
29123.94-------
30125.78-------
31125.31-------
32125.79-------
33126.12-------
34125.57-------
35125.44-------
36126.12-------
37126.01126.3765124.7171128.03590.33250.619110.6191
38126.5126.5851123.9743129.19580.47450.66710.6365
39126.13127.1138123.6679130.55960.28790.63650.99930.714
40126.66127.4197122.9232131.91620.37030.7130.99080.7145
41126.33128.4252122.9251133.92540.22760.73530.9450.7943
42126.61129.4509123.0025135.89920.19390.82860.86770.8443
43126.36129.2757121.8663136.68510.22030.75960.85290.7981
44126.83129.5562121.219137.89350.26080.77380.8120.7904
45125.9129.777120.5501139.00380.20510.73430.78140.7814
46126.29129.5466119.453139.64020.26360.76060.780.7471
47126.37129.5136118.584140.44310.28650.71840.76750.7286
48125.11129.8721118.1377141.60640.21320.72070.73460.7346







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.0067-0.002900.134300
380.0105-7e-040.00180.00720.07080.2661
390.0138-0.00770.00380.96780.36980.6081
400.018-0.0060.00430.57720.42160.6493
410.0219-0.01630.00674.39011.21531.1024
420.0254-0.02190.00938.07062.35791.5355
430.0292-0.02260.01128.50123.23551.7987
440.0328-0.0210.01247.43233.76011.9391
450.0363-0.02990.014315.03085.01242.2388
460.0398-0.02510.015410.60545.57172.3604
470.0431-0.02430.01629.88195.96352.442
480.0461-0.03670.017922.67747.35642.7123

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0067 & -0.0029 & 0 & 0.1343 & 0 & 0 \tabularnewline
38 & 0.0105 & -7e-04 & 0.0018 & 0.0072 & 0.0708 & 0.2661 \tabularnewline
39 & 0.0138 & -0.0077 & 0.0038 & 0.9678 & 0.3698 & 0.6081 \tabularnewline
40 & 0.018 & -0.006 & 0.0043 & 0.5772 & 0.4216 & 0.6493 \tabularnewline
41 & 0.0219 & -0.0163 & 0.0067 & 4.3901 & 1.2153 & 1.1024 \tabularnewline
42 & 0.0254 & -0.0219 & 0.0093 & 8.0706 & 2.3579 & 1.5355 \tabularnewline
43 & 0.0292 & -0.0226 & 0.0112 & 8.5012 & 3.2355 & 1.7987 \tabularnewline
44 & 0.0328 & -0.021 & 0.0124 & 7.4323 & 3.7601 & 1.9391 \tabularnewline
45 & 0.0363 & -0.0299 & 0.0143 & 15.0308 & 5.0124 & 2.2388 \tabularnewline
46 & 0.0398 & -0.0251 & 0.0154 & 10.6054 & 5.5717 & 2.3604 \tabularnewline
47 & 0.0431 & -0.0243 & 0.0162 & 9.8819 & 5.9635 & 2.442 \tabularnewline
48 & 0.0461 & -0.0367 & 0.0179 & 22.6774 & 7.3564 & 2.7123 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113746&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.0067[/C][C]-0.0029[/C][C]0[/C][C]0.1343[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]38[/C][C]0.0105[/C][C]-7e-04[/C][C]0.0018[/C][C]0.0072[/C][C]0.0708[/C][C]0.2661[/C][/ROW]
[ROW][C]39[/C][C]0.0138[/C][C]-0.0077[/C][C]0.0038[/C][C]0.9678[/C][C]0.3698[/C][C]0.6081[/C][/ROW]
[ROW][C]40[/C][C]0.018[/C][C]-0.006[/C][C]0.0043[/C][C]0.5772[/C][C]0.4216[/C][C]0.6493[/C][/ROW]
[ROW][C]41[/C][C]0.0219[/C][C]-0.0163[/C][C]0.0067[/C][C]4.3901[/C][C]1.2153[/C][C]1.1024[/C][/ROW]
[ROW][C]42[/C][C]0.0254[/C][C]-0.0219[/C][C]0.0093[/C][C]8.0706[/C][C]2.3579[/C][C]1.5355[/C][/ROW]
[ROW][C]43[/C][C]0.0292[/C][C]-0.0226[/C][C]0.0112[/C][C]8.5012[/C][C]3.2355[/C][C]1.7987[/C][/ROW]
[ROW][C]44[/C][C]0.0328[/C][C]-0.021[/C][C]0.0124[/C][C]7.4323[/C][C]3.7601[/C][C]1.9391[/C][/ROW]
[ROW][C]45[/C][C]0.0363[/C][C]-0.0299[/C][C]0.0143[/C][C]15.0308[/C][C]5.0124[/C][C]2.2388[/C][/ROW]
[ROW][C]46[/C][C]0.0398[/C][C]-0.0251[/C][C]0.0154[/C][C]10.6054[/C][C]5.5717[/C][C]2.3604[/C][/ROW]
[ROW][C]47[/C][C]0.0431[/C][C]-0.0243[/C][C]0.0162[/C][C]9.8819[/C][C]5.9635[/C][C]2.442[/C][/ROW]
[ROW][C]48[/C][C]0.0461[/C][C]-0.0367[/C][C]0.0179[/C][C]22.6774[/C][C]7.3564[/C][C]2.7123[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113746&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113746&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.0067-0.002900.134300
380.0105-7e-040.00180.00720.07080.2661
390.0138-0.00770.00380.96780.36980.6081
400.018-0.0060.00430.57720.42160.6493
410.0219-0.01630.00674.39011.21531.1024
420.0254-0.02190.00938.07062.35791.5355
430.0292-0.02260.01128.50123.23551.7987
440.0328-0.0210.01247.43233.76011.9391
450.0363-0.02990.014315.03085.01242.2388
460.0398-0.02510.015410.60545.57172.3604
470.0431-0.02430.01629.88195.96352.442
480.0461-0.03670.017922.67747.35642.7123



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