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, 06 Dec 2009 13:31:40 -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/06/t1260131640ys9cnljgkyhbg8e.htm/, Retrieved Sun, 05 May 2024 23:12:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64500, Retrieved Sun, 05 May 2024 23:12:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact209
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [estimation of ARM...] [2007-12-06 10:08:23] [dc28704e2f48edede7e5c93fa6811a5e]
- RMPD    [ARIMA Forecasting] [] [2009-12-06 20:31:40] [026d431dc78a3ce53a040b5408fc0322] [Current]
-   PD      [ARIMA Forecasting] [Forecasting Melk] [2009-12-19 11:57:06] [a94022e7c2399c0f4d62eea578db3411]
Feedback Forum

Post a new message
Dataseries X:
111.5
108.1
124.5
106.3
111.1
121.3
116.5
117.4
123.6
98.4
107.2
118.9
111.9
115.2
124.4
104.6
117
126.2
117.5
122.2
124.1
105.8
107.5
125.6
112.1
120.1
130.6
109.8
122.1
129.5
132.1
133.3
128.4
114.7
114.1
136.9
123.4
134
137
127.8
140.1
140.4
157.8
151.8
141.1
138.8
141.1
139.5
150.7
144.4
146
143.6
143.1
156.4
164.8
145.1
153.4
133.2
131.4
145.9




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64500&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[48])
36136.9-------
37123.4-------
38134-------
39137-------
40127.8-------
41140.1-------
42140.4-------
43157.8-------
44151.8-------
45141.1-------
46138.8-------
47141.1-------
48139.5-------
49150.7146.9235137.6421156.20480.21260.941510.9415
50144.4157.8096148.4998167.11930.00240.932810.9999
51146146.7343137.3038156.16470.43940.68620.97850.9337
52143.6145.5258134.2525156.79910.36890.46710.9990.8526
53143.1164.712153.2248176.19921e-040.999811
54156.4152.539141.0413164.03670.25520.94620.98070.9869
55164.8174.3141161.5474187.08080.07210.9970.99441
56145.1174.5215161.4581187.584900.92770.99971
57153.4156.203143.0941169.31190.33760.95160.9880.9937
58133.2154.2148140.4203168.00930.00140.54610.98570.9817
59131.4162.5795148.3553176.8037010.99850.9993
60145.9156.154141.8621170.44590.07980.99970.98880.9888

