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 computationFri, 12 Dec 2008 15:17:43 -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/2008/Dec/12/t1229120399wrrz93skn5n58zp.htm/, Retrieved Fri, 17 May 2024 16:06:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32887, Retrieved Fri, 17 May 2024 16:06:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact244
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [Standard Deviation-Mean Plot] [vraag 5] [2008-11-29 13:37:39] [c45c87b96bbf32ffc2144fc37d767b2e]
- RMPD    [(Partial) Autocorrelation Function] [ACF] [2008-12-12 14:04:37] [c45c87b96bbf32ffc2144fc37d767b2e]
- RMP       [ARIMA Backward Selection] [ABSM] [2008-12-12 19:09:25] [c45c87b96bbf32ffc2144fc37d767b2e]
- RMP           [ARIMA Forecasting] [] [2008-12-12 22:17:43] [19ef54504342c1b076371d395a2ab19f] [Current]
Feedback Forum

Post a new message
Dataseries X:
493
481
462
457
442
439
488
521
501
485
464
460
467
460
448
443
436
431
484
510
513
503
471
471
476
475
470
461
455
456
517
525
523
519
509
512
519
517
510
509
501
507
569
580
578
565
547
555
562
561
555
544
537
543
594
611
613
611
594
595
591
589
584
573
567
569
621
629
628
612
595
597
593
590
580
574
573
573
620
626
620
588
566
557
561
549
532
526
511
499
555
565
542
527
510
514
517
508
493
490
469
478




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32887&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32887&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32887&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[90])
78573-------
79620-------
80626-------
81620-------
82588-------
83566-------
84557-------
85561-------
86549-------
87532-------
88526-------
89511-------
90499-------
91555548.3194534.7705561.86830.1669101
92565559.0986539.9375578.25970.2730.662501
93542553.0509529.5835576.51840.1780.159101
94527528.2551501.1572555.35290.46380.160100.9828
95510507.1278476.8315537.42420.42630.09931e-040.7005
96514501.484468.296534.67190.22990.30755e-040.5583
97517505.3719469.5248541.2190.26250.31860.00120.6362
98508495.7965457.4963534.09660.26610.13890.00320.4349
99493481.0726440.4673521.67790.28240.09680.0070.1934
100490474.8656432.0792517.6520.24410.20310.00960.1345
101469462.247417.3854507.10860.3840.11270.01660.0542
102478454.6603407.8154501.50520.16440.27430.03180.0318

