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, 17 Dec 2009 13:27:14 -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/2009/Dec/17/t12610816681nhjtjbzivirz1r.htm/, Retrieved Tue, 30 Apr 2024 02:44:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69097, Retrieved Tue, 30 Apr 2024 02:44:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact107
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
- R PD  [ARIMA Forecasting] [WorkShop10 (SHW)] [2009-12-14 19:20:00] [37daf76adc256428993ec4063536c760]
- R P       [ARIMA Forecasting] [Verbering WS 10] [2009-12-17 20:27:14] [b653746fe14da1ddc21bd75262e8c46b] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
506
502
516
528
533
536
537
524
536
587
597
581
564
564




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69097&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69097&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69097&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'Gwilym Jenkins' @ 72.249.127.135







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[48])
36510-------
37514-------
38517-------
39508-------
40493-------
41490-------
42469-------
43478-------
44528-------
45534-------
46518-------
47506-------
48502-------
49516505.1244489.9758520.2730.07970.6570.12540.657
50528515.1799494.6957535.66410.110.46870.43090.8964
51533510.8489483.9679537.72990.05310.10550.58230.7406
52536493.3898458.8691527.91050.00780.01230.50880.3125
53537490.7594450.3806531.13830.01240.0140.51470.2927
54524475.0858429.9336520.2380.01690.00360.60420.1213
55536485.4686434.6471536.29010.02570.06860.61330.2619
56587532.9848476.2068589.76280.03110.45860.56830.8576
57597540.3252478.7113601.93910.03570.06880.57970.8886
58581527.8962461.793593.99940.05770.02020.61540.7787
59564515.4666444.3015586.63160.09070.03550.60280.6446
60564509.7249433.6494585.80040.0810.0810.57890.5789

