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, 05 Dec 2011 11:06:32 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/05/t13231012526ax1bqvzbpbnz8v.htm/, Retrieved Fri, 03 May 2024 07:58:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151020, Retrieved Fri, 03 May 2024 07:58:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMPD  [(Partial) Autocorrelation Function] [] [2011-12-01 17:46:48] [86f7284edee3dbb8ea5c7e2dec87d892]
- R P     [(Partial) Autocorrelation Function] [] [2011-12-05 14:45:05] [86f7284edee3dbb8ea5c7e2dec87d892]
- RMP         [ARIMA Forecasting] [] [2011-12-05 16:06:32] [79818163420d1233b8d9d93d595e6c9e] [Current]
- R P           [ARIMA Forecasting] [] [2011-12-16 07:39:11] [86f7284edee3dbb8ea5c7e2dec87d892]
- RMPD            [Multiple Regression] [] [2011-12-23 12:25:40] [ad2d4c5ace9fa07b356a7b5098237581]
- R                 [Multiple Regression] [] [2011-12-23 12:45:24] [ad2d4c5ace9fa07b356a7b5098237581]
- RMPD          [Multiple Regression] [] [2011-12-16 11:27:07] [86f7284edee3dbb8ea5c7e2dec87d892]
- R               [Multiple Regression] [] [2011-12-17 18:08:25] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
579
572
560
551
537
541
588
607
599
578
563
566
561
554
540
526
512
505
554
584
569
540
522
526
527
516
503
489
479
475
524
552
532
511
492
492
493
481
462
457
442
439
488
521
501
485
464
460
467
460
448
443
436
431
484
510
513
503
471
471




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151020&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151020&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151020&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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])
36492-------
37493-------
38481-------
39462-------
40457-------
41442-------
42439-------
43488-------
44521-------
45501-------
46485-------
47464-------
48460-------
49467461.3537452.633470.07440.10220.619500.6195
50460450.5727440.0305461.11490.03980.001100.0398
51448433.2421.4555444.94450.0068000
52443426.3835413.6287439.13820.00534e-0400
53436412.0328398.3619425.70383e-04000
54431409.2682394.7437423.79260.00172e-0400
55484458.0956442.7663473.4255e-040.99971e-040.4038
56510489.1908473.0971505.28450.00560.73641e-040.9998
57513470.5724453.7492487.3957002e-040.891
58503452.7577435.2352470.2803002e-040.2089
59471432.672414.4767450.8673004e-040.0016
60471430.1947411.3497449.0397000.0010.001

