Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 16 Jan 2008 03:06:53 -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/Jan/16/t1200477831wwirffcuu1zf2b3.htm/, Retrieved Wed, 15 May 2024 22:47:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7976, Retrieved Wed, 15 May 2024 22:47:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact270
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [PAPER, TIM, GIEL,...] [2007-12-20 13:27:36] [beddef6ae4019f3e51da5e10d233ec85]
-    D    [ARIMA Forecasting] [PAPER, TIM, GIEL,...] [2008-01-16 10:06:53] [5ac545ffb613273067e3916533dda4e8] [Current]
Feedback Forum

Post a new message
Dataseries X:
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




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7976&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7976&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7976&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[49])
37613-------
38611-------
39594-------
40595-------
41591-------
42589-------
43584-------
44573-------
45567-------
46569-------
47621-------
48629-------
49628-------
50612621.5291611.9299631.12840.02580.09320.98420.0932
51595603.0289588.352617.70590.14180.11550.8864e-04
52597606.3254588.0437624.60710.15870.88770.88770.0101
53593610.0714589.3114630.83150.05350.89140.96410.0453
54590608.4749585.7441631.20580.05560.9090.95340.0461
55580602.6413578.1505627.13210.0350.84420.93210.0212
56574594.5848568.4239620.74580.06150.86270.94710.0061
57573587.8106560.0442615.57690.14790.83520.92910.0023
58573591.6251562.3165620.93380.10650.89350.93490.0075
59620648.3555617.5641679.1470.035510.95920.9025
60626659.7485627.5411691.95590.020.99220.96930.9733
61620659.0976625.5567692.63850.01120.97340.96540.9654