\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[48]) \tabularnewline
36 & 510 & - & - & - & - & - & - & - \tabularnewline
37 & 514 & - & - & - & - & - & - & - \tabularnewline
38 & 517 & - & - & - & - & - & - & - \tabularnewline
39 & 508 & - & - & - & - & - & - & - \tabularnewline
40 & 493 & - & - & - & - & - & - & - \tabularnewline
41 & 490 & - & - & - & - & - & - & - \tabularnewline
42 & 469 & - & - & - & - & - & - & - \tabularnewline
43 & 478 & - & - & - & - & - & - & - \tabularnewline
44 & 528 & - & - & - & - & - & - & - \tabularnewline
45 & 534 & - & - & - & - & - & - & - \tabularnewline
46 & 518 & - & - & - & - & - & - & - \tabularnewline
47 & 506 & - & - & - & - & - & - & - \tabularnewline
48 & 502 & - & - & - & - & - & - & - \tabularnewline
49 & 516 & 505.1244 & 489.9758 & 520.273 & 0.0797 & 0.657 & 0.1254 & 0.657 \tabularnewline
50 & 528 & 515.1799 & 494.6957 & 535.6641 & 0.11 & 0.4687 & 0.4309 & 0.8964 \tabularnewline
51 & 533 & 510.8489 & 483.9679 & 537.7299 & 0.0531 & 0.1055 & 0.5823 & 0.7406 \tabularnewline
52 & 536 & 493.3898 & 458.8691 & 527.9105 & 0.0078 & 0.0123 & 0.5088 & 0.3125 \tabularnewline
53 & 537 & 490.7594 & 450.3806 & 531.1383 & 0.0124 & 0.014 & 0.5147 & 0.2927 \tabularnewline
54 & 524 & 475.0858 & 429.9336 & 520.238 & 0.0169 & 0.0036 & 0.6042 & 0.1213 \tabularnewline
55 & 536 & 485.4686 & 434.6471 & 536.2901 & 0.0257 & 0.0686 & 0.6133 & 0.2619 \tabularnewline
56 & 587 & 532.9848 & 476.2068 & 589.7628 & 0.0311 & 0.4586 & 0.5683 & 0.8576 \tabularnewline
57 & 597 & 540.3252 & 478.7113 & 601.9391 & 0.0357 & 0.0688 & 0.5797 & 0.8886 \tabularnewline
58 & 581 & 527.8962 & 461.793 & 593.9994 & 0.0577 & 0.0202 & 0.6154 & 0.7787 \tabularnewline
59 & 564 & 515.4666 & 444.3015 & 586.6316 & 0.0907 & 0.0355 & 0.6028 & 0.6446 \tabularnewline
60 & 564 & 509.7249 & 433.6494 & 585.8004 & 0.081 & 0.081 & 0.5789 & 0.5789 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69097&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[48])[/C][/ROW]
[ROW][C]36[/C][C]510[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]514[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]469[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]478[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]534[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]518[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]516[/C][C]505.1244[/C][C]489.9758[/C][C]520.273[/C][C]0.0797[/C][C]0.657[/C][C]0.1254[/C][C]0.657[/C][/ROW]
[ROW][C]50[/C][C]528[/C][C]515.1799[/C][C]494.6957[/C][C]535.6641[/C][C]0.11[/C][C]0.4687[/C][C]0.4309[/C][C]0.8964[/C][/ROW]
[ROW][C]51[/C][C]533[/C][C]510.8489[/C][C]483.9679[/C][C]537.7299[/C][C]0.0531[/C][C]0.1055[/C][C]0.5823[/C][C]0.7406[/C][/ROW]
[ROW][C]52[/C][C]536[/C][C]493.3898[/C][C]458.8691[/C][C]527.9105[/C][C]0.0078[/C][C]0.0123[/C][C]0.5088[/C][C]0.3125[/C][/ROW]
[ROW][C]53[/C][C]537[/C][C]490.7594[/C][C]450.3806[/C][C]531.1383[/C][C]0.0124[/C][C]0.014[/C][C]0.5147[/C][C]0.2927[/C][/ROW]
[ROW][C]54[/C][C]524[/C][C]475.0858[/C][C]429.9336[/C][C]520.238[/C][C]0.0169[/C][C]0.0036[/C][C]0.6042[/C][C]0.1213[/C][/ROW]
[ROW][C]55[/C][C]536[/C][C]485.4686[/C][C]434.6471[/C][C]536.2901[/C][C]0.0257[/C][C]0.0686[/C][C]0.6133[/C][C]0.2619[/C][/ROW]
[ROW][C]56[/C][C]587[/C][C]532.9848[/C][C]476.2068[/C][C]589.7628[/C][C]0.0311[/C][C]0.4586[/C][C]0.5683[/C][C]0.8576[/C][/ROW]
[ROW][C]57[/C][C]597[/C][C]540.3252[/C][C]478.7113[/C][C]601.9391[/C][C]0.0357[/C][C]0.0688[/C][C]0.5797[/C][C]0.8886[/C][/ROW]
[ROW][C]58[/C][C]581[/C][C]527.8962[/C][C]461.793[/C][C]593.9994[/C][C]0.0577[/C][C]0.0202[/C][C]0.6154[/C][C]0.7787[/C][/ROW]
[ROW][C]59[/C][C]564[/C][C]515.4666[/C][C]444.3015[/C][C]586.6316[/C][C]0.0907[/C][C]0.0355[/C][C]0.6028[/C][C]0.6446[/C][/ROW]
[ROW][C]60[/C][C]564[/C][C]509.7249[/C][C]433.6494[/C][C]585.8004[/C][C]0.081[/C][C]0.081[/C][C]0.5789[/C][C]0.5789[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69097&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69097&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[48])
36510-------
37514-------
38517-------
39508-------
40493-------
41490-------
42469-------
43478-------
44528-------
45534-------
46518-------
47506-------
48502-------
49516505.1244489.9758520.2730.07970.6570.12540.657
50528515.1799494.6957535.66410.110.46870.43090.8964
51533510.8489483.9679537.72990.05310.10550.58230.7406
52536493.3898458.8691527.91050.00780.01230.50880.3125
53537490.7594450.3806531.13830.01240.0140.51470.2927
54524475.0858429.9336520.2380.01690.00360.60420.1213
55536485.4686434.6471536.29010.02570.06860.61330.2619
56587532.9848476.2068589.76280.03110.45860.56830.8576
57597540.3252478.7113601.93910.03570.06880.57970.8886
58581527.8962461.793593.99940.05770.02020.61540.7787
59564515.4666444.3015586.63160.09070.03550.60280.6446
60564509.7249433.6494585.80040.0810.0810.57890.5789







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01530.02150118.278500
500.02030.02490.0232164.3549141.316711.8877
510.02680.04340.0299490.6698257.767816.0551
520.03570.08640.0441815.6258647.232325.4408
530.0420.09420.05412138.189945.423630.7477
540.04850.1030.06222392.59891186.619534.4473
550.05340.10410.06822553.42421381.877337.1736
560.05440.10130.07232917.64091573.847839.6718
570.05820.10490.0763212.03081755.868141.9031
580.06390.10060.07842820.01471862.282843.1542
590.07040.09420.07992355.49351907.120143.6706
600.07610.10650.08212945.78711993.675744.6506

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0153 & 0.0215 & 0 & 118.2785 & 0 & 0 \tabularnewline
50 & 0.0203 & 0.0249 & 0.0232 & 164.3549 & 141.3167 & 11.8877 \tabularnewline
51 & 0.0268 & 0.0434 & 0.0299 & 490.6698 & 257.7678 & 16.0551 \tabularnewline
52 & 0.0357 & 0.0864 & 0.044 & 1815.6258 & 647.2323 & 25.4408 \tabularnewline
53 & 0.042 & 0.0942 & 0.0541 & 2138.189 & 945.4236 & 30.7477 \tabularnewline
54 & 0.0485 & 0.103 & 0.0622 & 2392.5989 & 1186.6195 & 34.4473 \tabularnewline
55 & 0.0534 & 0.1041 & 0.0682 & 2553.4242 & 1381.8773 & 37.1736 \tabularnewline
56 & 0.0544 & 0.1013 & 0.0723 & 2917.6409 & 1573.8478 & 39.6718 \tabularnewline
57 & 0.0582 & 0.1049 & 0.076 & 3212.0308 & 1755.8681 & 41.9031 \tabularnewline
58 & 0.0639 & 0.1006 & 0.0784 & 2820.0147 & 1862.2828 & 43.1542 \tabularnewline
59 & 0.0704 & 0.0942 & 0.0799 & 2355.4935 & 1907.1201 & 43.6706 \tabularnewline
60 & 0.0761 & 0.1065 & 0.0821 & 2945.7871 & 1993.6757 & 44.6506 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69097&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]49[/C][C]0.0153[/C][C]0.0215[/C][C]0[/C][C]118.2785[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0203[/C][C]0.0249[/C][C]0.0232[/C][C]164.3549[/C][C]141.3167[/C][C]11.8877[/C][/ROW]
[ROW][C]51[/C][C]0.0268[/C][C]0.0434[/C][C]0.0299[/C][C]490.6698[/C][C]257.7678[/C][C]16.0551[/C][/ROW]
[ROW][C]52[/C][C]0.0357[/C][C]0.0864[/C][C]0.044[/C][C]1815.6258[/C][C]647.2323[/C][C]25.4408[/C][/ROW]
[ROW][C]53[/C][C]0.042[/C][C]0.0942[/C][C]0.0541[/C][C]2138.189[/C][C]945.4236[/C][C]30.7477[/C][/ROW]
[ROW][C]54[/C][C]0.0485[/C][C]0.103[/C][C]0.0622[/C][C]2392.5989[/C][C]1186.6195[/C][C]34.4473[/C][/ROW]
[ROW][C]55[/C][C]0.0534[/C][C]0.1041[/C][C]0.0682[/C][C]2553.4242[/C][C]1381.8773[/C][C]37.1736[/C][/ROW]
[ROW][C]56[/C][C]0.0544[/C][C]0.1013[/C][C]0.0723[/C][C]2917.6409[/C][C]1573.8478[/C][C]39.6718[/C][/ROW]
[ROW][C]57[/C][C]0.0582[/C][C]0.1049[/C][C]0.076[/C][C]3212.0308[/C][C]1755.8681[/C][C]41.9031[/C][/ROW]
[ROW][C]58[/C][C]0.0639[/C][C]0.1006[/C][C]0.0784[/C][C]2820.0147[/C][C]1862.2828[/C][C]43.1542[/C][/ROW]
[ROW][C]59[/C][C]0.0704[/C][C]0.0942[/C][C]0.0799[/C][C]2355.4935[/C][C]1907.1201[/C][C]43.6706[/C][/ROW]
[ROW][C]60[/C][C]0.0761[/C][C]0.1065[/C][C]0.0821[/C][C]2945.7871[/C][C]1993.6757[/C][C]44.6506[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69097&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69097&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
490.01530.02150118.278500
500.02030.02490.0232164.3549141.316711.8877
510.02680.04340.0299490.6698257.767816.0551
520.03570.08640.0441815.6258647.232325.4408
530.0420.09420.05412138.189945.423630.7477
540.04850.1030.06222392.59891186.619534.4473
550.05340.10410.06822553.42421381.877337.1736
560.05440.10130.07232917.64091573.847839.6718
570.05820.10490.0763212.03081755.868141.9031
580.06390.10060.07842820.01471862.282843.1542
590.07040.09420.07992355.49351907.120143.6706
600.07610.10650.08212945.78711993.675744.6506



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