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, 27 Dec 2010 23:53:05 +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/28/t1293493844iinfgmon9ig3mz0.htm/, Retrieved Sun, 05 May 2024 02:15:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116191, Retrieved Sun, 05 May 2024 02:15:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact154
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2010-12-14 14:53:43] [c91278f1cd2d8b4eeb874e50bb706c21]
-    D  [ARIMA Forecasting] [] [2010-12-19 14:50:10] [c91278f1cd2d8b4eeb874e50bb706c21]
-   PD    [ARIMA Forecasting] [] [2010-12-21 16:48:41] [c91278f1cd2d8b4eeb874e50bb706c21]
-   P         [ARIMA Forecasting] [] [2010-12-27 23:53:05] [4dbe485270073769796ed1462cddce37] [Current]
Feedback Forum

Post a new message
Dataseries X:
224
215
196
159
187
208
131
93
210
228
176
195
188
188
190
188
176
225
93
79
235
247
195
197
211
156
209
180
185
303
129
85
249
231
212
240
234
217
287
221
208
241
156
96
320
242
227
200
215
238
279
208
262
259
167
123
302
246
235




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116191&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116191&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116191&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[47])
35212-------
36240-------
37234-------
38217-------
39287-------
40221-------
41208-------
42241-------
43156-------
4496-------
45320-------
46242-------
47227-------
48200239.9577178.4672301.44830.10140.66020.49950.6602
49215232.3678167.6591297.07650.29940.83660.48030.5646
50238213.8844148.7496279.01930.2340.48660.46270.3465
51279268.688203.501333.8750.37830.82190.2910.895
52208210.3145.1066275.49340.47240.01940.37380.3078
53262203.1355137.9413268.32960.03840.44190.44190.2365
54259238.8061173.6118304.00040.27190.24280.47370.6387
55167149.156383.962214.35050.29585e-040.41850.0096
5612394.481629.2873159.67580.19560.01460.48180
57302299.8479234.6537365.04210.474210.27230.9857
58246240.136174.9424305.32960.430.03140.47770.6536
59235219.062153.8737284.25030.31590.2090.40570.4057

