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 computationMon, 07 Dec 2009 14:44:50 -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/07/t1260223291vcas7vdqmmt5laz.htm/, Retrieved Sun, 05 May 2024 09:28:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64650, Retrieved Sun, 05 May 2024 09:28:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact122
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Foorcasting] [2007-12-11 14:01:44] [0089dec2868056b990fdbd23bf9edb23]
- RMPD    [ARIMA Forecasting] [PAPER] [2009-12-07 21:44:50] [2d9a0b3c2f25bb8f387fafb994d0d852] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.00
100.83
101.51
102.16
102.39
102.54
102.85
103.47
103.57
103.69
103.50
103.47
103.45
103.48
103.93
103.89
104.40
104.79
104.77
105.13
105.26
104.96
104.75
105.01
105.15
105.20
105.77
105.78
106.26
106.13
106.12
106.57
106.44
106.54
107.10
108.10
108.40
108.84
109.62
110.42
110.67
111.66
112.28
112.87
112.18
112.36
112.16
111.49
111.25
111.36
111.74
111.10
111.33
111.25
111.04
110.97
111.31
111.02
111.07
111.36




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64650&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 time3 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[48])
36108.1-------
37108.4-------
38108.84-------
39109.62-------
40110.42-------
41110.67-------
42111.66-------
43112.28-------
44112.87-------
45112.18-------
46112.36-------
47112.16-------
48111.49-------
49111.25111.2985110.6095111.98750.44510.292910.2929
50111.36111.0869110.0133112.16050.3090.382910.2309
51111.74111.4675110.0493112.88570.35320.55910.99470.4876
52111.1111.4639109.695113.23280.34340.37980.87630.4885
53111.33111.9047109.8089114.00060.29550.77410.87590.6509
54111.25112.4174110.0184114.81650.17010.81290.7320.7757
55111.04112.523109.8391115.20690.13940.82370.57040.7747
56110.97112.9028109.9516115.8540.09960.8920.50870.8259
57111.31112.6213109.4184115.82420.21110.84390.60640.7556
58111.02112.5016109.0602115.94290.19940.75130.53210.7177
59111.07112.5522108.8834116.2210.21420.79350.5830.7148
60111.36112.7845108.8982116.67080.23620.80640.74310.7431

