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 computationTue, 07 Dec 2010 16:28:16 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/07/t1291739230l03ylzv4qn4ivch.htm/, Retrieved Sat, 04 May 2024 01:01:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106487, Retrieved Sat, 04 May 2024 01:01:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [WS9 fout] [2010-12-03 12:26:23] [1fd136673b2a4fecb5c545b9b4a05d64]
- R P   [ARIMA Forecasting] [] [2010-12-03 14:12:57] [b98453cac15ba1066b407e146608df68]
-    D      [ARIMA Forecasting] [Arima forecast 2] [2010-12-07 16:28:16] [278a0539dc236556c5f30b5bc56ff9eb] [Current]
-   P         [ARIMA Forecasting] [Forecast ARIMA 2] [2010-12-07 22:40:23] [b8e188bcc949964bed729335b3416734]
Feedback Forum

Post a new message
Dataseries X:
431
465
511
540
552
512
413
542
544
491
458
529
525
483
528
502
563
537
465
528
505
493
456
488
488
468
542
499
477
534
528
598
474
537
376
447
545
425
458
510
472
541
507
472
540
496
432
452
420
435
509
441
416
490
396
463
403
448
398
387
426
428
510
437
453
451
434




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

\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 & 6 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106487&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]6 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=106487&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106487&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 time6 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[55])
43507-------
44472-------
45540-------
46496-------
47432-------
48452-------
49420-------
50435-------
51509-------
52441-------
53416-------
54490-------
55396-------
56463472365.9825578.01750.43390.920.50.92
57403540433.9825646.01750.00570.92270.50.9961
58448496389.9825602.01750.18740.95720.50.9678
59398432325.9825538.01750.26480.38370.50.7472
60387452345.9825558.01750.11470.84090.50.8497
61426420313.9825526.01750.45580.72910.50.6714
62428435328.9825541.01750.44850.56610.50.7645
63510509402.9825615.01750.49260.93290.50.9817
64437441334.9825547.01750.47050.1010.50.7973
65453416309.9825522.01750.2470.34890.50.6442
66451490383.9825596.01750.23550.7530.50.9589
67434396289.9825502.01750.24120.15460.50.5

