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, 21 Dec 2010 14:02:55 +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/21/t12929402240pr3n0fawdt0jhx.htm/, Retrieved Fri, 17 May 2024 16:50:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113587, Retrieved Fri, 17 May 2024 16:50:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact139
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  M D    [ARIMA Forecasting] [] [2009-12-14 19:07:20] [cf890101a20378422561610e0d41fd9c]
-   P       [ARIMA Forecasting] [] [2009-12-17 10:19:20] [cf890101a20378422561610e0d41fd9c]
- R PD          [ARIMA Forecasting] [] [2010-12-21 14:02:55] [7131fefee4115a2a717140ef0bdd6369] [Current]
Feedback Forum

Post a new message
Dataseries X:
695
638
762
635
721
854
418
367
824
687
601
676
740
691
683
594
729
731
386
331
707
715
657
653
642
643
718
654
632
731
392
344
792
852
649
629
685
617
715
715
629
916
531
357
917
828
708
858
775
785
1006
789
734
906
532
387
991
841
892
782
813
793
978
775
797
946
594
438
1022
868




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113587&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]4 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=113587&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113587&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 time4 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[58])
46828-------
47708-------
48858-------
49775-------
50785-------
511006-------
52789-------
53734-------
54906-------
55532-------
56387-------
57991-------
58841-------
59892715.5889600.8893857.59010.00740.04170.54170.0417
60782834.3279681.63671029.95780.30.28170.40630.4734
61813744.1983609.2004916.73270.21720.33380.36320.1357
62793748.005599.7308942.51640.32510.25630.35470.1744
63978916.0859725.33431170.31280.31660.82870.24410.7187
64775750.3158598.1191951.43140.40490.01320.35310.1884
65797707.0331562.4201898.64030.17870.24340.39130.0853
66946863.3478679.89371109.52430.25530.70130.36710.5706
67594486.6863392.7133608.97650.042700.23380
68438374.7558305.3383463.99880.082400.3940
691022926.3169725.14091198.32190.24530.99980.32060.7306
70868849.5718667.51091094.58940.44140.08390.52730.5273

