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, 19 Dec 2010 13:22:59 +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/19/t1292764838s9v0nffjjwi1ixv.htm/, Retrieved Sat, 04 May 2024 20:15:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112361, Retrieved Sat, 04 May 2024 20:15:50 +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]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-14 11:24:37] [8ef49741e164ec6343c90c7935194465]
-   P               [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-19 13:22:59] [934c3727858e074bf543f25f5906ed72] [Current]
Feedback Forum

Post a new message
Dataseries X:
104.37
104.89
105.15
105.72
106.38
106.40
106.47
106.59
106.76
107.35
107.81
108.03
109.08
109.86
110.29
110.34
110.59
110.64
110.83
111.51
113.32
115.89
116.51
117.44
118.25
118.65
118.52
119.07
119.12
119.28
119.30
119.44
119.57
119.93
120.03
119.66
119.46
119.48
119.56
119.43
119.57
119.59
119.50
119.54
119.56
119.61
119.64
119.60
119.71
119.72
119.66
119.76
119.80
119.88
119.78
120.08
120.22




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112361&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[45])
33119.57-------
34119.93-------
35120.03-------
36119.66-------
37119.46-------
38119.48-------
39119.56-------
40119.43-------
41119.57-------
42119.59-------
43119.5-------
44119.54-------
45119.56-------
46119.61119.6711118.8261120.51610.44370.60170.27410.6017
47119.64119.8349118.2212121.44860.40640.60760.40630.6308
48119.6120.0293117.6696122.38910.36070.62680.62050.6517
49119.71120.2414117.172123.31080.36720.65890.69110.6683
50119.72120.4638116.7206124.2070.34850.65350.69680.682
51119.66120.6921116.3057125.07840.32230.6680.69350.6935
52119.76120.9238115.919125.92860.32430.68970.72070.7034
53119.8121.1575115.5535126.76160.31750.68750.71060.7118
54119.88121.3924115.2037127.58110.3160.6930.71590.7192
55119.78121.628114.8655128.39040.29610.69380.73130.7255
56120.08121.8639114.5356129.19230.31660.71140.73290.7311
57120.22122.1001114.2113129.98890.32020.69210.7360.736

