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 22:40:23 +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/t1291761500ycguq6w64ycv3ck.htm/, Retrieved Fri, 03 May 2024 22:36:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106799, Retrieved Fri, 03 May 2024 22:36:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
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] [b8e188bcc949964bed729335b3416734]
-   P         [ARIMA Forecasting] [Forecast ARIMA 2] [2010-12-07 22:40:23] [278a0539dc236556c5f30b5bc56ff9eb] [Current]
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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106799&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106799&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106799&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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-------
56463506.7083419.0176602.72420.18610.98810.76070.9881
57403528.0069435.7827629.07640.00770.89630.4080.9948
58448497.4463406.7946597.2090.16570.96820.51130.9769
59398429.5841345.0782523.33610.25450.35010.47990.7587
60387460.9324372.9297558.24870.06820.89750.57140.9045
61426472.9564383.8085571.40560.17490.95650.85410.9373
62428441.7877355.7038537.1910.38850.62720.55550.8266
63510503.9435411.6425605.57330.45350.92850.46120.9813
64437477.6629387.9024576.7570.21060.26120.76580.9469
65453461.445373.2904558.93550.43260.68840.81950.9059
66451514.2675420.9382616.9340.11360.87890.67840.988
67434449.5839362.622545.88370.37560.48850.86230.8623

