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 computationTue, 14 Dec 2010 19:44:34 +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/14/t12923557521t5fngnup4wd807.htm/, Retrieved Thu, 02 May 2024 20:06:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110102, Retrieved Thu, 02 May 2024 20:06:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
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] [Forecasting beste...] [2009-12-14 19:02:57] [54d83950395cfb8ca1091bdb7440f70a]
-   PD      [ARIMA Forecasting] [] [2010-12-14 19:44:34] [d42b17bf3b3c0d56878eb3f5a4351e6d] [Current]
- R PD        [ARIMA Forecasting] [] [2010-12-16 20:55:17] [82643889efeee0b265cd2ff213e5137b]
Feedback Forum

Post a new message
Dataseries X:
493
514
522
490
484
506
501
462
465
454
464
427
460
473
465
422
415
413
420
363
376
380
384
346
389
407
393
346
348
353
364
305
307
312
312
286
324
336
327
302
299
311
315
264
278
278
287
279
324
354
354
360
363
385
412
370
389
395
417
404




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110102&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])
36286-------
37324-------
38336-------
39327-------
40302-------
41299-------
42311-------
43315-------
44264-------
45278-------
46278-------
47287-------
48279-------
49324314.3127295.2552333.37010.15950.99990.15950.9999
50354329.1425303.7163354.56860.02770.65410.29850.9999
51354322.6069291.8191353.39460.02280.02280.38990.9972
52360292.5453257.2712327.81931e-043e-040.29970.7742
53363289.1004249.832328.36881e-042e-040.31060.6929
54385300.8416257.9537343.72961e-040.00230.32120.8409
55412304.2171257.991350.443203e-040.32380.8575
56370253.9859204.6473303.3245000.34540.1602
57389264.7849212.5187317.0511000.31010.297
58395263.7128208.6748318.7508000.30540.2931
59417271.5315213.8537329.2094000.29960.3998
60404253.7858193.5877313.9839000.20580.2058