\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 & 136.9 & - & - & - & - & - & - & - \tabularnewline
37 & 123.4 & - & - & - & - & - & - & - \tabularnewline
38 & 134 & - & - & - & - & - & - & - \tabularnewline
39 & 137 & - & - & - & - & - & - & - \tabularnewline
40 & 127.8 & - & - & - & - & - & - & - \tabularnewline
41 & 140.1 & - & - & - & - & - & - & - \tabularnewline
42 & 140.4 & - & - & - & - & - & - & - \tabularnewline
43 & 157.8 & - & - & - & - & - & - & - \tabularnewline
44 & 151.8 & - & - & - & - & - & - & - \tabularnewline
45 & 141.1 & - & - & - & - & - & - & - \tabularnewline
46 & 138.8 & - & - & - & - & - & - & - \tabularnewline
47 & 141.1 & - & - & - & - & - & - & - \tabularnewline
48 & 139.5 & - & - & - & - & - & - & - \tabularnewline
49 & 150.7 & 146.9235 & 137.6421 & 156.2048 & 0.2126 & 0.9415 & 1 & 0.9415 \tabularnewline
50 & 144.4 & 157.8096 & 148.4998 & 167.1193 & 0.0024 & 0.9328 & 1 & 0.9999 \tabularnewline
51 & 146 & 146.7343 & 137.3038 & 156.1647 & 0.4394 & 0.6862 & 0.9785 & 0.9337 \tabularnewline
52 & 143.6 & 145.5258 & 134.2525 & 156.7991 & 0.3689 & 0.4671 & 0.999 & 0.8526 \tabularnewline
53 & 143.1 & 164.712 & 153.2248 & 176.1992 & 1e-04 & 0.9998 & 1 & 1 \tabularnewline
54 & 156.4 & 152.539 & 141.0413 & 164.0367 & 0.2552 & 0.9462 & 0.9807 & 0.9869 \tabularnewline
55 & 164.8 & 174.3141 & 161.5474 & 187.0808 & 0.0721 & 0.997 & 0.9944 & 1 \tabularnewline
56 & 145.1 & 174.5215 & 161.4581 & 187.5849 & 0 & 0.9277 & 0.9997 & 1 \tabularnewline
57 & 153.4 & 156.203 & 143.0941 & 169.3119 & 0.3376 & 0.9516 & 0.988 & 0.9937 \tabularnewline
58 & 133.2 & 154.2148 & 140.4203 & 168.0093 & 0.0014 & 0.5461 & 0.9857 & 0.9817 \tabularnewline
59 & 131.4 & 162.5795 & 148.3553 & 176.8037 & 0 & 1 & 0.9985 & 0.9993 \tabularnewline
60 & 145.9 & 156.154 & 141.8621 & 170.4459 & 0.0798 & 0.9997 & 0.9888 & 0.9888 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64500&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]136.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]123.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]134[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]127.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]140.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]140.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]157.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]151.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]141.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]138.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]141.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]139.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]150.7[/C][C]146.9235[/C][C]137.6421[/C][C]156.2048[/C][C]0.2126[/C][C]0.9415[/C][C]1[/C][C]0.9415[/C][/ROW]
[ROW][C]50[/C][C]144.4[/C][C]157.8096[/C][C]148.4998[/C][C]167.1193[/C][C]0.0024[/C][C]0.9328[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]51[/C][C]146[/C][C]146.7343[/C][C]137.3038[/C][C]156.1647[/C][C]0.4394[/C][C]0.6862[/C][C]0.9785[/C][C]0.9337[/C][/ROW]
[ROW][C]52[/C][C]143.6[/C][C]145.5258[/C][C]134.2525[/C][C]156.7991[/C][C]0.3689[/C][C]0.4671[/C][C]0.999[/C][C]0.8526[/C][/ROW]
[ROW][C]53[/C][C]143.1[/C][C]164.712[/C][C]153.2248[/C][C]176.1992[/C][C]1e-04[/C][C]0.9998[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]156.4[/C][C]152.539[/C][C]141.0413[/C][C]164.0367[/C][C]0.2552[/C][C]0.9462[/C][C]0.9807[/C][C]0.9869[/C][/ROW]
[ROW][C]55[/C][C]164.8[/C][C]174.3141[/C][C]161.5474[/C][C]187.0808[/C][C]0.0721[/C][C]0.997[/C][C]0.9944[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]145.1[/C][C]174.5215[/C][C]161.4581[/C][C]187.5849[/C][C]0[/C][C]0.9277[/C][C]0.9997[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]153.4[/C][C]156.203[/C][C]143.0941[/C][C]169.3119[/C][C]0.3376[/C][C]0.9516[/C][C]0.988[/C][C]0.9937[/C][/ROW]
[ROW][C]58[/C][C]133.2[/C][C]154.2148[/C][C]140.4203[/C][C]168.0093[/C][C]0.0014[/C][C]0.5461[/C][C]0.9857[/C][C]0.9817[/C][/ROW]
[ROW][C]59[/C][C]131.4[/C][C]162.5795[/C][C]148.3553[/C][C]176.8037[/C][C]0[/C][C]1[/C][C]0.9985[/C][C]0.9993[/C][/ROW]
[ROW][C]60[/C][C]145.9[/C][C]156.154[/C][C]141.8621[/C][C]170.4459[/C][C]0.0798[/C][C]0.9997[/C][C]0.9888[/C][C]0.9888[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64500&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64500&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])
36136.9-------
37123.4-------
38134-------
39137-------
40127.8-------
41140.1-------
42140.4-------
43157.8-------
44151.8-------
45141.1-------
46138.8-------
47141.1-------
48139.5-------
49150.7146.9235137.6421156.20480.21260.941510.9415
50144.4157.8096148.4998167.11930.00240.932810.9999
51146146.7343137.3038156.16470.43940.68620.97850.9337
52143.6145.5258134.2525156.79910.36890.46710.9990.8526
53143.1164.712153.2248176.19921e-040.999811
54156.4152.539141.0413164.03670.25520.94620.98070.9869
55164.8174.3141161.5474187.08080.07210.9970.99441
56145.1174.5215161.4581187.584900.92770.99971
57153.4156.203143.0941169.31190.33760.95160.9880.9937
58133.2154.2148140.4203168.00930.00140.54610.98570.9817
59131.4162.5795148.3553176.8037010.99850.9993
60145.9156.154141.8621170.44590.07980.99970.98880.9888







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03220.02570.002114.26231.18851.0902
500.0301-0.0850.0071179.817214.98483.871
510.0328-0.0054e-040.53910.04490.212
520.0395-0.01320.00113.70870.30910.5559
530.0356-0.13120.0109467.07838.92326.2388
540.03850.02530.002114.90731.24231.1146
550.0374-0.05460.004590.51847.54322.7465
560.0382-0.16860.014865.624572.13548.4933
570.0428-0.01790.00157.85680.65470.8092
580.0456-0.13630.0114441.62236.80186.0665
590.0446-0.19180.016972.162281.01359.0008
600.0467-0.06570.0055105.14458.7622.9601

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0322 & 0.0257 & 0.0021 & 14.2623 & 1.1885 & 1.0902 \tabularnewline
50 & 0.0301 & -0.085 & 0.0071 & 179.8172 & 14.9848 & 3.871 \tabularnewline
51 & 0.0328 & -0.005 & 4e-04 & 0.5391 & 0.0449 & 0.212 \tabularnewline
52 & 0.0395 & -0.0132 & 0.0011 & 3.7087 & 0.3091 & 0.5559 \tabularnewline
53 & 0.0356 & -0.1312 & 0.0109 & 467.078 & 38.9232 & 6.2388 \tabularnewline
54 & 0.0385 & 0.0253 & 0.0021 & 14.9073 & 1.2423 & 1.1146 \tabularnewline
55 & 0.0374 & -0.0546 & 0.0045 & 90.5184 & 7.5432 & 2.7465 \tabularnewline
56 & 0.0382 & -0.1686 & 0.014 & 865.6245 & 72.1354 & 8.4933 \tabularnewline
57 & 0.0428 & -0.0179 & 0.0015 & 7.8568 & 0.6547 & 0.8092 \tabularnewline
58 & 0.0456 & -0.1363 & 0.0114 & 441.622 & 36.8018 & 6.0665 \tabularnewline
59 & 0.0446 & -0.1918 & 0.016 & 972.1622 & 81.0135 & 9.0008 \tabularnewline
60 & 0.0467 & -0.0657 & 0.0055 & 105.1445 & 8.762 & 2.9601 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64500&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.0322[/C][C]0.0257[/C][C]0.0021[/C][C]14.2623[/C][C]1.1885[/C][C]1.0902[/C][/ROW]
[ROW][C]50[/C][C]0.0301[/C][C]-0.085[/C][C]0.0071[/C][C]179.8172[/C][C]14.9848[/C][C]3.871[/C][/ROW]
[ROW][C]51[/C][C]0.0328[/C][C]-0.005[/C][C]4e-04[/C][C]0.5391[/C][C]0.0449[/C][C]0.212[/C][/ROW]
[ROW][C]52[/C][C]0.0395[/C][C]-0.0132[/C][C]0.0011[/C][C]3.7087[/C][C]0.3091[/C][C]0.5559[/C][/ROW]
[ROW][C]53[/C][C]0.0356[/C][C]-0.1312[/C][C]0.0109[/C][C]467.078[/C][C]38.9232[/C][C]6.2388[/C][/ROW]
[ROW][C]54[/C][C]0.0385[/C][C]0.0253[/C][C]0.0021[/C][C]14.9073[/C][C]1.2423[/C][C]1.1146[/C][/ROW]
[ROW][C]55[/C][C]0.0374[/C][C]-0.0546[/C][C]0.0045[/C][C]90.5184[/C][C]7.5432[/C][C]2.7465[/C][/ROW]
[ROW][C]56[/C][C]0.0382[/C][C]-0.1686[/C][C]0.014[/C][C]865.6245[/C][C]72.1354[/C][C]8.4933[/C][/ROW]
[ROW][C]57[/C][C]0.0428[/C][C]-0.0179[/C][C]0.0015[/C][C]7.8568[/C][C]0.6547[/C][C]0.8092[/C][/ROW]
[ROW][C]58[/C][C]0.0456[/C][C]-0.1363[/C][C]0.0114[/C][C]441.622[/C][C]36.8018[/C][C]6.0665[/C][/ROW]
[ROW][C]59[/C][C]0.0446[/C][C]-0.1918[/C][C]0.016[/C][C]972.1622[/C][C]81.0135[/C][C]9.0008[/C][/ROW]
[ROW][C]60[/C][C]0.0467[/C][C]-0.0657[/C][C]0.0055[/C][C]105.1445[/C][C]8.762[/C][C]2.9601[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64500&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64500&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.03220.02570.002114.26231.18851.0902
500.0301-0.0850.0071179.817214.98483.871
510.0328-0.0054e-040.53910.04490.212
520.0395-0.01320.00113.70870.30910.5559
530.0356-0.13120.0109467.07838.92326.2388
540.03850.02530.002114.90731.24231.1146
550.0374-0.05460.004590.51847.54322.7465
560.0382-0.16860.014865.624572.13548.4933
570.0428-0.01790.00157.85680.65470.8092
580.0456-0.13630.0114441.62236.80186.0665
590.0446-0.19180.016972.162281.01359.0008
600.0467-0.06570.0055105.14458.7622.9601



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