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 computationSun, 21 Dec 2008 13:01:58 -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/2008/Dec/21/t1229889804ekbvo08qn7go3ns.htm/, Retrieved Mon, 29 Apr 2024 11:58:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35800, Retrieved Mon, 29 Apr 2024 11:58:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact230
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Q1 The Seatbeltlaw] [2007-11-14 19:27:43] [8cd6641b921d30ebe00b648d1481bba0]
F    D  [Multiple Regression] [The Seatbelt Law ...] [2008-11-15 12:00:57] [93834488277b53a4510bfd06084ae13b]
-   PD    [Multiple Regression] [] [2008-11-15 18:50:27] [93834488277b53a4510bfd06084ae13b]
-    D      [Multiple Regression] [Paper - Multiple ...] [2008-12-21 14:45:31] [85841a4a203c2f9589565c024425a91b]
-   PD        [Multiple Regression] [Paper - Multiple ...] [2008-12-21 15:09:11] [85841a4a203c2f9589565c024425a91b]
- RMPD            [ARIMA Forecasting] [Paper - Arima for...] [2008-12-21 20:01:58] [07b7cf1321bc38017c2c7efcf91ca696] [Current]
Feedback Forum

Post a new message
Dataseries X:
97.57
97.74
97.92
98.19
98.23
98.41
98.59
98.71
99.14
99.62
100.18
100.66
101.19
101.75
102.2
102.87
98.81
97.6
96.68
95.96
98.89
99.05
99.2
99.11
99.19
99.77
100.70
100.78
100.53
101.01
100.92
101.10
103.11
102.99
102.31
102.61
103.68
104.72
107.66
108.87
108.12
107.61
106.42
105.61
105.71
105.49
105.57
105.18
106.09
106.34
108.47
116.87
121.08
123.27
124.18
125.60
126.57
127.18
128.04
128.55
129.67




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35800&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[49])
37103.68-------
38104.72-------
39107.66-------
40108.87-------
41108.12-------
42107.61-------
43106.42-------
44105.61-------
45105.71-------
46105.49-------
47105.57-------
48105.18-------
49106.09-------
50106.34106.3087104.0815108.68540.48970.57160.90490.5716
51108.47106.3524102.8758110.20720.14080.50250.25310.5531
52116.87106.3619101.9558111.393500.20580.16430.5422
53121.08106.3638101.2079112.397703e-040.28420.5354
54123.27106.3642100.5713113.2894000.36220.5309
55124.18106.3643100.0119114.1045000.49440.5277
56125.6106.364399.5095114.8638000.5690.5252
57126.57106.364399.0513115.5801000.55530.5233
58127.18106.364398.6285116.2623000.56870.5217
59128.04106.364398.2348116.916401e-040.55860.5203
60128.55106.364397.8657117.54721e-041e-040.58220.5192
61129.67106.364397.5177118.15821e-041e-040.51820.5182