\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 & 506.7083 & 419.0176 & 602.7242 & 0.1861 & 0.9881 & 0.7607 & 0.9881 \tabularnewline
57 & 403 & 528.0069 & 435.7827 & 629.0764 & 0.0077 & 0.8963 & 0.408 & 0.9948 \tabularnewline
58 & 448 & 497.4463 & 406.7946 & 597.209 & 0.1657 & 0.9682 & 0.5113 & 0.9769 \tabularnewline
59 & 398 & 429.5841 & 345.0782 & 523.3361 & 0.2545 & 0.3501 & 0.4799 & 0.7587 \tabularnewline
60 & 387 & 460.9324 & 372.9297 & 558.2487 & 0.0682 & 0.8975 & 0.5714 & 0.9045 \tabularnewline
61 & 426 & 472.9564 & 383.8085 & 571.4056 & 0.1749 & 0.9565 & 0.8541 & 0.9373 \tabularnewline
62 & 428 & 441.7877 & 355.7038 & 537.191 & 0.3885 & 0.6272 & 0.5555 & 0.8266 \tabularnewline
63 & 510 & 503.9435 & 411.6425 & 605.5733 & 0.4535 & 0.9285 & 0.4612 & 0.9813 \tabularnewline
64 & 437 & 477.6629 & 387.9024 & 576.757 & 0.2106 & 0.2612 & 0.7658 & 0.9469 \tabularnewline
65 & 453 & 461.445 & 373.2904 & 558.9355 & 0.4326 & 0.6884 & 0.8195 & 0.9059 \tabularnewline
66 & 451 & 514.2675 & 420.9382 & 616.934 & 0.1136 & 0.8789 & 0.6784 & 0.988 \tabularnewline
67 & 434 & 449.5839 & 362.622 & 545.8837 & 0.3756 & 0.4885 & 0.8623 & 0.8623 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106799&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]506.7083[/C][C]419.0176[/C][C]602.7242[/C][C]0.1861[/C][C]0.9881[/C][C]0.7607[/C][C]0.9881[/C][/ROW]
[ROW][C]57[/C][C]403[/C][C]528.0069[/C][C]435.7827[/C][C]629.0764[/C][C]0.0077[/C][C]0.8963[/C][C]0.408[/C][C]0.9948[/C][/ROW]
[ROW][C]58[/C][C]448[/C][C]497.4463[/C][C]406.7946[/C][C]597.209[/C][C]0.1657[/C][C]0.9682[/C][C]0.5113[/C][C]0.9769[/C][/ROW]
[ROW][C]59[/C][C]398[/C][C]429.5841[/C][C]345.0782[/C][C]523.3361[/C][C]0.2545[/C][C]0.3501[/C][C]0.4799[/C][C]0.7587[/C][/ROW]
[ROW][C]60[/C][C]387[/C][C]460.9324[/C][C]372.9297[/C][C]558.2487[/C][C]0.0682[/C][C]0.8975[/C][C]0.5714[/C][C]0.9045[/C][/ROW]
[ROW][C]61[/C][C]426[/C][C]472.9564[/C][C]383.8085[/C][C]571.4056[/C][C]0.1749[/C][C]0.9565[/C][C]0.8541[/C][C]0.9373[/C][/ROW]
[ROW][C]62[/C][C]428[/C][C]441.7877[/C][C]355.7038[/C][C]537.191[/C][C]0.3885[/C][C]0.6272[/C][C]0.5555[/C][C]0.8266[/C][/ROW]
[ROW][C]63[/C][C]510[/C][C]503.9435[/C][C]411.6425[/C][C]605.5733[/C][C]0.4535[/C][C]0.9285[/C][C]0.4612[/C][C]0.9813[/C][/ROW]
[ROW][C]64[/C][C]437[/C][C]477.6629[/C][C]387.9024[/C][C]576.757[/C][C]0.2106[/C][C]0.2612[/C][C]0.7658[/C][C]0.9469[/C][/ROW]
[ROW][C]65[/C][C]453[/C][C]461.445[/C][C]373.2904[/C][C]558.9355[/C][C]0.4326[/C][C]0.6884[/C][C]0.8195[/C][C]0.9059[/C][/ROW]
[ROW][C]66[/C][C]451[/C][C]514.2675[/C][C]420.9382[/C][C]616.934[/C][C]0.1136[/C][C]0.8789[/C][C]0.6784[/C][C]0.988[/C][/ROW]
[ROW][C]67[/C][C]434[/C][C]449.5839[/C][C]362.622[/C][C]545.8837[/C][C]0.3756[/C][C]0.4885[/C][C]0.8623[/C][C]0.8623[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106799&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106799&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-------
56463506.7083419.0176602.72420.18610.98810.76070.9881
57403528.0069435.7827629.07640.00770.89630.4080.9948
58448497.4463406.7946597.2090.16570.96820.51130.9769
59398429.5841345.0782523.33610.25450.35010.47990.7587
60387460.9324372.9297558.24870.06820.89750.57140.9045
61426472.9564383.8085571.40560.17490.95650.85410.9373
62428441.7877355.7038537.1910.38850.62720.55550.8266
63510503.9435411.6425605.57330.45350.92850.46120.9813
64437477.6629387.9024576.7570.21060.26120.76580.9469
65453461.445373.2904558.93550.43260.68840.81950.9059
66451514.2675420.9382616.9340.11360.87890.67840.988
67434449.5839362.622545.88370.37560.48850.86230.8623







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.0967-0.086301910.411700
570.0977-0.23680.161515626.73238768.57293.6407
580.1023-0.09940.14082444.94016660.694781.6131
590.1113-0.07350.124997.55375244.909472.4217
600.1077-0.16040.13135466.00325289.128272.7264
610.1062-0.09930.12592204.90554775.091169.102
620.1102-0.03120.1124190.09984120.092364.1879
630.10290.0120.099936.68113609.665960.0805
640.1058-0.08510.09821653.47363392.311258.2436
650.1078-0.01830.090271.31783060.211955.3192
660.1019-0.1230.09324002.77753145.899756.0883
670.1093-0.03470.0883242.85932903.979653.8886

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.0967 & -0.0863 & 0 & 1910.4117 & 0 & 0 \tabularnewline
57 & 0.0977 & -0.2368 & 0.1615 & 15626.7323 & 8768.572 & 93.6407 \tabularnewline
58 & 0.1023 & -0.0994 & 0.1408 & 2444.9401 & 6660.6947 & 81.6131 \tabularnewline
59 & 0.1113 & -0.0735 & 0.124 & 997.5537 & 5244.9094 & 72.4217 \tabularnewline
60 & 0.1077 & -0.1604 & 0.1313 & 5466.0032 & 5289.1282 & 72.7264 \tabularnewline
61 & 0.1062 & -0.0993 & 0.1259 & 2204.9055 & 4775.0911 & 69.102 \tabularnewline
62 & 0.1102 & -0.0312 & 0.1124 & 190.0998 & 4120.0923 & 64.1879 \tabularnewline
63 & 0.1029 & 0.012 & 0.0999 & 36.6811 & 3609.6659 & 60.0805 \tabularnewline
64 & 0.1058 & -0.0851 & 0.0982 & 1653.4736 & 3392.3112 & 58.2436 \tabularnewline
65 & 0.1078 & -0.0183 & 0.0902 & 71.3178 & 3060.2119 & 55.3192 \tabularnewline
66 & 0.1019 & -0.123 & 0.0932 & 4002.7775 & 3145.8997 & 56.0883 \tabularnewline
67 & 0.1093 & -0.0347 & 0.0883 & 242.8593 & 2903.9796 & 53.8886 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106799&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.0967[/C][C]-0.0863[/C][C]0[/C][C]1910.4117[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]0.0977[/C][C]-0.2368[/C][C]0.1615[/C][C]15626.7323[/C][C]8768.572[/C][C]93.6407[/C][/ROW]
[ROW][C]58[/C][C]0.1023[/C][C]-0.0994[/C][C]0.1408[/C][C]2444.9401[/C][C]6660.6947[/C][C]81.6131[/C][/ROW]
[ROW][C]59[/C][C]0.1113[/C][C]-0.0735[/C][C]0.124[/C][C]997.5537[/C][C]5244.9094[/C][C]72.4217[/C][/ROW]
[ROW][C]60[/C][C]0.1077[/C][C]-0.1604[/C][C]0.1313[/C][C]5466.0032[/C][C]5289.1282[/C][C]72.7264[/C][/ROW]
[ROW][C]61[/C][C]0.1062[/C][C]-0.0993[/C][C]0.1259[/C][C]2204.9055[/C][C]4775.0911[/C][C]69.102[/C][/ROW]
[ROW][C]62[/C][C]0.1102[/C][C]-0.0312[/C][C]0.1124[/C][C]190.0998[/C][C]4120.0923[/C][C]64.1879[/C][/ROW]
[ROW][C]63[/C][C]0.1029[/C][C]0.012[/C][C]0.0999[/C][C]36.6811[/C][C]3609.6659[/C][C]60.0805[/C][/ROW]
[ROW][C]64[/C][C]0.1058[/C][C]-0.0851[/C][C]0.0982[/C][C]1653.4736[/C][C]3392.3112[/C][C]58.2436[/C][/ROW]
[ROW][C]65[/C][C]0.1078[/C][C]-0.0183[/C][C]0.0902[/C][C]71.3178[/C][C]3060.2119[/C][C]55.3192[/C][/ROW]
[ROW][C]66[/C][C]0.1019[/C][C]-0.123[/C][C]0.0932[/C][C]4002.7775[/C][C]3145.8997[/C][C]56.0883[/C][/ROW]
[ROW][C]67[/C][C]0.1093[/C][C]-0.0347[/C][C]0.0883[/C][C]242.8593[/C][C]2903.9796[/C][C]53.8886[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106799&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106799&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.0967-0.086301910.411700
570.0977-0.23680.161515626.73238768.57293.6407
580.1023-0.09940.14082444.94016660.694781.6131
590.1113-0.07350.124997.55375244.909472.4217
600.1077-0.16040.13135466.00325289.128272.7264
610.1062-0.09930.12592204.90554775.091169.102
620.1102-0.03120.1124190.09984120.092364.1879
630.10290.0120.099936.68113609.665960.0805
640.1058-0.08510.09821653.47363392.311258.2436
650.1078-0.01830.090271.31783060.211955.3192
660.1019-0.1230.09324002.77753145.899756.0883
670.1093-0.03470.0883242.85932903.979653.8886



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