\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 & 492 & - & - & - & - & - & - & - \tabularnewline
37 & 493 & - & - & - & - & - & - & - \tabularnewline
38 & 481 & - & - & - & - & - & - & - \tabularnewline
39 & 462 & - & - & - & - & - & - & - \tabularnewline
40 & 457 & - & - & - & - & - & - & - \tabularnewline
41 & 442 & - & - & - & - & - & - & - \tabularnewline
42 & 439 & - & - & - & - & - & - & - \tabularnewline
43 & 488 & - & - & - & - & - & - & - \tabularnewline
44 & 521 & - & - & - & - & - & - & - \tabularnewline
45 & 501 & - & - & - & - & - & - & - \tabularnewline
46 & 485 & - & - & - & - & - & - & - \tabularnewline
47 & 464 & - & - & - & - & - & - & - \tabularnewline
48 & 460 & - & - & - & - & - & - & - \tabularnewline
49 & 467 & 461.3537 & 452.633 & 470.0744 & 0.1022 & 0.6195 & 0 & 0.6195 \tabularnewline
50 & 460 & 450.5727 & 440.0305 & 461.1149 & 0.0398 & 0.0011 & 0 & 0.0398 \tabularnewline
51 & 448 & 433.2 & 421.4555 & 444.9445 & 0.0068 & 0 & 0 & 0 \tabularnewline
52 & 443 & 426.3835 & 413.6287 & 439.1382 & 0.0053 & 4e-04 & 0 & 0 \tabularnewline
53 & 436 & 412.0328 & 398.3619 & 425.7038 & 3e-04 & 0 & 0 & 0 \tabularnewline
54 & 431 & 409.2682 & 394.7437 & 423.7926 & 0.0017 & 2e-04 & 0 & 0 \tabularnewline
55 & 484 & 458.0956 & 442.7663 & 473.425 & 5e-04 & 0.9997 & 1e-04 & 0.4038 \tabularnewline
56 & 510 & 489.1908 & 473.0971 & 505.2845 & 0.0056 & 0.7364 & 1e-04 & 0.9998 \tabularnewline
57 & 513 & 470.5724 & 453.7492 & 487.3957 & 0 & 0 & 2e-04 & 0.891 \tabularnewline
58 & 503 & 452.7577 & 435.2352 & 470.2803 & 0 & 0 & 2e-04 & 0.2089 \tabularnewline
59 & 471 & 432.672 & 414.4767 & 450.8673 & 0 & 0 & 4e-04 & 0.0016 \tabularnewline
60 & 471 & 430.1947 & 411.3497 & 449.0397 & 0 & 0 & 0.001 & 0.001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151020&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]492[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]481[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]462[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]457[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]442[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]439[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]488[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]521[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]501[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]485[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]464[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]460[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]467[/C][C]461.3537[/C][C]452.633[/C][C]470.0744[/C][C]0.1022[/C][C]0.6195[/C][C]0[/C][C]0.6195[/C][/ROW]
[ROW][C]50[/C][C]460[/C][C]450.5727[/C][C]440.0305[/C][C]461.1149[/C][C]0.0398[/C][C]0.0011[/C][C]0[/C][C]0.0398[/C][/ROW]
[ROW][C]51[/C][C]448[/C][C]433.2[/C][C]421.4555[/C][C]444.9445[/C][C]0.0068[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]52[/C][C]443[/C][C]426.3835[/C][C]413.6287[/C][C]439.1382[/C][C]0.0053[/C][C]4e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]53[/C][C]436[/C][C]412.0328[/C][C]398.3619[/C][C]425.7038[/C][C]3e-04[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]54[/C][C]431[/C][C]409.2682[/C][C]394.7437[/C][C]423.7926[/C][C]0.0017[/C][C]2e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]55[/C][C]484[/C][C]458.0956[/C][C]442.7663[/C][C]473.425[/C][C]5e-04[/C][C]0.9997[/C][C]1e-04[/C][C]0.4038[/C][/ROW]
[ROW][C]56[/C][C]510[/C][C]489.1908[/C][C]473.0971[/C][C]505.2845[/C][C]0.0056[/C][C]0.7364[/C][C]1e-04[/C][C]0.9998[/C][/ROW]
[ROW][C]57[/C][C]513[/C][C]470.5724[/C][C]453.7492[/C][C]487.3957[/C][C]0[/C][C]0[/C][C]2e-04[/C][C]0.891[/C][/ROW]
[ROW][C]58[/C][C]503[/C][C]452.7577[/C][C]435.2352[/C][C]470.2803[/C][C]0[/C][C]0[/C][C]2e-04[/C][C]0.2089[/C][/ROW]
[ROW][C]59[/C][C]471[/C][C]432.672[/C][C]414.4767[/C][C]450.8673[/C][C]0[/C][C]0[/C][C]4e-04[/C][C]0.0016[/C][/ROW]
[ROW][C]60[/C][C]471[/C][C]430.1947[/C][C]411.3497[/C][C]449.0397[/C][C]0[/C][C]0[/C][C]0.001[/C][C]0.001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151020&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151020&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])
36492-------
37493-------
38481-------
39462-------
40457-------
41442-------
42439-------
43488-------
44521-------
45501-------
46485-------
47464-------
48460-------
49467461.3537452.633470.07440.10220.619500.6195
50460450.5727440.0305461.11490.03980.001100.0398
51448433.2421.4555444.94450.0068000
52443426.3835413.6287439.13820.00534e-0400
53436412.0328398.3619425.70383e-04000
54431409.2682394.7437423.79260.00172e-0400
55484458.0956442.7663473.4255e-040.99971e-040.4038
56510489.1908473.0971505.28450.00560.73641e-040.9998
57513470.5724453.7492487.3957002e-040.891
58503452.7577435.2352470.2803002e-040.2089
59471432.672414.4767450.8673004e-040.0016
60471430.1947411.3497449.0397000.0010.001







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.00960.0122031.881100
500.01190.02090.016688.873860.37757.7703
510.01380.03420.0224219.0413113.265410.6426
520.01530.0390.0266276.1096153.976512.4087
530.01690.05820.0329574.4244238.066115.4294
540.01810.05310.0363472.2728277.100516.6463
550.01710.05650.0392671.0364333.377118.2586
560.01680.04250.0396433.0215345.832618.5966
570.01820.09020.04521800.0979507.417722.5259
580.01970.1110.05182524.2856709.104526.629
590.02150.08860.05511469.0365778.189227.896
600.02230.09490.05841665.0711852.09629.1907

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0096 & 0.0122 & 0 & 31.8811 & 0 & 0 \tabularnewline
50 & 0.0119 & 0.0209 & 0.0166 & 88.8738 & 60.3775 & 7.7703 \tabularnewline
51 & 0.0138 & 0.0342 & 0.0224 & 219.0413 & 113.2654 & 10.6426 \tabularnewline
52 & 0.0153 & 0.039 & 0.0266 & 276.1096 & 153.9765 & 12.4087 \tabularnewline
53 & 0.0169 & 0.0582 & 0.0329 & 574.4244 & 238.0661 & 15.4294 \tabularnewline
54 & 0.0181 & 0.0531 & 0.0363 & 472.2728 & 277.1005 & 16.6463 \tabularnewline
55 & 0.0171 & 0.0565 & 0.0392 & 671.0364 & 333.3771 & 18.2586 \tabularnewline
56 & 0.0168 & 0.0425 & 0.0396 & 433.0215 & 345.8326 & 18.5966 \tabularnewline
57 & 0.0182 & 0.0902 & 0.0452 & 1800.0979 & 507.4177 & 22.5259 \tabularnewline
58 & 0.0197 & 0.111 & 0.0518 & 2524.2856 & 709.1045 & 26.629 \tabularnewline
59 & 0.0215 & 0.0886 & 0.0551 & 1469.0365 & 778.1892 & 27.896 \tabularnewline
60 & 0.0223 & 0.0949 & 0.0584 & 1665.0711 & 852.096 & 29.1907 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151020&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.0096[/C][C]0.0122[/C][C]0[/C][C]31.8811[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0119[/C][C]0.0209[/C][C]0.0166[/C][C]88.8738[/C][C]60.3775[/C][C]7.7703[/C][/ROW]
[ROW][C]51[/C][C]0.0138[/C][C]0.0342[/C][C]0.0224[/C][C]219.0413[/C][C]113.2654[/C][C]10.6426[/C][/ROW]
[ROW][C]52[/C][C]0.0153[/C][C]0.039[/C][C]0.0266[/C][C]276.1096[/C][C]153.9765[/C][C]12.4087[/C][/ROW]
[ROW][C]53[/C][C]0.0169[/C][C]0.0582[/C][C]0.0329[/C][C]574.4244[/C][C]238.0661[/C][C]15.4294[/C][/ROW]
[ROW][C]54[/C][C]0.0181[/C][C]0.0531[/C][C]0.0363[/C][C]472.2728[/C][C]277.1005[/C][C]16.6463[/C][/ROW]
[ROW][C]55[/C][C]0.0171[/C][C]0.0565[/C][C]0.0392[/C][C]671.0364[/C][C]333.3771[/C][C]18.2586[/C][/ROW]
[ROW][C]56[/C][C]0.0168[/C][C]0.0425[/C][C]0.0396[/C][C]433.0215[/C][C]345.8326[/C][C]18.5966[/C][/ROW]
[ROW][C]57[/C][C]0.0182[/C][C]0.0902[/C][C]0.0452[/C][C]1800.0979[/C][C]507.4177[/C][C]22.5259[/C][/ROW]
[ROW][C]58[/C][C]0.0197[/C][C]0.111[/C][C]0.0518[/C][C]2524.2856[/C][C]709.1045[/C][C]26.629[/C][/ROW]
[ROW][C]59[/C][C]0.0215[/C][C]0.0886[/C][C]0.0551[/C][C]1469.0365[/C][C]778.1892[/C][C]27.896[/C][/ROW]
[ROW][C]60[/C][C]0.0223[/C][C]0.0949[/C][C]0.0584[/C][C]1665.0711[/C][C]852.096[/C][C]29.1907[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151020&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151020&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.00960.0122031.881100
500.01190.02090.016688.873860.37757.7703
510.01380.03420.0224219.0413113.265410.6426
520.01530.0390.0266276.1096153.976512.4087
530.01690.05820.0329574.4244238.066115.4294
540.01810.05310.0363472.2728277.100516.6463
550.01710.05650.0392671.0364333.377118.2586
560.01680.04250.0396433.0215345.832618.5966
570.01820.09020.04521800.0979507.417722.5259
580.01970.1110.05182524.2856709.104526.629
590.02150.08860.05511469.0365778.189227.896
600.02230.09490.05841665.0711852.09629.1907



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,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')