\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[49]) \tabularnewline
37 & 103.68 & - & - & - & - & - & - & - \tabularnewline
38 & 104.72 & - & - & - & - & - & - & - \tabularnewline
39 & 107.66 & - & - & - & - & - & - & - \tabularnewline
40 & 108.87 & - & - & - & - & - & - & - \tabularnewline
41 & 108.12 & - & - & - & - & - & - & - \tabularnewline
42 & 107.61 & - & - & - & - & - & - & - \tabularnewline
43 & 106.42 & - & - & - & - & - & - & - \tabularnewline
44 & 105.61 & - & - & - & - & - & - & - \tabularnewline
45 & 105.71 & - & - & - & - & - & - & - \tabularnewline
46 & 105.49 & - & - & - & - & - & - & - \tabularnewline
47 & 105.57 & - & - & - & - & - & - & - \tabularnewline
48 & 105.18 & - & - & - & - & - & - & - \tabularnewline
49 & 106.09 & - & - & - & - & - & - & - \tabularnewline
50 & 106.34 & 106.3087 & 104.0815 & 108.6854 & 0.4897 & 0.5716 & 0.9049 & 0.5716 \tabularnewline
51 & 108.47 & 106.3524 & 102.8758 & 110.2072 & 0.1408 & 0.5025 & 0.2531 & 0.5531 \tabularnewline
52 & 116.87 & 106.3619 & 101.9558 & 111.3935 & 0 & 0.2058 & 0.1643 & 0.5422 \tabularnewline
53 & 121.08 & 106.3638 & 101.2079 & 112.3977 & 0 & 3e-04 & 0.2842 & 0.5354 \tabularnewline
54 & 123.27 & 106.3642 & 100.5713 & 113.2894 & 0 & 0 & 0.3622 & 0.5309 \tabularnewline
55 & 124.18 & 106.3643 & 100.0119 & 114.1045 & 0 & 0 & 0.4944 & 0.5277 \tabularnewline
56 & 125.6 & 106.3643 & 99.5095 & 114.8638 & 0 & 0 & 0.569 & 0.5252 \tabularnewline
57 & 126.57 & 106.3643 & 99.0513 & 115.5801 & 0 & 0 & 0.5553 & 0.5233 \tabularnewline
58 & 127.18 & 106.3643 & 98.6285 & 116.2623 & 0 & 0 & 0.5687 & 0.5217 \tabularnewline
59 & 128.04 & 106.3643 & 98.2348 & 116.9164 & 0 & 1e-04 & 0.5586 & 0.5203 \tabularnewline
60 & 128.55 & 106.3643 & 97.8657 & 117.5472 & 1e-04 & 1e-04 & 0.5822 & 0.5192 \tabularnewline
61 & 129.67 & 106.3643 & 97.5177 & 118.1582 & 1e-04 & 1e-04 & 0.5182 & 0.5182 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35800&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[49])[/C][/ROW]
[ROW][C]37[/C][C]103.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]104.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]107.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]108.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]108.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]107.61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]106.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]105.61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]105.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]105.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]105.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]105.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]106.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]106.34[/C][C]106.3087[/C][C]104.0815[/C][C]108.6854[/C][C]0.4897[/C][C]0.5716[/C][C]0.9049[/C][C]0.5716[/C][/ROW]
[ROW][C]51[/C][C]108.47[/C][C]106.3524[/C][C]102.8758[/C][C]110.2072[/C][C]0.1408[/C][C]0.5025[/C][C]0.2531[/C][C]0.5531[/C][/ROW]
[ROW][C]52[/C][C]116.87[/C][C]106.3619[/C][C]101.9558[/C][C]111.3935[/C][C]0[/C][C]0.2058[/C][C]0.1643[/C][C]0.5422[/C][/ROW]
[ROW][C]53[/C][C]121.08[/C][C]106.3638[/C][C]101.2079[/C][C]112.3977[/C][C]0[/C][C]3e-04[/C][C]0.2842[/C][C]0.5354[/C][/ROW]
[ROW][C]54[/C][C]123.27[/C][C]106.3642[/C][C]100.5713[/C][C]113.2894[/C][C]0[/C][C]0[/C][C]0.3622[/C][C]0.5309[/C][/ROW]
[ROW][C]55[/C][C]124.18[/C][C]106.3643[/C][C]100.0119[/C][C]114.1045[/C][C]0[/C][C]0[/C][C]0.4944[/C][C]0.5277[/C][/ROW]
[ROW][C]56[/C][C]125.6[/C][C]106.3643[/C][C]99.5095[/C][C]114.8638[/C][C]0[/C][C]0[/C][C]0.569[/C][C]0.5252[/C][/ROW]
[ROW][C]57[/C][C]126.57[/C][C]106.3643[/C][C]99.0513[/C][C]115.5801[/C][C]0[/C][C]0[/C][C]0.5553[/C][C]0.5233[/C][/ROW]
[ROW][C]58[/C][C]127.18[/C][C]106.3643[/C][C]98.6285[/C][C]116.2623[/C][C]0[/C][C]0[/C][C]0.5687[/C][C]0.5217[/C][/ROW]
[ROW][C]59[/C][C]128.04[/C][C]106.3643[/C][C]98.2348[/C][C]116.9164[/C][C]0[/C][C]1e-04[/C][C]0.5586[/C][C]0.5203[/C][/ROW]
[ROW][C]60[/C][C]128.55[/C][C]106.3643[/C][C]97.8657[/C][C]117.5472[/C][C]1e-04[/C][C]1e-04[/C][C]0.5822[/C][C]0.5192[/C][/ROW]
[ROW][C]61[/C][C]129.67[/C][C]106.3643[/C][C]97.5177[/C][C]118.1582[/C][C]1e-04[/C][C]1e-04[/C][C]0.5182[/C][C]0.5182[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35800&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35800&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[49])
37103.68-------
38104.72-------
39107.66-------
40108.87-------
41108.12-------
42107.61-------
43106.42-------
44105.61-------
45105.71-------
46105.49-------
47105.57-------
48105.18-------
49106.09-------
50106.34106.3087104.0815108.68540.48970.57160.90490.5716
51108.47106.3524102.8758110.20720.14080.50250.25310.5531
52116.87106.3619101.9558111.393500.20580.16430.5422
53121.08106.3638101.2079112.397703e-040.28420.5354
54123.27106.3642100.5713113.2894000.36220.5309
55124.18106.3643100.0119114.1045000.49440.5277
56125.6106.364399.5095114.8638000.5690.5252
57126.57106.364399.0513115.5801000.55530.5233
58127.18106.364398.6285116.2623000.56870.5217
59128.04106.364398.2348116.916401e-040.55860.5203
60128.55106.364397.8657117.54721e-041e-040.58220.5192
61129.67106.364397.5177118.15821e-041e-040.51820.5182







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.01143e-0400.0011e-040.009
510.01850.01990.00174.48410.37370.6113
520.02410.09880.0082110.4219.20183.0334
530.02890.13840.0115216.566118.04724.2482
540.03320.15890.0132285.805123.81714.8803
550.03710.16750.014317.398626.44995.1429
560.04080.18080.0151370.010830.83425.5529
570.04420.190.0158408.268834.02245.8329
580.04750.19570.0163433.291736.10766.009
590.05060.20380.017469.834339.15296.2572
600.05360.20860.0174492.203541.0176.4044
610.05660.21910.0183543.153845.26286.7278

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0114 & 3e-04 & 0 & 0.001 & 1e-04 & 0.009 \tabularnewline
51 & 0.0185 & 0.0199 & 0.0017 & 4.4841 & 0.3737 & 0.6113 \tabularnewline
52 & 0.0241 & 0.0988 & 0.0082 & 110.421 & 9.2018 & 3.0334 \tabularnewline
53 & 0.0289 & 0.1384 & 0.0115 & 216.5661 & 18.0472 & 4.2482 \tabularnewline
54 & 0.0332 & 0.1589 & 0.0132 & 285.8051 & 23.8171 & 4.8803 \tabularnewline
55 & 0.0371 & 0.1675 & 0.014 & 317.3986 & 26.4499 & 5.1429 \tabularnewline
56 & 0.0408 & 0.1808 & 0.0151 & 370.0108 & 30.8342 & 5.5529 \tabularnewline
57 & 0.0442 & 0.19 & 0.0158 & 408.2688 & 34.0224 & 5.8329 \tabularnewline
58 & 0.0475 & 0.1957 & 0.0163 & 433.2917 & 36.1076 & 6.009 \tabularnewline
59 & 0.0506 & 0.2038 & 0.017 & 469.8343 & 39.1529 & 6.2572 \tabularnewline
60 & 0.0536 & 0.2086 & 0.0174 & 492.2035 & 41.017 & 6.4044 \tabularnewline
61 & 0.0566 & 0.2191 & 0.0183 & 543.1538 & 45.2628 & 6.7278 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35800&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]50[/C][C]0.0114[/C][C]3e-04[/C][C]0[/C][C]0.001[/C][C]1e-04[/C][C]0.009[/C][/ROW]
[ROW][C]51[/C][C]0.0185[/C][C]0.0199[/C][C]0.0017[/C][C]4.4841[/C][C]0.3737[/C][C]0.6113[/C][/ROW]
[ROW][C]52[/C][C]0.0241[/C][C]0.0988[/C][C]0.0082[/C][C]110.421[/C][C]9.2018[/C][C]3.0334[/C][/ROW]
[ROW][C]53[/C][C]0.0289[/C][C]0.1384[/C][C]0.0115[/C][C]216.5661[/C][C]18.0472[/C][C]4.2482[/C][/ROW]
[ROW][C]54[/C][C]0.0332[/C][C]0.1589[/C][C]0.0132[/C][C]285.8051[/C][C]23.8171[/C][C]4.8803[/C][/ROW]
[ROW][C]55[/C][C]0.0371[/C][C]0.1675[/C][C]0.014[/C][C]317.3986[/C][C]26.4499[/C][C]5.1429[/C][/ROW]
[ROW][C]56[/C][C]0.0408[/C][C]0.1808[/C][C]0.0151[/C][C]370.0108[/C][C]30.8342[/C][C]5.5529[/C][/ROW]
[ROW][C]57[/C][C]0.0442[/C][C]0.19[/C][C]0.0158[/C][C]408.2688[/C][C]34.0224[/C][C]5.8329[/C][/ROW]
[ROW][C]58[/C][C]0.0475[/C][C]0.1957[/C][C]0.0163[/C][C]433.2917[/C][C]36.1076[/C][C]6.009[/C][/ROW]
[ROW][C]59[/C][C]0.0506[/C][C]0.2038[/C][C]0.017[/C][C]469.8343[/C][C]39.1529[/C][C]6.2572[/C][/ROW]
[ROW][C]60[/C][C]0.0536[/C][C]0.2086[/C][C]0.0174[/C][C]492.2035[/C][C]41.017[/C][C]6.4044[/C][/ROW]
[ROW][C]61[/C][C]0.0566[/C][C]0.2191[/C][C]0.0183[/C][C]543.1538[/C][C]45.2628[/C][C]6.7278[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35800&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35800&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
500.01143e-0400.0011e-040.009
510.01850.01990.00174.48410.37370.6113
520.02410.09880.0082110.4219.20183.0334
530.02890.13840.0115216.566118.04724.2482
540.03320.15890.0132285.805123.81714.8803
550.03710.16750.014317.398626.44995.1429
560.04080.18080.0151370.010830.83425.5529
570.04420.190.0158408.268834.02245.8329
580.04750.19570.0163433.291736.10766.009
590.05060.20380.017469.834339.15296.2572
600.05360.20860.0174492.203541.0176.4044
610.05660.21910.0183543.153845.26286.7278



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