\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[48]) \tabularnewline
36 & 108.1 & - & - & - & - & - & - & - \tabularnewline
37 & 108.4 & - & - & - & - & - & - & - \tabularnewline
38 & 108.84 & - & - & - & - & - & - & - \tabularnewline
39 & 109.62 & - & - & - & - & - & - & - \tabularnewline
40 & 110.42 & - & - & - & - & - & - & - \tabularnewline
41 & 110.67 & - & - & - & - & - & - & - \tabularnewline
42 & 111.66 & - & - & - & - & - & - & - \tabularnewline
43 & 112.28 & - & - & - & - & - & - & - \tabularnewline
44 & 112.87 & - & - & - & - & - & - & - \tabularnewline
45 & 112.18 & - & - & - & - & - & - & - \tabularnewline
46 & 112.36 & - & - & - & - & - & - & - \tabularnewline
47 & 112.16 & - & - & - & - & - & - & - \tabularnewline
48 & 111.49 & - & - & - & - & - & - & - \tabularnewline
49 & 111.25 & 111.2985 & 110.6095 & 111.9875 & 0.4451 & 0.2929 & 1 & 0.2929 \tabularnewline
50 & 111.36 & 111.0869 & 110.0133 & 112.1605 & 0.309 & 0.3829 & 1 & 0.2309 \tabularnewline
51 & 111.74 & 111.4675 & 110.0493 & 112.8857 & 0.3532 & 0.5591 & 0.9947 & 0.4876 \tabularnewline
52 & 111.1 & 111.4639 & 109.695 & 113.2328 & 0.3434 & 0.3798 & 0.8763 & 0.4885 \tabularnewline
53 & 111.33 & 111.9047 & 109.8089 & 114.0006 & 0.2955 & 0.7741 & 0.8759 & 0.6509 \tabularnewline
54 & 111.25 & 112.4174 & 110.0184 & 114.8165 & 0.1701 & 0.8129 & 0.732 & 0.7757 \tabularnewline
55 & 111.04 & 112.523 & 109.8391 & 115.2069 & 0.1394 & 0.8237 & 0.5704 & 0.7747 \tabularnewline
56 & 110.97 & 112.9028 & 109.9516 & 115.854 & 0.0996 & 0.892 & 0.5087 & 0.8259 \tabularnewline
57 & 111.31 & 112.6213 & 109.4184 & 115.8242 & 0.2111 & 0.8439 & 0.6064 & 0.7556 \tabularnewline
58 & 111.02 & 112.5016 & 109.0602 & 115.9429 & 0.1994 & 0.7513 & 0.5321 & 0.7177 \tabularnewline
59 & 111.07 & 112.5522 & 108.8834 & 116.221 & 0.2142 & 0.7935 & 0.583 & 0.7148 \tabularnewline
60 & 111.36 & 112.7845 & 108.8982 & 116.6708 & 0.2362 & 0.8064 & 0.7431 & 0.7431 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64650&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[48])[/C][/ROW]
[ROW][C]36[/C][C]108.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]108.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]109.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]110.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]110.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]111.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]112.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]112.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]112.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]112.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]111.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]111.25[/C][C]111.2985[/C][C]110.6095[/C][C]111.9875[/C][C]0.4451[/C][C]0.2929[/C][C]1[/C][C]0.2929[/C][/ROW]
[ROW][C]50[/C][C]111.36[/C][C]111.0869[/C][C]110.0133[/C][C]112.1605[/C][C]0.309[/C][C]0.3829[/C][C]1[/C][C]0.2309[/C][/ROW]
[ROW][C]51[/C][C]111.74[/C][C]111.4675[/C][C]110.0493[/C][C]112.8857[/C][C]0.3532[/C][C]0.5591[/C][C]0.9947[/C][C]0.4876[/C][/ROW]
[ROW][C]52[/C][C]111.1[/C][C]111.4639[/C][C]109.695[/C][C]113.2328[/C][C]0.3434[/C][C]0.3798[/C][C]0.8763[/C][C]0.4885[/C][/ROW]
[ROW][C]53[/C][C]111.33[/C][C]111.9047[/C][C]109.8089[/C][C]114.0006[/C][C]0.2955[/C][C]0.7741[/C][C]0.8759[/C][C]0.6509[/C][/ROW]
[ROW][C]54[/C][C]111.25[/C][C]112.4174[/C][C]110.0184[/C][C]114.8165[/C][C]0.1701[/C][C]0.8129[/C][C]0.732[/C][C]0.7757[/C][/ROW]
[ROW][C]55[/C][C]111.04[/C][C]112.523[/C][C]109.8391[/C][C]115.2069[/C][C]0.1394[/C][C]0.8237[/C][C]0.5704[/C][C]0.7747[/C][/ROW]
[ROW][C]56[/C][C]110.97[/C][C]112.9028[/C][C]109.9516[/C][C]115.854[/C][C]0.0996[/C][C]0.892[/C][C]0.5087[/C][C]0.8259[/C][/ROW]
[ROW][C]57[/C][C]111.31[/C][C]112.6213[/C][C]109.4184[/C][C]115.8242[/C][C]0.2111[/C][C]0.8439[/C][C]0.6064[/C][C]0.7556[/C][/ROW]
[ROW][C]58[/C][C]111.02[/C][C]112.5016[/C][C]109.0602[/C][C]115.9429[/C][C]0.1994[/C][C]0.7513[/C][C]0.5321[/C][C]0.7177[/C][/ROW]
[ROW][C]59[/C][C]111.07[/C][C]112.5522[/C][C]108.8834[/C][C]116.221[/C][C]0.2142[/C][C]0.7935[/C][C]0.583[/C][C]0.7148[/C][/ROW]
[ROW][C]60[/C][C]111.36[/C][C]112.7845[/C][C]108.8982[/C][C]116.6708[/C][C]0.2362[/C][C]0.8064[/C][C]0.7431[/C][C]0.7431[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64650&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64650&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[48])
36108.1-------
37108.4-------
38108.84-------
39109.62-------
40110.42-------
41110.67-------
42111.66-------
43112.28-------
44112.87-------
45112.18-------
46112.36-------
47112.16-------
48111.49-------
49111.25111.2985110.6095111.98750.44510.292910.2929
50111.36111.0869110.0133112.16050.3090.382910.2309
51111.74111.4675110.0493112.88570.35320.55910.99470.4876
52111.1111.4639109.695113.23280.34340.37980.87630.4885
53111.33111.9047109.8089114.00060.29550.77410.87590.6509
54111.25112.4174110.0184114.81650.17010.81290.7320.7757
55111.04112.523109.8391115.20690.13940.82370.57040.7747
56110.97112.9028109.9516115.8540.09960.8920.50870.8259
57111.31112.6213109.4184115.82420.21110.84390.60640.7556
58111.02112.5016109.0602115.94290.19940.75130.53210.7177
59111.07112.5522108.8834116.2210.21420.79350.5830.7148
60111.36112.7845108.8982116.67080.23620.80640.74310.7431







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0032-4e-0400.00242e-040.014
500.00490.00252e-040.07460.00620.0788
510.00650.00242e-040.07430.00620.0787
520.0081-0.00333e-040.13240.0110.1051
530.0096-0.00514e-040.33030.02750.1659
540.0109-0.01049e-041.36290.11360.337
550.0122-0.01320.00112.19930.18330.4281
560.0133-0.01710.00143.73570.31130.558
570.0145-0.01160.0011.71960.14330.3785
580.0156-0.01320.00112.1950.18290.4277
590.0166-0.01320.00112.1970.18310.4279
600.0176-0.01260.00112.02920.16910.4112

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0032 & -4e-04 & 0 & 0.0024 & 2e-04 & 0.014 \tabularnewline
50 & 0.0049 & 0.0025 & 2e-04 & 0.0746 & 0.0062 & 0.0788 \tabularnewline
51 & 0.0065 & 0.0024 & 2e-04 & 0.0743 & 0.0062 & 0.0787 \tabularnewline
52 & 0.0081 & -0.0033 & 3e-04 & 0.1324 & 0.011 & 0.1051 \tabularnewline
53 & 0.0096 & -0.0051 & 4e-04 & 0.3303 & 0.0275 & 0.1659 \tabularnewline
54 & 0.0109 & -0.0104 & 9e-04 & 1.3629 & 0.1136 & 0.337 \tabularnewline
55 & 0.0122 & -0.0132 & 0.0011 & 2.1993 & 0.1833 & 0.4281 \tabularnewline
56 & 0.0133 & -0.0171 & 0.0014 & 3.7357 & 0.3113 & 0.558 \tabularnewline
57 & 0.0145 & -0.0116 & 0.001 & 1.7196 & 0.1433 & 0.3785 \tabularnewline
58 & 0.0156 & -0.0132 & 0.0011 & 2.195 & 0.1829 & 0.4277 \tabularnewline
59 & 0.0166 & -0.0132 & 0.0011 & 2.197 & 0.1831 & 0.4279 \tabularnewline
60 & 0.0176 & -0.0126 & 0.0011 & 2.0292 & 0.1691 & 0.4112 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64650&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]49[/C][C]0.0032[/C][C]-4e-04[/C][C]0[/C][C]0.0024[/C][C]2e-04[/C][C]0.014[/C][/ROW]
[ROW][C]50[/C][C]0.0049[/C][C]0.0025[/C][C]2e-04[/C][C]0.0746[/C][C]0.0062[/C][C]0.0788[/C][/ROW]
[ROW][C]51[/C][C]0.0065[/C][C]0.0024[/C][C]2e-04[/C][C]0.0743[/C][C]0.0062[/C][C]0.0787[/C][/ROW]
[ROW][C]52[/C][C]0.0081[/C][C]-0.0033[/C][C]3e-04[/C][C]0.1324[/C][C]0.011[/C][C]0.1051[/C][/ROW]
[ROW][C]53[/C][C]0.0096[/C][C]-0.0051[/C][C]4e-04[/C][C]0.3303[/C][C]0.0275[/C][C]0.1659[/C][/ROW]
[ROW][C]54[/C][C]0.0109[/C][C]-0.0104[/C][C]9e-04[/C][C]1.3629[/C][C]0.1136[/C][C]0.337[/C][/ROW]
[ROW][C]55[/C][C]0.0122[/C][C]-0.0132[/C][C]0.0011[/C][C]2.1993[/C][C]0.1833[/C][C]0.4281[/C][/ROW]
[ROW][C]56[/C][C]0.0133[/C][C]-0.0171[/C][C]0.0014[/C][C]3.7357[/C][C]0.3113[/C][C]0.558[/C][/ROW]
[ROW][C]57[/C][C]0.0145[/C][C]-0.0116[/C][C]0.001[/C][C]1.7196[/C][C]0.1433[/C][C]0.3785[/C][/ROW]
[ROW][C]58[/C][C]0.0156[/C][C]-0.0132[/C][C]0.0011[/C][C]2.195[/C][C]0.1829[/C][C]0.4277[/C][/ROW]
[ROW][C]59[/C][C]0.0166[/C][C]-0.0132[/C][C]0.0011[/C][C]2.197[/C][C]0.1831[/C][C]0.4279[/C][/ROW]
[ROW][C]60[/C][C]0.0176[/C][C]-0.0126[/C][C]0.0011[/C][C]2.0292[/C][C]0.1691[/C][C]0.4112[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64650&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64650&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
490.0032-4e-0400.00242e-040.014
500.00490.00252e-040.07460.00620.0788
510.00650.00242e-040.07430.00620.0787
520.0081-0.00333e-040.13240.0110.1051
530.0096-0.00514e-040.33030.02750.1659
540.0109-0.01049e-041.36290.11360.337
550.0122-0.01320.00112.19930.18330.4281
560.0133-0.01710.00143.73570.31130.558
570.0145-0.01160.0011.71960.14330.3785
580.0156-0.01320.00112.1950.18290.4277
590.0166-0.01320.00112.1970.18310.4279
600.0176-0.01260.00112.02920.16910.4112



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