\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[49]) \tabularnewline
37 & 613 & - & - & - & - & - & - & - \tabularnewline
38 & 611 & - & - & - & - & - & - & - \tabularnewline
39 & 594 & - & - & - & - & - & - & - \tabularnewline
40 & 595 & - & - & - & - & - & - & - \tabularnewline
41 & 591 & - & - & - & - & - & - & - \tabularnewline
42 & 589 & - & - & - & - & - & - & - \tabularnewline
43 & 584 & - & - & - & - & - & - & - \tabularnewline
44 & 573 & - & - & - & - & - & - & - \tabularnewline
45 & 567 & - & - & - & - & - & - & - \tabularnewline
46 & 569 & - & - & - & - & - & - & - \tabularnewline
47 & 621 & - & - & - & - & - & - & - \tabularnewline
48 & 629 & - & - & - & - & - & - & - \tabularnewline
49 & 628 & - & - & - & - & - & - & - \tabularnewline
50 & 612 & 621.5291 & 611.9299 & 631.1284 & 0.0258 & 0.0932 & 0.9842 & 0.0932 \tabularnewline
51 & 595 & 603.0289 & 588.352 & 617.7059 & 0.1418 & 0.1155 & 0.886 & 4e-04 \tabularnewline
52 & 597 & 606.3254 & 588.0437 & 624.6071 & 0.1587 & 0.8877 & 0.8877 & 0.0101 \tabularnewline
53 & 593 & 610.0714 & 589.3114 & 630.8315 & 0.0535 & 0.8914 & 0.9641 & 0.0453 \tabularnewline
54 & 590 & 608.4749 & 585.7441 & 631.2058 & 0.0556 & 0.909 & 0.9534 & 0.0461 \tabularnewline
55 & 580 & 602.6413 & 578.1505 & 627.1321 & 0.035 & 0.8442 & 0.9321 & 0.0212 \tabularnewline
56 & 574 & 594.5848 & 568.4239 & 620.7458 & 0.0615 & 0.8627 & 0.9471 & 0.0061 \tabularnewline
57 & 573 & 587.8106 & 560.0442 & 615.5769 & 0.1479 & 0.8352 & 0.9291 & 0.0023 \tabularnewline
58 & 573 & 591.6251 & 562.3165 & 620.9338 & 0.1065 & 0.8935 & 0.9349 & 0.0075 \tabularnewline
59 & 620 & 648.3555 & 617.5641 & 679.147 & 0.0355 & 1 & 0.9592 & 0.9025 \tabularnewline
60 & 626 & 659.7485 & 627.5411 & 691.9559 & 0.02 & 0.9922 & 0.9693 & 0.9733 \tabularnewline
61 & 620 & 659.0976 & 625.5567 & 692.6385 & 0.0112 & 0.9734 & 0.9654 & 0.9654 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7976&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[49])[/C][/ROW]
[ROW][C]37[/C][C]613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]595[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]589[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]584[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]567[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]569[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]621[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]612[/C][C]621.5291[/C][C]611.9299[/C][C]631.1284[/C][C]0.0258[/C][C]0.0932[/C][C]0.9842[/C][C]0.0932[/C][/ROW]
[ROW][C]51[/C][C]595[/C][C]603.0289[/C][C]588.352[/C][C]617.7059[/C][C]0.1418[/C][C]0.1155[/C][C]0.886[/C][C]4e-04[/C][/ROW]
[ROW][C]52[/C][C]597[/C][C]606.3254[/C][C]588.0437[/C][C]624.6071[/C][C]0.1587[/C][C]0.8877[/C][C]0.8877[/C][C]0.0101[/C][/ROW]
[ROW][C]53[/C][C]593[/C][C]610.0714[/C][C]589.3114[/C][C]630.8315[/C][C]0.0535[/C][C]0.8914[/C][C]0.9641[/C][C]0.0453[/C][/ROW]
[ROW][C]54[/C][C]590[/C][C]608.4749[/C][C]585.7441[/C][C]631.2058[/C][C]0.0556[/C][C]0.909[/C][C]0.9534[/C][C]0.0461[/C][/ROW]
[ROW][C]55[/C][C]580[/C][C]602.6413[/C][C]578.1505[/C][C]627.1321[/C][C]0.035[/C][C]0.8442[/C][C]0.9321[/C][C]0.0212[/C][/ROW]
[ROW][C]56[/C][C]574[/C][C]594.5848[/C][C]568.4239[/C][C]620.7458[/C][C]0.0615[/C][C]0.8627[/C][C]0.9471[/C][C]0.0061[/C][/ROW]
[ROW][C]57[/C][C]573[/C][C]587.8106[/C][C]560.0442[/C][C]615.5769[/C][C]0.1479[/C][C]0.8352[/C][C]0.9291[/C][C]0.0023[/C][/ROW]
[ROW][C]58[/C][C]573[/C][C]591.6251[/C][C]562.3165[/C][C]620.9338[/C][C]0.1065[/C][C]0.8935[/C][C]0.9349[/C][C]0.0075[/C][/ROW]
[ROW][C]59[/C][C]620[/C][C]648.3555[/C][C]617.5641[/C][C]679.147[/C][C]0.0355[/C][C]1[/C][C]0.9592[/C][C]0.9025[/C][/ROW]
[ROW][C]60[/C][C]626[/C][C]659.7485[/C][C]627.5411[/C][C]691.9559[/C][C]0.02[/C][C]0.9922[/C][C]0.9693[/C][C]0.9733[/C][/ROW]
[ROW][C]61[/C][C]620[/C][C]659.0976[/C][C]625.5567[/C][C]692.6385[/C][C]0.0112[/C][C]0.9734[/C][C]0.9654[/C][C]0.9654[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7976&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7976&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[49])
37613-------
38611-------
39594-------
40595-------
41591-------
42589-------
43584-------
44573-------
45567-------
46569-------
47621-------
48629-------
49628-------
50612621.5291611.9299631.12840.02580.09320.98420.0932
51595603.0289588.352617.70590.14180.11550.8864e-04
52597606.3254588.0437624.60710.15870.88770.88770.0101
53593610.0714589.3114630.83150.05350.89140.96410.0453
54590608.4749585.7441631.20580.05560.9090.95340.0461
55580602.6413578.1505627.13210.0350.84420.93210.0212
56574594.5848568.4239620.74580.06150.86270.94710.0061
57573587.8106560.0442615.57690.14790.83520.92910.0023
58573591.6251562.3165620.93380.10650.89350.93490.0075
59620648.3555617.5641679.1470.035510.95920.9025
60626659.7485627.5411691.95590.020.99220.96930.9733
61620659.0976625.5567692.63850.01120.97340.96540.9654







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0079-0.01530.001390.8047.5672.7508
510.0124-0.01330.001164.46375.3722.3178
520.0154-0.01540.001386.9637.24692.692
530.0174-0.0280.0023291.433424.28614.9281
540.0191-0.03040.0025341.32328.44365.3333
550.0207-0.03760.0031512.628642.71916.536
560.0224-0.03460.0029423.73535.31135.9423
570.0241-0.02520.0021219.353218.27944.2754
580.0253-0.03150.0026346.895728.9085.3766
590.0242-0.04370.0036804.035767.0038.1855
600.0249-0.05120.00431138.959494.91339.7423
610.026-0.05930.00491528.6212127.385111.2865

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0079 & -0.0153 & 0.0013 & 90.804 & 7.567 & 2.7508 \tabularnewline
51 & 0.0124 & -0.0133 & 0.0011 & 64.4637 & 5.372 & 2.3178 \tabularnewline
52 & 0.0154 & -0.0154 & 0.0013 & 86.963 & 7.2469 & 2.692 \tabularnewline
53 & 0.0174 & -0.028 & 0.0023 & 291.4334 & 24.2861 & 4.9281 \tabularnewline
54 & 0.0191 & -0.0304 & 0.0025 & 341.323 & 28.4436 & 5.3333 \tabularnewline
55 & 0.0207 & -0.0376 & 0.0031 & 512.6286 & 42.7191 & 6.536 \tabularnewline
56 & 0.0224 & -0.0346 & 0.0029 & 423.735 & 35.3113 & 5.9423 \tabularnewline
57 & 0.0241 & -0.0252 & 0.0021 & 219.3532 & 18.2794 & 4.2754 \tabularnewline
58 & 0.0253 & -0.0315 & 0.0026 & 346.8957 & 28.908 & 5.3766 \tabularnewline
59 & 0.0242 & -0.0437 & 0.0036 & 804.0357 & 67.003 & 8.1855 \tabularnewline
60 & 0.0249 & -0.0512 & 0.0043 & 1138.9594 & 94.9133 & 9.7423 \tabularnewline
61 & 0.026 & -0.0593 & 0.0049 & 1528.6212 & 127.3851 & 11.2865 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7976&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]50[/C][C]0.0079[/C][C]-0.0153[/C][C]0.0013[/C][C]90.804[/C][C]7.567[/C][C]2.7508[/C][/ROW]
[ROW][C]51[/C][C]0.0124[/C][C]-0.0133[/C][C]0.0011[/C][C]64.4637[/C][C]5.372[/C][C]2.3178[/C][/ROW]
[ROW][C]52[/C][C]0.0154[/C][C]-0.0154[/C][C]0.0013[/C][C]86.963[/C][C]7.2469[/C][C]2.692[/C][/ROW]
[ROW][C]53[/C][C]0.0174[/C][C]-0.028[/C][C]0.0023[/C][C]291.4334[/C][C]24.2861[/C][C]4.9281[/C][/ROW]
[ROW][C]54[/C][C]0.0191[/C][C]-0.0304[/C][C]0.0025[/C][C]341.323[/C][C]28.4436[/C][C]5.3333[/C][/ROW]
[ROW][C]55[/C][C]0.0207[/C][C]-0.0376[/C][C]0.0031[/C][C]512.6286[/C][C]42.7191[/C][C]6.536[/C][/ROW]
[ROW][C]56[/C][C]0.0224[/C][C]-0.0346[/C][C]0.0029[/C][C]423.735[/C][C]35.3113[/C][C]5.9423[/C][/ROW]
[ROW][C]57[/C][C]0.0241[/C][C]-0.0252[/C][C]0.0021[/C][C]219.3532[/C][C]18.2794[/C][C]4.2754[/C][/ROW]
[ROW][C]58[/C][C]0.0253[/C][C]-0.0315[/C][C]0.0026[/C][C]346.8957[/C][C]28.908[/C][C]5.3766[/C][/ROW]
[ROW][C]59[/C][C]0.0242[/C][C]-0.0437[/C][C]0.0036[/C][C]804.0357[/C][C]67.003[/C][C]8.1855[/C][/ROW]
[ROW][C]60[/C][C]0.0249[/C][C]-0.0512[/C][C]0.0043[/C][C]1138.9594[/C][C]94.9133[/C][C]9.7423[/C][/ROW]
[ROW][C]61[/C][C]0.026[/C][C]-0.0593[/C][C]0.0049[/C][C]1528.6212[/C][C]127.3851[/C][C]11.2865[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7976&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7976&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
500.0079-0.01530.001390.8047.5672.7508
510.0124-0.01330.001164.46375.3722.3178
520.0154-0.01540.001386.9637.24692.692
530.0174-0.0280.0023291.433424.28614.9281
540.0191-0.03040.0025341.32328.44365.3333
550.0207-0.03760.0031512.628642.71916.536
560.0224-0.03460.0029423.73535.31135.9423
570.0241-0.02520.0021219.353218.27944.2754
580.0253-0.03150.0026346.895728.9085.3766
590.0242-0.04370.0036804.035767.0038.1855
600.0249-0.05120.00431138.959494.91339.7423
610.026-0.05930.00491528.6212127.385111.2865



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