\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[58]) \tabularnewline
46 & 828 & - & - & - & - & - & - & - \tabularnewline
47 & 708 & - & - & - & - & - & - & - \tabularnewline
48 & 858 & - & - & - & - & - & - & - \tabularnewline
49 & 775 & - & - & - & - & - & - & - \tabularnewline
50 & 785 & - & - & - & - & - & - & - \tabularnewline
51 & 1006 & - & - & - & - & - & - & - \tabularnewline
52 & 789 & - & - & - & - & - & - & - \tabularnewline
53 & 734 & - & - & - & - & - & - & - \tabularnewline
54 & 906 & - & - & - & - & - & - & - \tabularnewline
55 & 532 & - & - & - & - & - & - & - \tabularnewline
56 & 387 & - & - & - & - & - & - & - \tabularnewline
57 & 991 & - & - & - & - & - & - & - \tabularnewline
58 & 841 & - & - & - & - & - & - & - \tabularnewline
59 & 892 & 715.5889 & 600.8893 & 857.5901 & 0.0074 & 0.0417 & 0.5417 & 0.0417 \tabularnewline
60 & 782 & 834.3279 & 681.6367 & 1029.9578 & 0.3 & 0.2817 & 0.4063 & 0.4734 \tabularnewline
61 & 813 & 744.1983 & 609.2004 & 916.7327 & 0.2172 & 0.3338 & 0.3632 & 0.1357 \tabularnewline
62 & 793 & 748.005 & 599.7308 & 942.5164 & 0.3251 & 0.2563 & 0.3547 & 0.1744 \tabularnewline
63 & 978 & 916.0859 & 725.3343 & 1170.3128 & 0.3166 & 0.8287 & 0.2441 & 0.7187 \tabularnewline
64 & 775 & 750.3158 & 598.1191 & 951.4314 & 0.4049 & 0.0132 & 0.3531 & 0.1884 \tabularnewline
65 & 797 & 707.0331 & 562.4201 & 898.6403 & 0.1787 & 0.2434 & 0.3913 & 0.0853 \tabularnewline
66 & 946 & 863.3478 & 679.8937 & 1109.5243 & 0.2553 & 0.7013 & 0.3671 & 0.5706 \tabularnewline
67 & 594 & 486.6863 & 392.7133 & 608.9765 & 0.0427 & 0 & 0.2338 & 0 \tabularnewline
68 & 438 & 374.7558 & 305.3383 & 463.9988 & 0.0824 & 0 & 0.394 & 0 \tabularnewline
69 & 1022 & 926.3169 & 725.1409 & 1198.3219 & 0.2453 & 0.9998 & 0.3206 & 0.7306 \tabularnewline
70 & 868 & 849.5718 & 667.5109 & 1094.5894 & 0.4414 & 0.0839 & 0.5273 & 0.5273 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113587&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[58])[/C][/ROW]
[ROW][C]46[/C][C]828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]708[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]858[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]775[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]785[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1006[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]789[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]734[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]906[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]387[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]991[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]841[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]892[/C][C]715.5889[/C][C]600.8893[/C][C]857.5901[/C][C]0.0074[/C][C]0.0417[/C][C]0.5417[/C][C]0.0417[/C][/ROW]
[ROW][C]60[/C][C]782[/C][C]834.3279[/C][C]681.6367[/C][C]1029.9578[/C][C]0.3[/C][C]0.2817[/C][C]0.4063[/C][C]0.4734[/C][/ROW]
[ROW][C]61[/C][C]813[/C][C]744.1983[/C][C]609.2004[/C][C]916.7327[/C][C]0.2172[/C][C]0.3338[/C][C]0.3632[/C][C]0.1357[/C][/ROW]
[ROW][C]62[/C][C]793[/C][C]748.005[/C][C]599.7308[/C][C]942.5164[/C][C]0.3251[/C][C]0.2563[/C][C]0.3547[/C][C]0.1744[/C][/ROW]
[ROW][C]63[/C][C]978[/C][C]916.0859[/C][C]725.3343[/C][C]1170.3128[/C][C]0.3166[/C][C]0.8287[/C][C]0.2441[/C][C]0.7187[/C][/ROW]
[ROW][C]64[/C][C]775[/C][C]750.3158[/C][C]598.1191[/C][C]951.4314[/C][C]0.4049[/C][C]0.0132[/C][C]0.3531[/C][C]0.1884[/C][/ROW]
[ROW][C]65[/C][C]797[/C][C]707.0331[/C][C]562.4201[/C][C]898.6403[/C][C]0.1787[/C][C]0.2434[/C][C]0.3913[/C][C]0.0853[/C][/ROW]
[ROW][C]66[/C][C]946[/C][C]863.3478[/C][C]679.8937[/C][C]1109.5243[/C][C]0.2553[/C][C]0.7013[/C][C]0.3671[/C][C]0.5706[/C][/ROW]
[ROW][C]67[/C][C]594[/C][C]486.6863[/C][C]392.7133[/C][C]608.9765[/C][C]0.0427[/C][C]0[/C][C]0.2338[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]438[/C][C]374.7558[/C][C]305.3383[/C][C]463.9988[/C][C]0.0824[/C][C]0[/C][C]0.394[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]1022[/C][C]926.3169[/C][C]725.1409[/C][C]1198.3219[/C][C]0.2453[/C][C]0.9998[/C][C]0.3206[/C][C]0.7306[/C][/ROW]
[ROW][C]70[/C][C]868[/C][C]849.5718[/C][C]667.5109[/C][C]1094.5894[/C][C]0.4414[/C][C]0.0839[/C][C]0.5273[/C][C]0.5273[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113587&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113587&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[58])
46828-------
47708-------
48858-------
49775-------
50785-------
511006-------
52789-------
53734-------
54906-------
55532-------
56387-------
57991-------
58841-------
59892715.5889600.8893857.59010.00740.04170.54170.0417
60782834.3279681.63671029.95780.30.28170.40630.4734
61813744.1983609.2004916.73270.21720.33380.36320.1357
62793748.005599.7308942.51640.32510.25630.35470.1744
63978916.0859725.33431170.31280.31660.82870.24410.7187
64775750.3158598.1191951.43140.40490.01320.35310.1884
65797707.0331562.4201898.64030.17870.24340.39130.0853
66946863.3478679.89371109.52430.25530.70130.36710.5706
67594486.6863392.7133608.97650.042700.23380
68438374.7558305.3383463.99880.082400.3940
691022926.3169725.14091198.32190.24530.99980.32060.7306
70868849.5718667.51091094.58940.44140.08390.52730.5273







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.10120.2465031120.880200
600.1196-0.06270.15462738.212216929.5462130.1136
610.11830.09250.13394733.672812864.2551113.4207
620.13270.06020.11552024.55310154.3295100.7687
630.14160.06760.10593833.35178890.13494.2875
640.13680.03290.0937609.31127509.996886.6602
650.13830.12720.09858094.03857593.431487.1403
660.14550.09570.09826831.39357498.176686.592
670.12820.22050.111811516.22397944.626389.1326
680.12150.16880.11753999.82457550.146186.8916
690.14980.10330.11629155.24867696.064587.7272
700.14710.02170.1083339.59867083.025784.1607

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.1012 & 0.2465 & 0 & 31120.8802 & 0 & 0 \tabularnewline
60 & 0.1196 & -0.0627 & 0.1546 & 2738.2122 & 16929.5462 & 130.1136 \tabularnewline
61 & 0.1183 & 0.0925 & 0.1339 & 4733.6728 & 12864.2551 & 113.4207 \tabularnewline
62 & 0.1327 & 0.0602 & 0.1155 & 2024.553 & 10154.3295 & 100.7687 \tabularnewline
63 & 0.1416 & 0.0676 & 0.1059 & 3833.3517 & 8890.134 & 94.2875 \tabularnewline
64 & 0.1368 & 0.0329 & 0.0937 & 609.3112 & 7509.9968 & 86.6602 \tabularnewline
65 & 0.1383 & 0.1272 & 0.0985 & 8094.0385 & 7593.4314 & 87.1403 \tabularnewline
66 & 0.1455 & 0.0957 & 0.0982 & 6831.3935 & 7498.1766 & 86.592 \tabularnewline
67 & 0.1282 & 0.2205 & 0.1118 & 11516.2239 & 7944.6263 & 89.1326 \tabularnewline
68 & 0.1215 & 0.1688 & 0.1175 & 3999.8245 & 7550.1461 & 86.8916 \tabularnewline
69 & 0.1498 & 0.1033 & 0.1162 & 9155.2486 & 7696.0645 & 87.7272 \tabularnewline
70 & 0.1471 & 0.0217 & 0.1083 & 339.5986 & 7083.0257 & 84.1607 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113587&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]59[/C][C]0.1012[/C][C]0.2465[/C][C]0[/C][C]31120.8802[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]0.1196[/C][C]-0.0627[/C][C]0.1546[/C][C]2738.2122[/C][C]16929.5462[/C][C]130.1136[/C][/ROW]
[ROW][C]61[/C][C]0.1183[/C][C]0.0925[/C][C]0.1339[/C][C]4733.6728[/C][C]12864.2551[/C][C]113.4207[/C][/ROW]
[ROW][C]62[/C][C]0.1327[/C][C]0.0602[/C][C]0.1155[/C][C]2024.553[/C][C]10154.3295[/C][C]100.7687[/C][/ROW]
[ROW][C]63[/C][C]0.1416[/C][C]0.0676[/C][C]0.1059[/C][C]3833.3517[/C][C]8890.134[/C][C]94.2875[/C][/ROW]
[ROW][C]64[/C][C]0.1368[/C][C]0.0329[/C][C]0.0937[/C][C]609.3112[/C][C]7509.9968[/C][C]86.6602[/C][/ROW]
[ROW][C]65[/C][C]0.1383[/C][C]0.1272[/C][C]0.0985[/C][C]8094.0385[/C][C]7593.4314[/C][C]87.1403[/C][/ROW]
[ROW][C]66[/C][C]0.1455[/C][C]0.0957[/C][C]0.0982[/C][C]6831.3935[/C][C]7498.1766[/C][C]86.592[/C][/ROW]
[ROW][C]67[/C][C]0.1282[/C][C]0.2205[/C][C]0.1118[/C][C]11516.2239[/C][C]7944.6263[/C][C]89.1326[/C][/ROW]
[ROW][C]68[/C][C]0.1215[/C][C]0.1688[/C][C]0.1175[/C][C]3999.8245[/C][C]7550.1461[/C][C]86.8916[/C][/ROW]
[ROW][C]69[/C][C]0.1498[/C][C]0.1033[/C][C]0.1162[/C][C]9155.2486[/C][C]7696.0645[/C][C]87.7272[/C][/ROW]
[ROW][C]70[/C][C]0.1471[/C][C]0.0217[/C][C]0.1083[/C][C]339.5986[/C][C]7083.0257[/C][C]84.1607[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113587&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113587&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
590.10120.2465031120.880200
600.1196-0.06270.15462738.212216929.5462130.1136
610.11830.09250.13394733.672812864.2551113.4207
620.13270.06020.11552024.55310154.3295100.7687
630.14160.06760.10593833.35178890.13494.2875
640.13680.03290.0937609.31127509.996886.6602
650.13830.12720.09858094.03857593.431487.1403
660.14550.09570.09826831.39357498.176686.592
670.12820.22050.111811516.22397944.626389.1326
680.12150.16880.11753999.82457550.146186.8916
690.14980.10330.11629155.24867696.064587.7272
700.14710.02170.1083339.59867083.025784.1607



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