\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 & 286 & - & - & - & - & - & - & - \tabularnewline
37 & 324 & - & - & - & - & - & - & - \tabularnewline
38 & 336 & - & - & - & - & - & - & - \tabularnewline
39 & 327 & - & - & - & - & - & - & - \tabularnewline
40 & 302 & - & - & - & - & - & - & - \tabularnewline
41 & 299 & - & - & - & - & - & - & - \tabularnewline
42 & 311 & - & - & - & - & - & - & - \tabularnewline
43 & 315 & - & - & - & - & - & - & - \tabularnewline
44 & 264 & - & - & - & - & - & - & - \tabularnewline
45 & 278 & - & - & - & - & - & - & - \tabularnewline
46 & 278 & - & - & - & - & - & - & - \tabularnewline
47 & 287 & - & - & - & - & - & - & - \tabularnewline
48 & 279 & - & - & - & - & - & - & - \tabularnewline
49 & 324 & 314.3127 & 295.2552 & 333.3701 & 0.1595 & 0.9999 & 0.1595 & 0.9999 \tabularnewline
50 & 354 & 329.1425 & 303.7163 & 354.5686 & 0.0277 & 0.6541 & 0.2985 & 0.9999 \tabularnewline
51 & 354 & 322.6069 & 291.8191 & 353.3946 & 0.0228 & 0.0228 & 0.3899 & 0.9972 \tabularnewline
52 & 360 & 292.5453 & 257.2712 & 327.8193 & 1e-04 & 3e-04 & 0.2997 & 0.7742 \tabularnewline
53 & 363 & 289.1004 & 249.832 & 328.3688 & 1e-04 & 2e-04 & 0.3106 & 0.6929 \tabularnewline
54 & 385 & 300.8416 & 257.9537 & 343.7296 & 1e-04 & 0.0023 & 0.3212 & 0.8409 \tabularnewline
55 & 412 & 304.2171 & 257.991 & 350.4432 & 0 & 3e-04 & 0.3238 & 0.8575 \tabularnewline
56 & 370 & 253.9859 & 204.6473 & 303.3245 & 0 & 0 & 0.3454 & 0.1602 \tabularnewline
57 & 389 & 264.7849 & 212.5187 & 317.0511 & 0 & 0 & 0.3101 & 0.297 \tabularnewline
58 & 395 & 263.7128 & 208.6748 & 318.7508 & 0 & 0 & 0.3054 & 0.2931 \tabularnewline
59 & 417 & 271.5315 & 213.8537 & 329.2094 & 0 & 0 & 0.2996 & 0.3998 \tabularnewline
60 & 404 & 253.7858 & 193.5877 & 313.9839 & 0 & 0 & 0.2058 & 0.2058 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110102&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]286[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]324[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]336[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]327[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]299[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]311[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]315[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]264[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]278[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]278[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]287[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]279[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]324[/C][C]314.3127[/C][C]295.2552[/C][C]333.3701[/C][C]0.1595[/C][C]0.9999[/C][C]0.1595[/C][C]0.9999[/C][/ROW]
[ROW][C]50[/C][C]354[/C][C]329.1425[/C][C]303.7163[/C][C]354.5686[/C][C]0.0277[/C][C]0.6541[/C][C]0.2985[/C][C]0.9999[/C][/ROW]
[ROW][C]51[/C][C]354[/C][C]322.6069[/C][C]291.8191[/C][C]353.3946[/C][C]0.0228[/C][C]0.0228[/C][C]0.3899[/C][C]0.9972[/C][/ROW]
[ROW][C]52[/C][C]360[/C][C]292.5453[/C][C]257.2712[/C][C]327.8193[/C][C]1e-04[/C][C]3e-04[/C][C]0.2997[/C][C]0.7742[/C][/ROW]
[ROW][C]53[/C][C]363[/C][C]289.1004[/C][C]249.832[/C][C]328.3688[/C][C]1e-04[/C][C]2e-04[/C][C]0.3106[/C][C]0.6929[/C][/ROW]
[ROW][C]54[/C][C]385[/C][C]300.8416[/C][C]257.9537[/C][C]343.7296[/C][C]1e-04[/C][C]0.0023[/C][C]0.3212[/C][C]0.8409[/C][/ROW]
[ROW][C]55[/C][C]412[/C][C]304.2171[/C][C]257.991[/C][C]350.4432[/C][C]0[/C][C]3e-04[/C][C]0.3238[/C][C]0.8575[/C][/ROW]
[ROW][C]56[/C][C]370[/C][C]253.9859[/C][C]204.6473[/C][C]303.3245[/C][C]0[/C][C]0[/C][C]0.3454[/C][C]0.1602[/C][/ROW]
[ROW][C]57[/C][C]389[/C][C]264.7849[/C][C]212.5187[/C][C]317.0511[/C][C]0[/C][C]0[/C][C]0.3101[/C][C]0.297[/C][/ROW]
[ROW][C]58[/C][C]395[/C][C]263.7128[/C][C]208.6748[/C][C]318.7508[/C][C]0[/C][C]0[/C][C]0.3054[/C][C]0.2931[/C][/ROW]
[ROW][C]59[/C][C]417[/C][C]271.5315[/C][C]213.8537[/C][C]329.2094[/C][C]0[/C][C]0[/C][C]0.2996[/C][C]0.3998[/C][/ROW]
[ROW][C]60[/C][C]404[/C][C]253.7858[/C][C]193.5877[/C][C]313.9839[/C][C]0[/C][C]0[/C][C]0.2058[/C][C]0.2058[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110102&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110102&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])
36286-------
37324-------
38336-------
39327-------
40302-------
41299-------
42311-------
43315-------
44264-------
45278-------
46278-------
47287-------
48279-------
49324314.3127295.2552333.37010.15950.99990.15950.9999
50354329.1425303.7163354.56860.02770.65410.29850.9999
51354322.6069291.8191353.39460.02280.02280.38990.9972
52360292.5453257.2712327.81931e-043e-040.29970.7742
53363289.1004249.832328.36881e-042e-040.31060.6929
54385300.8416257.9537343.72961e-040.00230.32120.8409
55412304.2171257.991350.443203e-040.32380.8575
56370253.9859204.6473303.3245000.34540.1602
57389264.7849212.5187317.0511000.31010.297
58395263.7128208.6748318.7508000.30540.2931
59417271.5315213.8537329.2094000.29960.3998
60404253.7858193.5877313.9839000.20580.2058







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03090.03080.002693.84447.82042.7965
500.03940.07550.0063617.895851.49137.1757
510.04870.09730.0081985.529782.12759.0624
520.06150.23060.01924550.143379.178619.4725
530.06930.25560.02135461.1527455.096121.333
540.07270.27970.02337082.6299590.219224.2944
550.07750.35430.029511617.1587968.096631.1143
560.09910.45680.038113459.27591121.606333.4904
570.10070.46910.039115429.38921285.782435.8578
580.10650.49780.041517236.33251436.36137.8994
590.10840.53570.044621161.08031763.423441.9931
600.1210.59190.049322564.29841880.358243.3631

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0309 & 0.0308 & 0.0026 & 93.8444 & 7.8204 & 2.7965 \tabularnewline
50 & 0.0394 & 0.0755 & 0.0063 & 617.8958 & 51.4913 & 7.1757 \tabularnewline
51 & 0.0487 & 0.0973 & 0.0081 & 985.5297 & 82.1275 & 9.0624 \tabularnewline
52 & 0.0615 & 0.2306 & 0.0192 & 4550.143 & 379.1786 & 19.4725 \tabularnewline
53 & 0.0693 & 0.2556 & 0.0213 & 5461.1527 & 455.0961 & 21.333 \tabularnewline
54 & 0.0727 & 0.2797 & 0.0233 & 7082.6299 & 590.2192 & 24.2944 \tabularnewline
55 & 0.0775 & 0.3543 & 0.0295 & 11617.1587 & 968.0966 & 31.1143 \tabularnewline
56 & 0.0991 & 0.4568 & 0.0381 & 13459.2759 & 1121.6063 & 33.4904 \tabularnewline
57 & 0.1007 & 0.4691 & 0.0391 & 15429.3892 & 1285.7824 & 35.8578 \tabularnewline
58 & 0.1065 & 0.4978 & 0.0415 & 17236.3325 & 1436.361 & 37.8994 \tabularnewline
59 & 0.1084 & 0.5357 & 0.0446 & 21161.0803 & 1763.4234 & 41.9931 \tabularnewline
60 & 0.121 & 0.5919 & 0.0493 & 22564.2984 & 1880.3582 & 43.3631 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110102&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.0309[/C][C]0.0308[/C][C]0.0026[/C][C]93.8444[/C][C]7.8204[/C][C]2.7965[/C][/ROW]
[ROW][C]50[/C][C]0.0394[/C][C]0.0755[/C][C]0.0063[/C][C]617.8958[/C][C]51.4913[/C][C]7.1757[/C][/ROW]
[ROW][C]51[/C][C]0.0487[/C][C]0.0973[/C][C]0.0081[/C][C]985.5297[/C][C]82.1275[/C][C]9.0624[/C][/ROW]
[ROW][C]52[/C][C]0.0615[/C][C]0.2306[/C][C]0.0192[/C][C]4550.143[/C][C]379.1786[/C][C]19.4725[/C][/ROW]
[ROW][C]53[/C][C]0.0693[/C][C]0.2556[/C][C]0.0213[/C][C]5461.1527[/C][C]455.0961[/C][C]21.333[/C][/ROW]
[ROW][C]54[/C][C]0.0727[/C][C]0.2797[/C][C]0.0233[/C][C]7082.6299[/C][C]590.2192[/C][C]24.2944[/C][/ROW]
[ROW][C]55[/C][C]0.0775[/C][C]0.3543[/C][C]0.0295[/C][C]11617.1587[/C][C]968.0966[/C][C]31.1143[/C][/ROW]
[ROW][C]56[/C][C]0.0991[/C][C]0.4568[/C][C]0.0381[/C][C]13459.2759[/C][C]1121.6063[/C][C]33.4904[/C][/ROW]
[ROW][C]57[/C][C]0.1007[/C][C]0.4691[/C][C]0.0391[/C][C]15429.3892[/C][C]1285.7824[/C][C]35.8578[/C][/ROW]
[ROW][C]58[/C][C]0.1065[/C][C]0.4978[/C][C]0.0415[/C][C]17236.3325[/C][C]1436.361[/C][C]37.8994[/C][/ROW]
[ROW][C]59[/C][C]0.1084[/C][C]0.5357[/C][C]0.0446[/C][C]21161.0803[/C][C]1763.4234[/C][C]41.9931[/C][/ROW]
[ROW][C]60[/C][C]0.121[/C][C]0.5919[/C][C]0.0493[/C][C]22564.2984[/C][C]1880.3582[/C][C]43.3631[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110102&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110102&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.03090.03080.002693.84447.82042.7965
500.03940.07550.0063617.895851.49137.1757
510.04870.09730.0081985.529782.12759.0624
520.06150.23060.01924550.143379.178619.4725
530.06930.25560.02135461.1527455.096121.333
540.07270.27970.02337082.6299590.219224.2944
550.07750.35430.029511617.1587968.096631.1143
560.09910.45680.038113459.27591121.606333.4904
570.10070.46910.039115429.38921285.782435.8578
580.10650.49780.041517236.33251436.36137.8994
590.10840.53570.044621161.08031763.423441.9931
600.1210.59190.049322564.29841880.358243.3631



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