\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[47]) \tabularnewline
35 & 212 & - & - & - & - & - & - & - \tabularnewline
36 & 240 & - & - & - & - & - & - & - \tabularnewline
37 & 234 & - & - & - & - & - & - & - \tabularnewline
38 & 217 & - & - & - & - & - & - & - \tabularnewline
39 & 287 & - & - & - & - & - & - & - \tabularnewline
40 & 221 & - & - & - & - & - & - & - \tabularnewline
41 & 208 & - & - & - & - & - & - & - \tabularnewline
42 & 241 & - & - & - & - & - & - & - \tabularnewline
43 & 156 & - & - & - & - & - & - & - \tabularnewline
44 & 96 & - & - & - & - & - & - & - \tabularnewline
45 & 320 & - & - & - & - & - & - & - \tabularnewline
46 & 242 & - & - & - & - & - & - & - \tabularnewline
47 & 227 & - & - & - & - & - & - & - \tabularnewline
48 & 200 & 239.9577 & 178.4672 & 301.4483 & 0.1014 & 0.6602 & 0.4995 & 0.6602 \tabularnewline
49 & 215 & 232.3678 & 167.6591 & 297.0765 & 0.2994 & 0.8366 & 0.4803 & 0.5646 \tabularnewline
50 & 238 & 213.8844 & 148.7496 & 279.0193 & 0.234 & 0.4866 & 0.4627 & 0.3465 \tabularnewline
51 & 279 & 268.688 & 203.501 & 333.875 & 0.3783 & 0.8219 & 0.291 & 0.895 \tabularnewline
52 & 208 & 210.3 & 145.1066 & 275.4934 & 0.4724 & 0.0194 & 0.3738 & 0.3078 \tabularnewline
53 & 262 & 203.1355 & 137.9413 & 268.3296 & 0.0384 & 0.4419 & 0.4419 & 0.2365 \tabularnewline
54 & 259 & 238.8061 & 173.6118 & 304.0004 & 0.2719 & 0.2428 & 0.4737 & 0.6387 \tabularnewline
55 & 167 & 149.1563 & 83.962 & 214.3505 & 0.2958 & 5e-04 & 0.4185 & 0.0096 \tabularnewline
56 & 123 & 94.4816 & 29.2873 & 159.6758 & 0.1956 & 0.0146 & 0.4818 & 0 \tabularnewline
57 & 302 & 299.8479 & 234.6537 & 365.0421 & 0.4742 & 1 & 0.2723 & 0.9857 \tabularnewline
58 & 246 & 240.136 & 174.9424 & 305.3296 & 0.43 & 0.0314 & 0.4777 & 0.6536 \tabularnewline
59 & 235 & 219.062 & 153.8737 & 284.2503 & 0.3159 & 0.209 & 0.4057 & 0.4057 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116191&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[47])[/C][/ROW]
[ROW][C]35[/C][C]212[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]234[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]217[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]287[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]221[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]208[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]241[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]156[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]320[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]242[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]227[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]200[/C][C]239.9577[/C][C]178.4672[/C][C]301.4483[/C][C]0.1014[/C][C]0.6602[/C][C]0.4995[/C][C]0.6602[/C][/ROW]
[ROW][C]49[/C][C]215[/C][C]232.3678[/C][C]167.6591[/C][C]297.0765[/C][C]0.2994[/C][C]0.8366[/C][C]0.4803[/C][C]0.5646[/C][/ROW]
[ROW][C]50[/C][C]238[/C][C]213.8844[/C][C]148.7496[/C][C]279.0193[/C][C]0.234[/C][C]0.4866[/C][C]0.4627[/C][C]0.3465[/C][/ROW]
[ROW][C]51[/C][C]279[/C][C]268.688[/C][C]203.501[/C][C]333.875[/C][C]0.3783[/C][C]0.8219[/C][C]0.291[/C][C]0.895[/C][/ROW]
[ROW][C]52[/C][C]208[/C][C]210.3[/C][C]145.1066[/C][C]275.4934[/C][C]0.4724[/C][C]0.0194[/C][C]0.3738[/C][C]0.3078[/C][/ROW]
[ROW][C]53[/C][C]262[/C][C]203.1355[/C][C]137.9413[/C][C]268.3296[/C][C]0.0384[/C][C]0.4419[/C][C]0.4419[/C][C]0.2365[/C][/ROW]
[ROW][C]54[/C][C]259[/C][C]238.8061[/C][C]173.6118[/C][C]304.0004[/C][C]0.2719[/C][C]0.2428[/C][C]0.4737[/C][C]0.6387[/C][/ROW]
[ROW][C]55[/C][C]167[/C][C]149.1563[/C][C]83.962[/C][C]214.3505[/C][C]0.2958[/C][C]5e-04[/C][C]0.4185[/C][C]0.0096[/C][/ROW]
[ROW][C]56[/C][C]123[/C][C]94.4816[/C][C]29.2873[/C][C]159.6758[/C][C]0.1956[/C][C]0.0146[/C][C]0.4818[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]302[/C][C]299.8479[/C][C]234.6537[/C][C]365.0421[/C][C]0.4742[/C][C]1[/C][C]0.2723[/C][C]0.9857[/C][/ROW]
[ROW][C]58[/C][C]246[/C][C]240.136[/C][C]174.9424[/C][C]305.3296[/C][C]0.43[/C][C]0.0314[/C][C]0.4777[/C][C]0.6536[/C][/ROW]
[ROW][C]59[/C][C]235[/C][C]219.062[/C][C]153.8737[/C][C]284.2503[/C][C]0.3159[/C][C]0.209[/C][C]0.4057[/C][C]0.4057[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116191&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116191&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[47])
35212-------
36240-------
37234-------
38217-------
39287-------
40221-------
41208-------
42241-------
43156-------
4496-------
45320-------
46242-------
47227-------
48200239.9577178.4672301.44830.10140.66020.49950.6602
49215232.3678167.6591297.07650.29940.83660.48030.5646
50238213.8844148.7496279.01930.2340.48660.46270.3465
51279268.688203.501333.8750.37830.82190.2910.895
52208210.3145.1066275.49340.47240.01940.37380.3078
53262203.1355137.9413268.32960.03840.44190.44190.2365
54259238.8061173.6118304.00040.27190.24280.47370.6387
55167149.156383.962214.35050.29585e-040.41850.0096
5612394.481629.2873159.67580.19560.01460.48180
57302299.8479234.6537365.04210.474210.27230.9857
58246240.136174.9424305.32960.430.03140.47770.6536
59235219.062153.8737284.25030.31590.2090.40570.4057







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
480.1307-0.166501596.61900
490.1421-0.07470.1206301.6408949.129930.808
500.15540.11280.118581.5603826.606728.7508
510.12380.03840.0981106.3371646.539325.4271
520.1582-0.01090.08075.2899518.289422.766
530.16370.28980.11553465.03331009.413431.7713
540.13930.08460.1111407.7937923.467830.3886
550.2230.11960.1122318.3994847.834229.1176
560.35210.30180.1332813.3017843.997329.0516
570.11090.00720.12064.6314760.060727.5692
580.13850.02440.111934.3866694.090326.3456
590.15180.07280.1086254.0195657.417725.6402

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
48 & 0.1307 & -0.1665 & 0 & 1596.619 & 0 & 0 \tabularnewline
49 & 0.1421 & -0.0747 & 0.1206 & 301.6408 & 949.1299 & 30.808 \tabularnewline
50 & 0.1554 & 0.1128 & 0.118 & 581.5603 & 826.6067 & 28.7508 \tabularnewline
51 & 0.1238 & 0.0384 & 0.0981 & 106.3371 & 646.5393 & 25.4271 \tabularnewline
52 & 0.1582 & -0.0109 & 0.0807 & 5.2899 & 518.2894 & 22.766 \tabularnewline
53 & 0.1637 & 0.2898 & 0.1155 & 3465.0333 & 1009.4134 & 31.7713 \tabularnewline
54 & 0.1393 & 0.0846 & 0.1111 & 407.7937 & 923.4678 & 30.3886 \tabularnewline
55 & 0.223 & 0.1196 & 0.1122 & 318.3994 & 847.8342 & 29.1176 \tabularnewline
56 & 0.3521 & 0.3018 & 0.1332 & 813.3017 & 843.9973 & 29.0516 \tabularnewline
57 & 0.1109 & 0.0072 & 0.1206 & 4.6314 & 760.0607 & 27.5692 \tabularnewline
58 & 0.1385 & 0.0244 & 0.1119 & 34.3866 & 694.0903 & 26.3456 \tabularnewline
59 & 0.1518 & 0.0728 & 0.1086 & 254.0195 & 657.4177 & 25.6402 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116191&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]48[/C][C]0.1307[/C][C]-0.1665[/C][C]0[/C][C]1596.619[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]49[/C][C]0.1421[/C][C]-0.0747[/C][C]0.1206[/C][C]301.6408[/C][C]949.1299[/C][C]30.808[/C][/ROW]
[ROW][C]50[/C][C]0.1554[/C][C]0.1128[/C][C]0.118[/C][C]581.5603[/C][C]826.6067[/C][C]28.7508[/C][/ROW]
[ROW][C]51[/C][C]0.1238[/C][C]0.0384[/C][C]0.0981[/C][C]106.3371[/C][C]646.5393[/C][C]25.4271[/C][/ROW]
[ROW][C]52[/C][C]0.1582[/C][C]-0.0109[/C][C]0.0807[/C][C]5.2899[/C][C]518.2894[/C][C]22.766[/C][/ROW]
[ROW][C]53[/C][C]0.1637[/C][C]0.2898[/C][C]0.1155[/C][C]3465.0333[/C][C]1009.4134[/C][C]31.7713[/C][/ROW]
[ROW][C]54[/C][C]0.1393[/C][C]0.0846[/C][C]0.1111[/C][C]407.7937[/C][C]923.4678[/C][C]30.3886[/C][/ROW]
[ROW][C]55[/C][C]0.223[/C][C]0.1196[/C][C]0.1122[/C][C]318.3994[/C][C]847.8342[/C][C]29.1176[/C][/ROW]
[ROW][C]56[/C][C]0.3521[/C][C]0.3018[/C][C]0.1332[/C][C]813.3017[/C][C]843.9973[/C][C]29.0516[/C][/ROW]
[ROW][C]57[/C][C]0.1109[/C][C]0.0072[/C][C]0.1206[/C][C]4.6314[/C][C]760.0607[/C][C]27.5692[/C][/ROW]
[ROW][C]58[/C][C]0.1385[/C][C]0.0244[/C][C]0.1119[/C][C]34.3866[/C][C]694.0903[/C][C]26.3456[/C][/ROW]
[ROW][C]59[/C][C]0.1518[/C][C]0.0728[/C][C]0.1086[/C][C]254.0195[/C][C]657.4177[/C][C]25.6402[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116191&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116191&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
480.1307-0.166501596.61900
490.1421-0.07470.1206301.6408949.129930.808
500.15540.11280.118581.5603826.606728.7508
510.12380.03840.0981106.3371646.539325.4271
520.1582-0.01090.08075.2899518.289422.766
530.16370.28980.11553465.03331009.413431.7713
540.13930.08460.1111407.7937923.467830.3886
550.2230.11960.1122318.3994847.834229.1176
560.35210.30180.1332813.3017843.997329.0516
570.11090.00720.12064.6314760.060727.5692
580.13850.02440.111934.3866694.090326.3456
590.15180.07280.1086254.0195657.417725.6402



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