\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[55]) \tabularnewline
43 & 507 & - & - & - & - & - & - & - \tabularnewline
44 & 472 & - & - & - & - & - & - & - \tabularnewline
45 & 540 & - & - & - & - & - & - & - \tabularnewline
46 & 496 & - & - & - & - & - & - & - \tabularnewline
47 & 432 & - & - & - & - & - & - & - \tabularnewline
48 & 452 & - & - & - & - & - & - & - \tabularnewline
49 & 420 & - & - & - & - & - & - & - \tabularnewline
50 & 435 & - & - & - & - & - & - & - \tabularnewline
51 & 509 & - & - & - & - & - & - & - \tabularnewline
52 & 441 & - & - & - & - & - & - & - \tabularnewline
53 & 416 & - & - & - & - & - & - & - \tabularnewline
54 & 490 & - & - & - & - & - & - & - \tabularnewline
55 & 396 & - & - & - & - & - & - & - \tabularnewline
56 & 463 & 472 & 365.9825 & 578.0175 & 0.4339 & 0.92 & 0.5 & 0.92 \tabularnewline
57 & 403 & 540 & 433.9825 & 646.0175 & 0.0057 & 0.9227 & 0.5 & 0.9961 \tabularnewline
58 & 448 & 496 & 389.9825 & 602.0175 & 0.1874 & 0.9572 & 0.5 & 0.9678 \tabularnewline
59 & 398 & 432 & 325.9825 & 538.0175 & 0.2648 & 0.3837 & 0.5 & 0.7472 \tabularnewline
60 & 387 & 452 & 345.9825 & 558.0175 & 0.1147 & 0.8409 & 0.5 & 0.8497 \tabularnewline
61 & 426 & 420 & 313.9825 & 526.0175 & 0.4558 & 0.7291 & 0.5 & 0.6714 \tabularnewline
62 & 428 & 435 & 328.9825 & 541.0175 & 0.4485 & 0.5661 & 0.5 & 0.7645 \tabularnewline
63 & 510 & 509 & 402.9825 & 615.0175 & 0.4926 & 0.9329 & 0.5 & 0.9817 \tabularnewline
64 & 437 & 441 & 334.9825 & 547.0175 & 0.4705 & 0.101 & 0.5 & 0.7973 \tabularnewline
65 & 453 & 416 & 309.9825 & 522.0175 & 0.247 & 0.3489 & 0.5 & 0.6442 \tabularnewline
66 & 451 & 490 & 383.9825 & 596.0175 & 0.2355 & 0.753 & 0.5 & 0.9589 \tabularnewline
67 & 434 & 396 & 289.9825 & 502.0175 & 0.2412 & 0.1546 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106487&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[55])[/C][/ROW]
[ROW][C]43[/C][C]507[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]540[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]496[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]432[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]452[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]420[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]435[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]509[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]441[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]416[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]396[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]463[/C][C]472[/C][C]365.9825[/C][C]578.0175[/C][C]0.4339[/C][C]0.92[/C][C]0.5[/C][C]0.92[/C][/ROW]
[ROW][C]57[/C][C]403[/C][C]540[/C][C]433.9825[/C][C]646.0175[/C][C]0.0057[/C][C]0.9227[/C][C]0.5[/C][C]0.9961[/C][/ROW]
[ROW][C]58[/C][C]448[/C][C]496[/C][C]389.9825[/C][C]602.0175[/C][C]0.1874[/C][C]0.9572[/C][C]0.5[/C][C]0.9678[/C][/ROW]
[ROW][C]59[/C][C]398[/C][C]432[/C][C]325.9825[/C][C]538.0175[/C][C]0.2648[/C][C]0.3837[/C][C]0.5[/C][C]0.7472[/C][/ROW]
[ROW][C]60[/C][C]387[/C][C]452[/C][C]345.9825[/C][C]558.0175[/C][C]0.1147[/C][C]0.8409[/C][C]0.5[/C][C]0.8497[/C][/ROW]
[ROW][C]61[/C][C]426[/C][C]420[/C][C]313.9825[/C][C]526.0175[/C][C]0.4558[/C][C]0.7291[/C][C]0.5[/C][C]0.6714[/C][/ROW]
[ROW][C]62[/C][C]428[/C][C]435[/C][C]328.9825[/C][C]541.0175[/C][C]0.4485[/C][C]0.5661[/C][C]0.5[/C][C]0.7645[/C][/ROW]
[ROW][C]63[/C][C]510[/C][C]509[/C][C]402.9825[/C][C]615.0175[/C][C]0.4926[/C][C]0.9329[/C][C]0.5[/C][C]0.9817[/C][/ROW]
[ROW][C]64[/C][C]437[/C][C]441[/C][C]334.9825[/C][C]547.0175[/C][C]0.4705[/C][C]0.101[/C][C]0.5[/C][C]0.7973[/C][/ROW]
[ROW][C]65[/C][C]453[/C][C]416[/C][C]309.9825[/C][C]522.0175[/C][C]0.247[/C][C]0.3489[/C][C]0.5[/C][C]0.6442[/C][/ROW]
[ROW][C]66[/C][C]451[/C][C]490[/C][C]383.9825[/C][C]596.0175[/C][C]0.2355[/C][C]0.753[/C][C]0.5[/C][C]0.9589[/C][/ROW]
[ROW][C]67[/C][C]434[/C][C]396[/C][C]289.9825[/C][C]502.0175[/C][C]0.2412[/C][C]0.1546[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106487&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106487&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[55])
43507-------
44472-------
45540-------
46496-------
47432-------
48452-------
49420-------
50435-------
51509-------
52441-------
53416-------
54490-------
55396-------
56463472365.9825578.01750.43390.920.50.92
57403540433.9825646.01750.00570.92270.50.9961
58448496389.9825602.01750.18740.95720.50.9678
59398432325.9825538.01750.26480.38370.50.7472
60387452345.9825558.01750.11470.84090.50.8497
61426420313.9825526.01750.45580.72910.50.6714
62428435328.9825541.01750.44850.56610.50.7645
63510509402.9825615.01750.49260.93290.50.9817
64437441334.9825547.01750.47050.1010.50.7973
65453416309.9825522.01750.2470.34890.50.6442
66451490383.9825596.01750.23550.7530.50.9589
67434396289.9825502.01750.24120.15460.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.1146-0.019108100
570.1002-0.25370.136418769942597.0824
580.1091-0.09680.123223047051.333383.9722
590.1252-0.07870.112111565577.574.6827
600.1197-0.14380.11844225530772.8492
610.12880.01430.1011364428.566.547
620.1243-0.01610.0889493802.857161.6673
630.10630.0020.07813327.62557.6856
640.1227-0.00910.0704162959.666754.4028
650.130.08890.072213692800.652.9207
660.1104-0.07960.072915212684.272751.81
670.13660.0960.074814442580.916750.8027

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.1146 & -0.0191 & 0 & 81 & 0 & 0 \tabularnewline
57 & 0.1002 & -0.2537 & 0.1364 & 18769 & 9425 & 97.0824 \tabularnewline
58 & 0.1091 & -0.0968 & 0.1232 & 2304 & 7051.3333 & 83.9722 \tabularnewline
59 & 0.1252 & -0.0787 & 0.1121 & 1156 & 5577.5 & 74.6827 \tabularnewline
60 & 0.1197 & -0.1438 & 0.1184 & 4225 & 5307 & 72.8492 \tabularnewline
61 & 0.1288 & 0.0143 & 0.1011 & 36 & 4428.5 & 66.547 \tabularnewline
62 & 0.1243 & -0.0161 & 0.0889 & 49 & 3802.8571 & 61.6673 \tabularnewline
63 & 0.1063 & 0.002 & 0.078 & 1 & 3327.625 & 57.6856 \tabularnewline
64 & 0.1227 & -0.0091 & 0.0704 & 16 & 2959.6667 & 54.4028 \tabularnewline
65 & 0.13 & 0.0889 & 0.0722 & 1369 & 2800.6 & 52.9207 \tabularnewline
66 & 0.1104 & -0.0796 & 0.0729 & 1521 & 2684.2727 & 51.81 \tabularnewline
67 & 0.1366 & 0.096 & 0.0748 & 1444 & 2580.9167 & 50.8027 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106487&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]56[/C][C]0.1146[/C][C]-0.0191[/C][C]0[/C][C]81[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]0.1002[/C][C]-0.2537[/C][C]0.1364[/C][C]18769[/C][C]9425[/C][C]97.0824[/C][/ROW]
[ROW][C]58[/C][C]0.1091[/C][C]-0.0968[/C][C]0.1232[/C][C]2304[/C][C]7051.3333[/C][C]83.9722[/C][/ROW]
[ROW][C]59[/C][C]0.1252[/C][C]-0.0787[/C][C]0.1121[/C][C]1156[/C][C]5577.5[/C][C]74.6827[/C][/ROW]
[ROW][C]60[/C][C]0.1197[/C][C]-0.1438[/C][C]0.1184[/C][C]4225[/C][C]5307[/C][C]72.8492[/C][/ROW]
[ROW][C]61[/C][C]0.1288[/C][C]0.0143[/C][C]0.1011[/C][C]36[/C][C]4428.5[/C][C]66.547[/C][/ROW]
[ROW][C]62[/C][C]0.1243[/C][C]-0.0161[/C][C]0.0889[/C][C]49[/C][C]3802.8571[/C][C]61.6673[/C][/ROW]
[ROW][C]63[/C][C]0.1063[/C][C]0.002[/C][C]0.078[/C][C]1[/C][C]3327.625[/C][C]57.6856[/C][/ROW]
[ROW][C]64[/C][C]0.1227[/C][C]-0.0091[/C][C]0.0704[/C][C]16[/C][C]2959.6667[/C][C]54.4028[/C][/ROW]
[ROW][C]65[/C][C]0.13[/C][C]0.0889[/C][C]0.0722[/C][C]1369[/C][C]2800.6[/C][C]52.9207[/C][/ROW]
[ROW][C]66[/C][C]0.1104[/C][C]-0.0796[/C][C]0.0729[/C][C]1521[/C][C]2684.2727[/C][C]51.81[/C][/ROW]
[ROW][C]67[/C][C]0.1366[/C][C]0.096[/C][C]0.0748[/C][C]1444[/C][C]2580.9167[/C][C]50.8027[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106487&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106487&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
560.1146-0.019108100
570.1002-0.25370.136418769942597.0824
580.1091-0.09680.123223047051.333383.9722
590.1252-0.07870.112111565577.574.6827
600.1197-0.14380.11844225530772.8492
610.12880.01430.1011364428.566.547
620.1243-0.01610.0889493802.857161.6673
630.10630.0020.07813327.62557.6856
640.1227-0.00910.0704162959.666754.4028
650.130.08890.072213692800.652.9207
660.1104-0.07960.072915212684.272751.81
670.13660.0960.074814442580.916750.8027



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