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, 23 Dec 2011 12:59:22 -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/23/t1324663175bv8e372hwz765nv.htm/, Retrieved Mon, 29 Apr 2024 18:29:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=160610, Retrieved Mon, 29 Apr 2024 18:29:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact64
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [] [2011-12-23 17:00:01] [a2638725f7f7c6bd63902ba17eba666b]
- RM      [ARIMA Forecasting] [] [2011-12-23 17:59:22] [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 time2 seconds
R Server'AstonUniversity' @ aston.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 & 2 seconds \tabularnewline
R Server & 'AstonUniversity' @ aston.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160610&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'AstonUniversity' @ aston.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160610&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160610&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 time2 seconds
R Server'AstonUniversity' @ aston.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-------
58527509.3661495.1264523.60580.0076000
59510487.0429466.9049507.18090.01271e-0400
60514477.2303452.5663501.89420.00170.004600
61517481.6682453.1887510.14760.00750.01300
62508469.0832437.2422500.92420.00830.001600
63493451.7442416.8641486.62420.01028e-0400
64490445.6548407.9801483.32950.01050.006900
65469429.6114389.3355469.88740.02760.001600
66478416.8285374.1094459.54760.00250.00831e-040
67528473.5878428.558518.61770.00890.42392e-040.0015
68534483.8051436.5775531.03280.01860.03334e-040.0079
69518459.7588410.4311509.08650.01030.00165e-045e-04

\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 & 509.3661 & 495.1264 & 523.6058 & 0.0076 & 0 & 0 & 0 \tabularnewline
59 & 510 & 487.0429 & 466.9049 & 507.1809 & 0.0127 & 1e-04 & 0 & 0 \tabularnewline
60 & 514 & 477.2303 & 452.5663 & 501.8942 & 0.0017 & 0.0046 & 0 & 0 \tabularnewline
61 & 517 & 481.6682 & 453.1887 & 510.1476 & 0.0075 & 0.013 & 0 & 0 \tabularnewline
62 & 508 & 469.0832 & 437.2422 & 500.9242 & 0.0083 & 0.0016 & 0 & 0 \tabularnewline
63 & 493 & 451.7442 & 416.8641 & 486.6242 & 0.0102 & 8e-04 & 0 & 0 \tabularnewline
64 & 490 & 445.6548 & 407.9801 & 483.3295 & 0.0105 & 0.0069 & 0 & 0 \tabularnewline
65 & 469 & 429.6114 & 389.3355 & 469.8874 & 0.0276 & 0.0016 & 0 & 0 \tabularnewline
66 & 478 & 416.8285 & 374.1094 & 459.5476 & 0.0025 & 0.0083 & 1e-04 & 0 \tabularnewline
67 & 528 & 473.5878 & 428.558 & 518.6177 & 0.0089 & 0.4239 & 2e-04 & 0.0015 \tabularnewline
68 & 534 & 483.8051 & 436.5775 & 531.0328 & 0.0186 & 0.0333 & 4e-04 & 0.0079 \tabularnewline
69 & 518 & 459.7588 & 410.4311 & 509.0865 & 0.0103 & 0.0016 & 5e-04 & 5e-04 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160610&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]509.3661[/C][C]495.1264[/C][C]523.6058[/C][C]0.0076[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]510[/C][C]487.0429[/C][C]466.9049[/C][C]507.1809[/C][C]0.0127[/C][C]1e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]514[/C][C]477.2303[/C][C]452.5663[/C][C]501.8942[/C][C]0.0017[/C][C]0.0046[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]517[/C][C]481.6682[/C][C]453.1887[/C][C]510.1476[/C][C]0.0075[/C][C]0.013[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]508[/C][C]469.0832[/C][C]437.2422[/C][C]500.9242[/C][C]0.0083[/C][C]0.0016[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]493[/C][C]451.7442[/C][C]416.8641[/C][C]486.6242[/C][C]0.0102[/C][C]8e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]64[/C][C]490[/C][C]445.6548[/C][C]407.9801[/C][C]483.3295[/C][C]0.0105[/C][C]0.0069[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]65[/C][C]469[/C][C]429.6114[/C][C]389.3355[/C][C]469.8874[/C][C]0.0276[/C][C]0.0016[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]66[/C][C]478[/C][C]416.8285[/C][C]374.1094[/C][C]459.5476[/C][C]0.0025[/C][C]0.0083[/C][C]1e-04[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]528[/C][C]473.5878[/C][C]428.558[/C][C]518.6177[/C][C]0.0089[/C][C]0.4239[/C][C]2e-04[/C][C]0.0015[/C][/ROW]
[ROW][C]68[/C][C]534[/C][C]483.8051[/C][C]436.5775[/C][C]531.0328[/C][C]0.0186[/C][C]0.0333[/C][C]4e-04[/C][C]0.0079[/C][/ROW]
[ROW][C]69[/C][C]518[/C][C]459.7588[/C][C]410.4311[/C][C]509.0865[/C][C]0.0103[/C][C]0.0016[/C][C]5e-04[/C][C]5e-04[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160610&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160610&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-------
58527509.3661495.1264523.60580.0076000
59510487.0429466.9049507.18090.01271e-0400
60514477.2303452.5663501.89420.00170.004600
61517481.6682453.1887510.14760.00750.01300
62508469.0832437.2422500.92420.00830.001600
63493451.7442416.8641486.62420.01028e-0400
64490445.6548407.9801483.32950.01050.006900
65469429.6114389.3355469.88740.02760.001600
66478416.8285374.1094459.54760.00250.00831e-040
67528473.5878428.558518.61770.00890.42392e-040.0015
68534483.8051436.5775531.03280.01860.03334e-040.0079
69518459.7588410.4311509.08650.01030.00165e-045e-04







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.01430.03460310.953800
590.02110.04710.0409527.0285418.991120.4693
600.02640.0770.05291352.0126729.998327.0185
610.03020.07340.0581248.3388859.583429.3187
620.03460.0830.0631514.5168990.570131.4733
630.03940.09130.06771702.04481109.149233.3039
640.04310.09950.07231966.49961231.627835.0946
650.04780.09170.07471551.4591271.606735.6596
660.05230.14680.08273741.95171546.089539.3203
670.04850.11490.08592960.68681687.549241.0798
680.04980.10380.08752519.52381763.183341.9903
690.05470.12670.09083392.03991898.921343.5766

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0143 & 0.0346 & 0 & 310.9538 & 0 & 0 \tabularnewline
59 & 0.0211 & 0.0471 & 0.0409 & 527.0285 & 418.9911 & 20.4693 \tabularnewline
60 & 0.0264 & 0.077 & 0.0529 & 1352.0126 & 729.9983 & 27.0185 \tabularnewline
61 & 0.0302 & 0.0734 & 0.058 & 1248.3388 & 859.5834 & 29.3187 \tabularnewline
62 & 0.0346 & 0.083 & 0.063 & 1514.5168 & 990.5701 & 31.4733 \tabularnewline
63 & 0.0394 & 0.0913 & 0.0677 & 1702.0448 & 1109.1492 & 33.3039 \tabularnewline
64 & 0.0431 & 0.0995 & 0.0723 & 1966.4996 & 1231.6278 & 35.0946 \tabularnewline
65 & 0.0478 & 0.0917 & 0.0747 & 1551.459 & 1271.6067 & 35.6596 \tabularnewline
66 & 0.0523 & 0.1468 & 0.0827 & 3741.9517 & 1546.0895 & 39.3203 \tabularnewline
67 & 0.0485 & 0.1149 & 0.0859 & 2960.6868 & 1687.5492 & 41.0798 \tabularnewline
68 & 0.0498 & 0.1038 & 0.0875 & 2519.5238 & 1763.1833 & 41.9903 \tabularnewline
69 & 0.0547 & 0.1267 & 0.0908 & 3392.0399 & 1898.9213 & 43.5766 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160610&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.0143[/C][C]0.0346[/C][C]0[/C][C]310.9538[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]0.0211[/C][C]0.0471[/C][C]0.0409[/C][C]527.0285[/C][C]418.9911[/C][C]20.4693[/C][/ROW]
[ROW][C]60[/C][C]0.0264[/C][C]0.077[/C][C]0.0529[/C][C]1352.0126[/C][C]729.9983[/C][C]27.0185[/C][/ROW]
[ROW][C]61[/C][C]0.0302[/C][C]0.0734[/C][C]0.058[/C][C]1248.3388[/C][C]859.5834[/C][C]29.3187[/C][/ROW]
[ROW][C]62[/C][C]0.0346[/C][C]0.083[/C][C]0.063[/C][C]1514.5168[/C][C]990.5701[/C][C]31.4733[/C][/ROW]
[ROW][C]63[/C][C]0.0394[/C][C]0.0913[/C][C]0.0677[/C][C]1702.0448[/C][C]1109.1492[/C][C]33.3039[/C][/ROW]
[ROW][C]64[/C][C]0.0431[/C][C]0.0995[/C][C]0.0723[/C][C]1966.4996[/C][C]1231.6278[/C][C]35.0946[/C][/ROW]
[ROW][C]65[/C][C]0.0478[/C][C]0.0917[/C][C]0.0747[/C][C]1551.459[/C][C]1271.6067[/C][C]35.6596[/C][/ROW]
[ROW][C]66[/C][C]0.0523[/C][C]0.1468[/C][C]0.0827[/C][C]3741.9517[/C][C]1546.0895[/C][C]39.3203[/C][/ROW]
[ROW][C]67[/C][C]0.0485[/C][C]0.1149[/C][C]0.0859[/C][C]2960.6868[/C][C]1687.5492[/C][C]41.0798[/C][/ROW]
[ROW][C]68[/C][C]0.0498[/C][C]0.1038[/C][C]0.0875[/C][C]2519.5238[/C][C]1763.1833[/C][C]41.9903[/C][/ROW]
[ROW][C]69[/C][C]0.0547[/C][C]0.1267[/C][C]0.0908[/C][C]3392.0399[/C][C]1898.9213[/C][C]43.5766[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160610&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160610&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.01430.03460310.953800
590.02110.04710.0409527.0285418.991120.4693
600.02640.0770.05291352.0126729.998327.0185
610.03020.07340.0581248.3388859.583429.3187
620.03460.0830.0631514.5168990.570131.4733
630.03940.09130.06771702.04481109.149233.3039
640.04310.09950.07231966.49961231.627835.0946
650.04780.09170.07471551.4591271.606735.6596
660.05230.14680.08273741.95171546.089539.3203
670.04850.11490.08592960.68681687.549241.0798
680.04980.10380.08752519.52381763.183341.9903
690.05470.12670.09083392.03991898.921343.5766



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