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 computationThu, 22 Dec 2011 15:30:30 -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/22/t1324585848gmuwu3x2f3aumsl.htm/, Retrieved Fri, 03 May 2024 05:50:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159950, Retrieved Fri, 03 May 2024 05:50:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact67
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2011-12-22 20:30:30] [1e640daebbc6b5a89eef23229b5a56d5] [Current]
Feedback Forum

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




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.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 & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159950&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]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159950&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159950&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'Herman Ole Andreas Wold' @ wold.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[57])
45620-------
46588-------
47566-------
48557-------
49561-------
50549-------
51532-------
52526-------
53511-------
54499-------
55555-------
56565-------
57542-------
58527518.6705505.0466533.33450.13289e-0409e-04
59510502.4732484.9969521.7610.22220.006300
60514495.3071474.9027518.26550.05530.104900
61517498.62474.8507525.90150.09330.134609e-04
62508489.3257464.1996518.49740.10480.031502e-04
63493476.3179450.8059506.14480.13650.01871e-040
64490471.75445.0209503.30880.12850.09354e-040
65469459.6592433.0651491.1790.28070.02967e-040
66478449.919423.3431481.53990.04090.11850.00120
67528492.7248457.5562536.29530.05630.74610.00250.0133
68534500.2598462.1072548.3150.08440.12890.00410.0443
69518482.5541446.3349527.98680.06310.01320.00520.0052