\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 & 119.57 & - & - & - & - & - & - & - \tabularnewline
34 & 119.93 & - & - & - & - & - & - & - \tabularnewline
35 & 120.03 & - & - & - & - & - & - & - \tabularnewline
36 & 119.66 & - & - & - & - & - & - & - \tabularnewline
37 & 119.46 & - & - & - & - & - & - & - \tabularnewline
38 & 119.48 & - & - & - & - & - & - & - \tabularnewline
39 & 119.56 & - & - & - & - & - & - & - \tabularnewline
40 & 119.43 & - & - & - & - & - & - & - \tabularnewline
41 & 119.57 & - & - & - & - & - & - & - \tabularnewline
42 & 119.59 & - & - & - & - & - & - & - \tabularnewline
43 & 119.5 & - & - & - & - & - & - & - \tabularnewline
44 & 119.54 & - & - & - & - & - & - & - \tabularnewline
45 & 119.56 & - & - & - & - & - & - & - \tabularnewline
46 & 119.61 & 119.6711 & 118.8261 & 120.5161 & 0.4437 & 0.6017 & 0.2741 & 0.6017 \tabularnewline
47 & 119.64 & 119.8349 & 118.2212 & 121.4486 & 0.4064 & 0.6076 & 0.4063 & 0.6308 \tabularnewline
48 & 119.6 & 120.0293 & 117.6696 & 122.3891 & 0.3607 & 0.6268 & 0.6205 & 0.6517 \tabularnewline
49 & 119.71 & 120.2414 & 117.172 & 123.3108 & 0.3672 & 0.6589 & 0.6911 & 0.6683 \tabularnewline
50 & 119.72 & 120.4638 & 116.7206 & 124.207 & 0.3485 & 0.6535 & 0.6968 & 0.682 \tabularnewline
51 & 119.66 & 120.6921 & 116.3057 & 125.0784 & 0.3223 & 0.668 & 0.6935 & 0.6935 \tabularnewline
52 & 119.76 & 120.9238 & 115.919 & 125.9286 & 0.3243 & 0.6897 & 0.7207 & 0.7034 \tabularnewline
53 & 119.8 & 121.1575 & 115.5535 & 126.7616 & 0.3175 & 0.6875 & 0.7106 & 0.7118 \tabularnewline
54 & 119.88 & 121.3924 & 115.2037 & 127.5811 & 0.316 & 0.693 & 0.7159 & 0.7192 \tabularnewline
55 & 119.78 & 121.628 & 114.8655 & 128.3904 & 0.2961 & 0.6938 & 0.7313 & 0.7255 \tabularnewline
56 & 120.08 & 121.8639 & 114.5356 & 129.1923 & 0.3166 & 0.7114 & 0.7329 & 0.7311 \tabularnewline
57 & 120.22 & 122.1001 & 114.2113 & 129.9889 & 0.3202 & 0.6921 & 0.736 & 0.736 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112361&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]119.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]119.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]120.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]119.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]119.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]119.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]119.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]119.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]119.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]119.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]119.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]119.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]119.61[/C][C]119.6711[/C][C]118.8261[/C][C]120.5161[/C][C]0.4437[/C][C]0.6017[/C][C]0.2741[/C][C]0.6017[/C][/ROW]
[ROW][C]47[/C][C]119.64[/C][C]119.8349[/C][C]118.2212[/C][C]121.4486[/C][C]0.4064[/C][C]0.6076[/C][C]0.4063[/C][C]0.6308[/C][/ROW]
[ROW][C]48[/C][C]119.6[/C][C]120.0293[/C][C]117.6696[/C][C]122.3891[/C][C]0.3607[/C][C]0.6268[/C][C]0.6205[/C][C]0.6517[/C][/ROW]
[ROW][C]49[/C][C]119.71[/C][C]120.2414[/C][C]117.172[/C][C]123.3108[/C][C]0.3672[/C][C]0.6589[/C][C]0.6911[/C][C]0.6683[/C][/ROW]
[ROW][C]50[/C][C]119.72[/C][C]120.4638[/C][C]116.7206[/C][C]124.207[/C][C]0.3485[/C][C]0.6535[/C][C]0.6968[/C][C]0.682[/C][/ROW]
[ROW][C]51[/C][C]119.66[/C][C]120.6921[/C][C]116.3057[/C][C]125.0784[/C][C]0.3223[/C][C]0.668[/C][C]0.6935[/C][C]0.6935[/C][/ROW]
[ROW][C]52[/C][C]119.76[/C][C]120.9238[/C][C]115.919[/C][C]125.9286[/C][C]0.3243[/C][C]0.6897[/C][C]0.7207[/C][C]0.7034[/C][/ROW]
[ROW][C]53[/C][C]119.8[/C][C]121.1575[/C][C]115.5535[/C][C]126.7616[/C][C]0.3175[/C][C]0.6875[/C][C]0.7106[/C][C]0.7118[/C][/ROW]
[ROW][C]54[/C][C]119.88[/C][C]121.3924[/C][C]115.2037[/C][C]127.5811[/C][C]0.316[/C][C]0.693[/C][C]0.7159[/C][C]0.7192[/C][/ROW]
[ROW][C]55[/C][C]119.78[/C][C]121.628[/C][C]114.8655[/C][C]128.3904[/C][C]0.2961[/C][C]0.6938[/C][C]0.7313[/C][C]0.7255[/C][/ROW]
[ROW][C]56[/C][C]120.08[/C][C]121.8639[/C][C]114.5356[/C][C]129.1923[/C][C]0.3166[/C][C]0.7114[/C][C]0.7329[/C][C]0.7311[/C][/ROW]
[ROW][C]57[/C][C]120.22[/C][C]122.1001[/C][C]114.2113[/C][C]129.9889[/C][C]0.3202[/C][C]0.6921[/C][C]0.736[/C][C]0.736[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112361&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112361&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])
33119.57-------
34119.93-------
35120.03-------
36119.66-------
37119.46-------
38119.48-------
39119.56-------
40119.43-------
41119.57-------
42119.59-------
43119.5-------
44119.54-------
45119.56-------
46119.61119.6711118.8261120.51610.44370.60170.27410.6017
47119.64119.8349118.2212121.44860.40640.60760.40630.6308
48119.6120.0293117.6696122.38910.36070.62680.62050.6517
49119.71120.2414117.172123.31080.36720.65890.69110.6683
50119.72120.4638116.7206124.2070.34850.65350.69680.682
51119.66120.6921116.3057125.07840.32230.6680.69350.6935
52119.76120.9238115.919125.92860.32430.68970.72070.7034
53119.8121.1575115.5535126.76160.31750.68750.71060.7118
54119.88121.3924115.2037127.58110.3160.6930.71590.7192
55119.78121.628114.8655128.39040.29610.69380.73130.7255
56120.08121.8639114.5356129.19230.31660.71140.73290.7311
57120.22122.1001114.2113129.98890.32020.69210.7360.736







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
460.0036-5e-0400.003700
470.0069-0.00160.00110.0380.02090.1444
480.01-0.00360.00190.18430.07530.2745
490.013-0.00440.00250.28240.12710.3565
500.0159-0.00620.00330.55320.21230.4608
510.0185-0.00860.00411.06520.35450.5954
520.0211-0.00960.00491.35450.49730.7052
530.0236-0.01120.00571.84290.66550.8158
540.026-0.01250.00652.28750.84570.9196
550.0284-0.01520.00733.41511.10271.0501
560.0307-0.01460.0083.18241.29171.1365
570.033-0.01540.00863.53481.47871.216

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
46 & 0.0036 & -5e-04 & 0 & 0.0037 & 0 & 0 \tabularnewline
47 & 0.0069 & -0.0016 & 0.0011 & 0.038 & 0.0209 & 0.1444 \tabularnewline
48 & 0.01 & -0.0036 & 0.0019 & 0.1843 & 0.0753 & 0.2745 \tabularnewline
49 & 0.013 & -0.0044 & 0.0025 & 0.2824 & 0.1271 & 0.3565 \tabularnewline
50 & 0.0159 & -0.0062 & 0.0033 & 0.5532 & 0.2123 & 0.4608 \tabularnewline
51 & 0.0185 & -0.0086 & 0.0041 & 1.0652 & 0.3545 & 0.5954 \tabularnewline
52 & 0.0211 & -0.0096 & 0.0049 & 1.3545 & 0.4973 & 0.7052 \tabularnewline
53 & 0.0236 & -0.0112 & 0.0057 & 1.8429 & 0.6655 & 0.8158 \tabularnewline
54 & 0.026 & -0.0125 & 0.0065 & 2.2875 & 0.8457 & 0.9196 \tabularnewline
55 & 0.0284 & -0.0152 & 0.0073 & 3.4151 & 1.1027 & 1.0501 \tabularnewline
56 & 0.0307 & -0.0146 & 0.008 & 3.1824 & 1.2917 & 1.1365 \tabularnewline
57 & 0.033 & -0.0154 & 0.0086 & 3.5348 & 1.4787 & 1.216 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112361&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.0036[/C][C]-5e-04[/C][C]0[/C][C]0.0037[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]47[/C][C]0.0069[/C][C]-0.0016[/C][C]0.0011[/C][C]0.038[/C][C]0.0209[/C][C]0.1444[/C][/ROW]
[ROW][C]48[/C][C]0.01[/C][C]-0.0036[/C][C]0.0019[/C][C]0.1843[/C][C]0.0753[/C][C]0.2745[/C][/ROW]
[ROW][C]49[/C][C]0.013[/C][C]-0.0044[/C][C]0.0025[/C][C]0.2824[/C][C]0.1271[/C][C]0.3565[/C][/ROW]
[ROW][C]50[/C][C]0.0159[/C][C]-0.0062[/C][C]0.0033[/C][C]0.5532[/C][C]0.2123[/C][C]0.4608[/C][/ROW]
[ROW][C]51[/C][C]0.0185[/C][C]-0.0086[/C][C]0.0041[/C][C]1.0652[/C][C]0.3545[/C][C]0.5954[/C][/ROW]
[ROW][C]52[/C][C]0.0211[/C][C]-0.0096[/C][C]0.0049[/C][C]1.3545[/C][C]0.4973[/C][C]0.7052[/C][/ROW]
[ROW][C]53[/C][C]0.0236[/C][C]-0.0112[/C][C]0.0057[/C][C]1.8429[/C][C]0.6655[/C][C]0.8158[/C][/ROW]
[ROW][C]54[/C][C]0.026[/C][C]-0.0125[/C][C]0.0065[/C][C]2.2875[/C][C]0.8457[/C][C]0.9196[/C][/ROW]
[ROW][C]55[/C][C]0.0284[/C][C]-0.0152[/C][C]0.0073[/C][C]3.4151[/C][C]1.1027[/C][C]1.0501[/C][/ROW]
[ROW][C]56[/C][C]0.0307[/C][C]-0.0146[/C][C]0.008[/C][C]3.1824[/C][C]1.2917[/C][C]1.1365[/C][/ROW]
[ROW][C]57[/C][C]0.033[/C][C]-0.0154[/C][C]0.0086[/C][C]3.5348[/C][C]1.4787[/C][C]1.216[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112361&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112361&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.0036-5e-0400.003700
470.0069-0.00160.00110.0380.02090.1444
480.01-0.00360.00190.18430.07530.2745
490.013-0.00440.00250.28240.12710.3565
500.0159-0.00620.00330.55320.21230.4608
510.0185-0.00860.00411.06520.35450.5954
520.0211-0.00960.00491.35450.49730.7052
530.0236-0.01120.00571.84290.66550.8158
540.026-0.01250.00652.28750.84570.9196
550.0284-0.01520.00733.41511.10271.0501
560.0307-0.01460.0083.18241.29171.1365
570.033-0.01540.00863.53481.47871.216



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