\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[90]) \tabularnewline
78 & 573 & - & - & - & - & - & - & - \tabularnewline
79 & 620 & - & - & - & - & - & - & - \tabularnewline
80 & 626 & - & - & - & - & - & - & - \tabularnewline
81 & 620 & - & - & - & - & - & - & - \tabularnewline
82 & 588 & - & - & - & - & - & - & - \tabularnewline
83 & 566 & - & - & - & - & - & - & - \tabularnewline
84 & 557 & - & - & - & - & - & - & - \tabularnewline
85 & 561 & - & - & - & - & - & - & - \tabularnewline
86 & 549 & - & - & - & - & - & - & - \tabularnewline
87 & 532 & - & - & - & - & - & - & - \tabularnewline
88 & 526 & - & - & - & - & - & - & - \tabularnewline
89 & 511 & - & - & - & - & - & - & - \tabularnewline
90 & 499 & - & - & - & - & - & - & - \tabularnewline
91 & 555 & 548.3194 & 534.7705 & 561.8683 & 0.1669 & 1 & 0 & 1 \tabularnewline
92 & 565 & 559.0986 & 539.9375 & 578.2597 & 0.273 & 0.6625 & 0 & 1 \tabularnewline
93 & 542 & 553.0509 & 529.5835 & 576.5184 & 0.178 & 0.1591 & 0 & 1 \tabularnewline
94 & 527 & 528.2551 & 501.1572 & 555.3529 & 0.4638 & 0.1601 & 0 & 0.9828 \tabularnewline
95 & 510 & 507.1278 & 476.8315 & 537.4242 & 0.4263 & 0.0993 & 1e-04 & 0.7005 \tabularnewline
96 & 514 & 501.484 & 468.296 & 534.6719 & 0.2299 & 0.3075 & 5e-04 & 0.5583 \tabularnewline
97 & 517 & 505.3719 & 469.5248 & 541.219 & 0.2625 & 0.3186 & 0.0012 & 0.6362 \tabularnewline
98 & 508 & 495.7965 & 457.4963 & 534.0966 & 0.2661 & 0.1389 & 0.0032 & 0.4349 \tabularnewline
99 & 493 & 481.0726 & 440.4673 & 521.6779 & 0.2824 & 0.0968 & 0.007 & 0.1934 \tabularnewline
100 & 490 & 474.8656 & 432.0792 & 517.652 & 0.2441 & 0.2031 & 0.0096 & 0.1345 \tabularnewline
101 & 469 & 462.247 & 417.3854 & 507.1086 & 0.384 & 0.1127 & 0.0166 & 0.0542 \tabularnewline
102 & 478 & 454.6603 & 407.8154 & 501.5052 & 0.1644 & 0.2743 & 0.0318 & 0.0318 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32887&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[90])[/C][/ROW]
[ROW][C]78[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]626[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]588[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]557[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]549[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]499[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]555[/C][C]548.3194[/C][C]534.7705[/C][C]561.8683[/C][C]0.1669[/C][C]1[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]92[/C][C]565[/C][C]559.0986[/C][C]539.9375[/C][C]578.2597[/C][C]0.273[/C][C]0.6625[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]93[/C][C]542[/C][C]553.0509[/C][C]529.5835[/C][C]576.5184[/C][C]0.178[/C][C]0.1591[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]94[/C][C]527[/C][C]528.2551[/C][C]501.1572[/C][C]555.3529[/C][C]0.4638[/C][C]0.1601[/C][C]0[/C][C]0.9828[/C][/ROW]
[ROW][C]95[/C][C]510[/C][C]507.1278[/C][C]476.8315[/C][C]537.4242[/C][C]0.4263[/C][C]0.0993[/C][C]1e-04[/C][C]0.7005[/C][/ROW]
[ROW][C]96[/C][C]514[/C][C]501.484[/C][C]468.296[/C][C]534.6719[/C][C]0.2299[/C][C]0.3075[/C][C]5e-04[/C][C]0.5583[/C][/ROW]
[ROW][C]97[/C][C]517[/C][C]505.3719[/C][C]469.5248[/C][C]541.219[/C][C]0.2625[/C][C]0.3186[/C][C]0.0012[/C][C]0.6362[/C][/ROW]
[ROW][C]98[/C][C]508[/C][C]495.7965[/C][C]457.4963[/C][C]534.0966[/C][C]0.2661[/C][C]0.1389[/C][C]0.0032[/C][C]0.4349[/C][/ROW]
[ROW][C]99[/C][C]493[/C][C]481.0726[/C][C]440.4673[/C][C]521.6779[/C][C]0.2824[/C][C]0.0968[/C][C]0.007[/C][C]0.1934[/C][/ROW]
[ROW][C]100[/C][C]490[/C][C]474.8656[/C][C]432.0792[/C][C]517.652[/C][C]0.2441[/C][C]0.2031[/C][C]0.0096[/C][C]0.1345[/C][/ROW]
[ROW][C]101[/C][C]469[/C][C]462.247[/C][C]417.3854[/C][C]507.1086[/C][C]0.384[/C][C]0.1127[/C][C]0.0166[/C][C]0.0542[/C][/ROW]
[ROW][C]102[/C][C]478[/C][C]454.6603[/C][C]407.8154[/C][C]501.5052[/C][C]0.1644[/C][C]0.2743[/C][C]0.0318[/C][C]0.0318[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32887&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32887&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[90])
78573-------
79620-------
80626-------
81620-------
82588-------
83566-------
84557-------
85561-------
86549-------
87532-------
88526-------
89511-------
90499-------
91555548.3194534.7705561.86830.1669101
92565559.0986539.9375578.25970.2730.662501
93542553.0509529.5835576.51840.1780.159101
94527528.2551501.1572555.35290.46380.160100.9828
95510507.1278476.8315537.42420.42630.09931e-040.7005
96514501.484468.296534.67190.22990.30755e-040.5583
97517505.3719469.5248541.2190.26250.31860.00120.6362
98508495.7965457.4963534.09660.26610.13890.00320.4349
99493481.0726440.4673521.67790.28240.09680.0070.1934
100490474.8656432.0792517.6520.24410.20310.00960.1345
101469462.247417.3854507.10860.3840.11270.01660.0542
102478454.6603407.8154501.50520.16440.27430.03180.0318







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
910.01260.01220.00144.63033.71921.9285
920.01750.01069e-0434.82642.90221.7036
930.0216-0.020.0017122.122810.17693.1901
940.0262-0.00242e-041.57520.13130.3623
950.03050.00575e-048.24930.68740.8291
960.03380.0250.0021156.651213.05433.6131
970.03620.0230.0019135.212211.26773.3567
980.03940.02460.0021148.926212.41053.5229
990.04310.02480.0021142.263211.85533.4431
1000.0460.03190.0027229.049919.08754.3689
1010.04950.01460.001245.6033.80031.9494
1020.05260.05130.0043544.74145.39516.7376

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
91 & 0.0126 & 0.0122 & 0.001 & 44.6303 & 3.7192 & 1.9285 \tabularnewline
92 & 0.0175 & 0.0106 & 9e-04 & 34.8264 & 2.9022 & 1.7036 \tabularnewline
93 & 0.0216 & -0.02 & 0.0017 & 122.1228 & 10.1769 & 3.1901 \tabularnewline
94 & 0.0262 & -0.0024 & 2e-04 & 1.5752 & 0.1313 & 0.3623 \tabularnewline
95 & 0.0305 & 0.0057 & 5e-04 & 8.2493 & 0.6874 & 0.8291 \tabularnewline
96 & 0.0338 & 0.025 & 0.0021 & 156.6512 & 13.0543 & 3.6131 \tabularnewline
97 & 0.0362 & 0.023 & 0.0019 & 135.2122 & 11.2677 & 3.3567 \tabularnewline
98 & 0.0394 & 0.0246 & 0.0021 & 148.9262 & 12.4105 & 3.5229 \tabularnewline
99 & 0.0431 & 0.0248 & 0.0021 & 142.2632 & 11.8553 & 3.4431 \tabularnewline
100 & 0.046 & 0.0319 & 0.0027 & 229.0499 & 19.0875 & 4.3689 \tabularnewline
101 & 0.0495 & 0.0146 & 0.0012 & 45.603 & 3.8003 & 1.9494 \tabularnewline
102 & 0.0526 & 0.0513 & 0.0043 & 544.741 & 45.3951 & 6.7376 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32887&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]91[/C][C]0.0126[/C][C]0.0122[/C][C]0.001[/C][C]44.6303[/C][C]3.7192[/C][C]1.9285[/C][/ROW]
[ROW][C]92[/C][C]0.0175[/C][C]0.0106[/C][C]9e-04[/C][C]34.8264[/C][C]2.9022[/C][C]1.7036[/C][/ROW]
[ROW][C]93[/C][C]0.0216[/C][C]-0.02[/C][C]0.0017[/C][C]122.1228[/C][C]10.1769[/C][C]3.1901[/C][/ROW]
[ROW][C]94[/C][C]0.0262[/C][C]-0.0024[/C][C]2e-04[/C][C]1.5752[/C][C]0.1313[/C][C]0.3623[/C][/ROW]
[ROW][C]95[/C][C]0.0305[/C][C]0.0057[/C][C]5e-04[/C][C]8.2493[/C][C]0.6874[/C][C]0.8291[/C][/ROW]
[ROW][C]96[/C][C]0.0338[/C][C]0.025[/C][C]0.0021[/C][C]156.6512[/C][C]13.0543[/C][C]3.6131[/C][/ROW]
[ROW][C]97[/C][C]0.0362[/C][C]0.023[/C][C]0.0019[/C][C]135.2122[/C][C]11.2677[/C][C]3.3567[/C][/ROW]
[ROW][C]98[/C][C]0.0394[/C][C]0.0246[/C][C]0.0021[/C][C]148.9262[/C][C]12.4105[/C][C]3.5229[/C][/ROW]
[ROW][C]99[/C][C]0.0431[/C][C]0.0248[/C][C]0.0021[/C][C]142.2632[/C][C]11.8553[/C][C]3.4431[/C][/ROW]
[ROW][C]100[/C][C]0.046[/C][C]0.0319[/C][C]0.0027[/C][C]229.0499[/C][C]19.0875[/C][C]4.3689[/C][/ROW]
[ROW][C]101[/C][C]0.0495[/C][C]0.0146[/C][C]0.0012[/C][C]45.603[/C][C]3.8003[/C][C]1.9494[/C][/ROW]
[ROW][C]102[/C][C]0.0526[/C][C]0.0513[/C][C]0.0043[/C][C]544.741[/C][C]45.3951[/C][C]6.7376[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32887&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32887&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
910.01260.01220.00144.63033.71921.9285
920.01750.01069e-0434.82642.90221.7036
930.0216-0.020.0017122.122810.17693.1901
940.0262-0.00242e-041.57520.13130.3623
950.03050.00575e-048.24930.68740.8291
960.03380.0250.0021156.651213.05433.6131
970.03620.0230.0019135.212211.26773.3567
980.03940.02460.0021148.926212.41053.5229
990.04310.02480.0021142.263211.85533.4431
1000.0460.03190.0027229.049919.08754.3689
1010.04950.01460.001245.6033.80031.9494
1020.05260.05130.0043544.74145.39516.7376



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