\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[57]) \tabularnewline
45 & 620 & - & - & - & - & - & - & - \tabularnewline
46 & 588 & - & - & - & - & - & - & - \tabularnewline
47 & 566 & - & - & - & - & - & - & - \tabularnewline
48 & 557 & - & - & - & - & - & - & - \tabularnewline
49 & 561 & - & - & - & - & - & - & - \tabularnewline
50 & 549 & - & - & - & - & - & - & - \tabularnewline
51 & 532 & - & - & - & - & - & - & - \tabularnewline
52 & 526 & - & - & - & - & - & - & - \tabularnewline
53 & 511 & - & - & - & - & - & - & - \tabularnewline
54 & 499 & - & - & - & - & - & - & - \tabularnewline
55 & 555 & - & - & - & - & - & - & - \tabularnewline
56 & 565 & - & - & - & - & - & - & - \tabularnewline
57 & 542 & - & - & - & - & - & - & - \tabularnewline
58 & 527 & 518.6705 & 505.0466 & 533.3345 & 0.1328 & 9e-04 & 0 & 9e-04 \tabularnewline
59 & 510 & 502.4732 & 484.9969 & 521.761 & 0.2222 & 0.0063 & 0 & 0 \tabularnewline
60 & 514 & 495.3071 & 474.9027 & 518.2655 & 0.0553 & 0.1049 & 0 & 0 \tabularnewline
61 & 517 & 498.62 & 474.8507 & 525.9015 & 0.0933 & 0.1346 & 0 & 9e-04 \tabularnewline
62 & 508 & 489.3257 & 464.1996 & 518.4974 & 0.1048 & 0.0315 & 0 & 2e-04 \tabularnewline
63 & 493 & 476.3179 & 450.8059 & 506.1448 & 0.1365 & 0.0187 & 1e-04 & 0 \tabularnewline
64 & 490 & 471.75 & 445.0209 & 503.3088 & 0.1285 & 0.0935 & 4e-04 & 0 \tabularnewline
65 & 469 & 459.6592 & 433.0651 & 491.179 & 0.2807 & 0.0296 & 7e-04 & 0 \tabularnewline
66 & 478 & 449.919 & 423.3431 & 481.5399 & 0.0409 & 0.1185 & 0.0012 & 0 \tabularnewline
67 & 528 & 492.7248 & 457.5562 & 536.2953 & 0.0563 & 0.7461 & 0.0025 & 0.0133 \tabularnewline
68 & 534 & 500.2598 & 462.1072 & 548.315 & 0.0844 & 0.1289 & 0.0041 & 0.0443 \tabularnewline
69 & 518 & 482.5541 & 446.3349 & 527.9868 & 0.0631 & 0.0132 & 0.0052 & 0.0052 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159950&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[57])[/C][/ROW]
[ROW][C]45[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]588[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]557[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]549[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]499[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]542[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]527[/C][C]518.6705[/C][C]505.0466[/C][C]533.3345[/C][C]0.1328[/C][C]9e-04[/C][C]0[/C][C]9e-04[/C][/ROW]
[ROW][C]59[/C][C]510[/C][C]502.4732[/C][C]484.9969[/C][C]521.761[/C][C]0.2222[/C][C]0.0063[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]514[/C][C]495.3071[/C][C]474.9027[/C][C]518.2655[/C][C]0.0553[/C][C]0.1049[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]517[/C][C]498.62[/C][C]474.8507[/C][C]525.9015[/C][C]0.0933[/C][C]0.1346[/C][C]0[/C][C]9e-04[/C][/ROW]
[ROW][C]62[/C][C]508[/C][C]489.3257[/C][C]464.1996[/C][C]518.4974[/C][C]0.1048[/C][C]0.0315[/C][C]0[/C][C]2e-04[/C][/ROW]
[ROW][C]63[/C][C]493[/C][C]476.3179[/C][C]450.8059[/C][C]506.1448[/C][C]0.1365[/C][C]0.0187[/C][C]1e-04[/C][C]0[/C][/ROW]
[ROW][C]64[/C][C]490[/C][C]471.75[/C][C]445.0209[/C][C]503.3088[/C][C]0.1285[/C][C]0.0935[/C][C]4e-04[/C][C]0[/C][/ROW]
[ROW][C]65[/C][C]469[/C][C]459.6592[/C][C]433.0651[/C][C]491.179[/C][C]0.2807[/C][C]0.0296[/C][C]7e-04[/C][C]0[/C][/ROW]
[ROW][C]66[/C][C]478[/C][C]449.919[/C][C]423.3431[/C][C]481.5399[/C][C]0.0409[/C][C]0.1185[/C][C]0.0012[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]528[/C][C]492.7248[/C][C]457.5562[/C][C]536.2953[/C][C]0.0563[/C][C]0.7461[/C][C]0.0025[/C][C]0.0133[/C][/ROW]
[ROW][C]68[/C][C]534[/C][C]500.2598[/C][C]462.1072[/C][C]548.315[/C][C]0.0844[/C][C]0.1289[/C][C]0.0041[/C][C]0.0443[/C][/ROW]
[ROW][C]69[/C][C]518[/C][C]482.5541[/C][C]446.3349[/C][C]527.9868[/C][C]0.0631[/C][C]0.0132[/C][C]0.0052[/C][C]0.0052[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159950&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159950&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[57])
45620-------
46588-------
47566-------
48557-------
49561-------
50549-------
51532-------
52526-------
53511-------
54499-------
55555-------
56565-------
57542-------
58527518.6705505.0466533.33450.13289e-0409e-04
59510502.4732484.9969521.7610.22220.006300
60514495.3071474.9027518.26550.05530.104900
61517498.62474.8507525.90150.09330.134609e-04
62508489.3257464.1996518.49740.10480.031502e-04
63493476.3179450.8059506.14480.13650.01871e-040
64490471.75445.0209503.30880.12850.09354e-040
65469459.6592433.0651491.1790.28070.02967e-040
66478449.919423.3431481.53990.04090.11850.00120
67528492.7248457.5562536.29530.05630.74610.00250.0133
68534500.2598462.1072548.3150.08440.12890.00410.0443
69518482.5541446.3349527.98680.06310.01320.00520.0052







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.01440.0161069.380300
590.01960.0150.015556.652963.01667.9383
600.02360.03770.0229349.4263158.486512.5891
610.02790.03690.0264337.8259203.321314.2591
620.03040.03820.0288348.7302232.403115.2448
630.03190.0350.0298278.2923240.051315.4936
640.03410.03870.0311333.0615253.338515.9166
650.0350.02030.029787.2511232.577615.2505
660.03590.06240.0334788.544294.351617.1567
670.04510.07160.03721244.3373389.350219.732
680.0490.06740.03991138.3998457.445621.388
690.0480.07350.04271256.4114524.026122.8916

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0144 & 0.0161 & 0 & 69.3803 & 0 & 0 \tabularnewline
59 & 0.0196 & 0.015 & 0.0155 & 56.6529 & 63.0166 & 7.9383 \tabularnewline
60 & 0.0236 & 0.0377 & 0.0229 & 349.4263 & 158.4865 & 12.5891 \tabularnewline
61 & 0.0279 & 0.0369 & 0.0264 & 337.8259 & 203.3213 & 14.2591 \tabularnewline
62 & 0.0304 & 0.0382 & 0.0288 & 348.7302 & 232.4031 & 15.2448 \tabularnewline
63 & 0.0319 & 0.035 & 0.0298 & 278.2923 & 240.0513 & 15.4936 \tabularnewline
64 & 0.0341 & 0.0387 & 0.0311 & 333.0615 & 253.3385 & 15.9166 \tabularnewline
65 & 0.035 & 0.0203 & 0.0297 & 87.2511 & 232.5776 & 15.2505 \tabularnewline
66 & 0.0359 & 0.0624 & 0.0334 & 788.544 & 294.3516 & 17.1567 \tabularnewline
67 & 0.0451 & 0.0716 & 0.0372 & 1244.3373 & 389.3502 & 19.732 \tabularnewline
68 & 0.049 & 0.0674 & 0.0399 & 1138.3998 & 457.4456 & 21.388 \tabularnewline
69 & 0.048 & 0.0735 & 0.0427 & 1256.4114 & 524.0261 & 22.8916 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159950&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]58[/C][C]0.0144[/C][C]0.0161[/C][C]0[/C][C]69.3803[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]0.0196[/C][C]0.015[/C][C]0.0155[/C][C]56.6529[/C][C]63.0166[/C][C]7.9383[/C][/ROW]
[ROW][C]60[/C][C]0.0236[/C][C]0.0377[/C][C]0.0229[/C][C]349.4263[/C][C]158.4865[/C][C]12.5891[/C][/ROW]
[ROW][C]61[/C][C]0.0279[/C][C]0.0369[/C][C]0.0264[/C][C]337.8259[/C][C]203.3213[/C][C]14.2591[/C][/ROW]
[ROW][C]62[/C][C]0.0304[/C][C]0.0382[/C][C]0.0288[/C][C]348.7302[/C][C]232.4031[/C][C]15.2448[/C][/ROW]
[ROW][C]63[/C][C]0.0319[/C][C]0.035[/C][C]0.0298[/C][C]278.2923[/C][C]240.0513[/C][C]15.4936[/C][/ROW]
[ROW][C]64[/C][C]0.0341[/C][C]0.0387[/C][C]0.0311[/C][C]333.0615[/C][C]253.3385[/C][C]15.9166[/C][/ROW]
[ROW][C]65[/C][C]0.035[/C][C]0.0203[/C][C]0.0297[/C][C]87.2511[/C][C]232.5776[/C][C]15.2505[/C][/ROW]
[ROW][C]66[/C][C]0.0359[/C][C]0.0624[/C][C]0.0334[/C][C]788.544[/C][C]294.3516[/C][C]17.1567[/C][/ROW]
[ROW][C]67[/C][C]0.0451[/C][C]0.0716[/C][C]0.0372[/C][C]1244.3373[/C][C]389.3502[/C][C]19.732[/C][/ROW]
[ROW][C]68[/C][C]0.049[/C][C]0.0674[/C][C]0.0399[/C][C]1138.3998[/C][C]457.4456[/C][C]21.388[/C][/ROW]
[ROW][C]69[/C][C]0.048[/C][C]0.0735[/C][C]0.0427[/C][C]1256.4114[/C][C]524.0261[/C][C]22.8916[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159950&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159950&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
580.01440.0161069.380300
590.01960.0150.015556.652963.01667.9383
600.02360.03770.0229349.4263158.486512.5891
610.02790.03690.0264337.8259203.321314.2591
620.03040.03820.0288348.7302232.403115.2448
630.03190.0350.0298278.2923240.051315.4936
640.03410.03870.0311333.0615253.338515.9166
650.0350.02030.029787.2511232.577615.2505
660.03590.06240.0334788.544294.351617.1567
670.04510.07160.03721244.3373389.350219.732
680.0490.06740.03991138.3998457.445621.388
690.0480.07350.04271256.4114524.026122.8916



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