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, 24 Dec 2010 12:12:29 +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/24/t12931926035cy0zn0f1ayyg12.htm/, Retrieved Tue, 30 Apr 2024 06:52:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114815, Retrieved Tue, 30 Apr 2024 06:52:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Kendall tau Correlation Matrix] [] [2010-12-05 17:44:33] [b98453cac15ba1066b407e146608df68]
- RMPD  [Kendall tau Correlation Matrix] [WS 10 - Pearson c...] [2010-12-10 16:13:49] [033eb2749a430605d9b2be7c4aac4a0c]
-         [Kendall tau Correlation Matrix] [] [2010-12-13 18:15:16] [d7b28a0391ab3b2ddc9f9fba95a43f33]
- RMPD        [ARIMA Forecasting] [] [2010-12-24 12:12:29] [a75ee4dff32cc2c5ca1525a5910b53eb] [Current]
-   PD          [ARIMA Forecasting] [ARIMA forecast mo...] [2011-12-15 18:32:05] [63813c3109753b730d344072266dee79]
-   PD          [ARIMA Forecasting] [ARIMA forecast mo...] [2011-12-15 18:32:05] [63813c3109753b730d344072266dee79]
-   PD          [ARIMA Forecasting] [] [2011-12-15 19:24:16] [63813c3109753b730d344072266dee79]
-    D          [ARIMA Forecasting] [ARIMA forecast] [2011-12-16 12:54:24] [63813c3109753b730d344072266dee79]
Feedback Forum

Post a new message
Dataseries X:
5.715
4.575
4.621
4.413
4.280
4.024
4.336
4.144
3.764
4.248
4.215
4.871
4.946
4.490
4.851
4.591
4.279
4.191
4.285
4.516
4.197
4.404
4.373
5.307
5.320
4.356
4.484
4.210
4.018
3.912
3.972
3.886
3.892
4.242
4.134
4.743

5.116
4.823
5.489
4.263
4.221
4.076
3.715
3.715
3.784
4.141
3.968
4.767
5.019
4.343
4.853
4.154
4.035
3.996
4.734
3.778
3.887
3.953
3.987
4.436
4.803
4.672
4.560
4.289
3.961
3.943
3.932
3.816
3.834
4.130
4.467
4.447





Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.

\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 & 3 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
R Framework error message & 
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=114815&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[ROW][C]R Framework error message[/C][C]
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=114815&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114815&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 time3 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.







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[60])
484.767-------
495.019-------
504.343-------
514.853-------
524.154-------
534.035-------
543.996-------
554.734-------
563.778-------
573.887-------
583.953-------
593.987-------
604.436-------
614.8034.94544.41015.48070.3010.96890.39380.9689
624.6724.41813.83814.99810.19550.09670.60020.4759
634.564.90714.31965.49460.12340.78360.57160.942
644.2894.23713.64834.82590.43140.14120.60890.2539
653.9614.11483.52574.70380.30440.28110.60470.1426
663.9434.0223.43294.6110.39640.58040.53440.0842
673.9324.29133.70234.88040.11590.87680.07040.3152
683.8163.87623.28714.46530.42060.42640.62810.0313
693.8343.88353.29444.47250.43470.58880.49530.033
704.134.11033.52124.69940.47390.82110.69970.1393
714.4674.06283.47384.65190.08940.41160.59960.1072
724.4474.69194.10295.28090.20750.77290.80280.8028

\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[60]) \tabularnewline
48 & 4.767 & - & - & - & - & - & - & - \tabularnewline
49 & 5.019 & - & - & - & - & - & - & - \tabularnewline
50 & 4.343 & - & - & - & - & - & - & - \tabularnewline
51 & 4.853 & - & - & - & - & - & - & - \tabularnewline
52 & 4.154 & - & - & - & - & - & - & - \tabularnewline
53 & 4.035 & - & - & - & - & - & - & - \tabularnewline
54 & 3.996 & - & - & - & - & - & - & - \tabularnewline
55 & 4.734 & - & - & - & - & - & - & - \tabularnewline
56 & 3.778 & - & - & - & - & - & - & - \tabularnewline
57 & 3.887 & - & - & - & - & - & - & - \tabularnewline
58 & 3.953 & - & - & - & - & - & - & - \tabularnewline
59 & 3.987 & - & - & - & - & - & - & - \tabularnewline
60 & 4.436 & - & - & - & - & - & - & - \tabularnewline
61 & 4.803 & 4.9454 & 4.4101 & 5.4807 & 0.301 & 0.9689 & 0.3938 & 0.9689 \tabularnewline
62 & 4.672 & 4.4181 & 3.8381 & 4.9981 & 0.1955 & 0.0967 & 0.6002 & 0.4759 \tabularnewline
63 & 4.56 & 4.9071 & 4.3196 & 5.4946 & 0.1234 & 0.7836 & 0.5716 & 0.942 \tabularnewline
64 & 4.289 & 4.2371 & 3.6483 & 4.8259 & 0.4314 & 0.1412 & 0.6089 & 0.2539 \tabularnewline
65 & 3.961 & 4.1148 & 3.5257 & 4.7038 & 0.3044 & 0.2811 & 0.6047 & 0.1426 \tabularnewline
66 & 3.943 & 4.022 & 3.4329 & 4.611 & 0.3964 & 0.5804 & 0.5344 & 0.0842 \tabularnewline
67 & 3.932 & 4.2913 & 3.7023 & 4.8804 & 0.1159 & 0.8768 & 0.0704 & 0.3152 \tabularnewline
68 & 3.816 & 3.8762 & 3.2871 & 4.4653 & 0.4206 & 0.4264 & 0.6281 & 0.0313 \tabularnewline
69 & 3.834 & 3.8835 & 3.2944 & 4.4725 & 0.4347 & 0.5888 & 0.4953 & 0.033 \tabularnewline
70 & 4.13 & 4.1103 & 3.5212 & 4.6994 & 0.4739 & 0.8211 & 0.6997 & 0.1393 \tabularnewline
71 & 4.467 & 4.0628 & 3.4738 & 4.6519 & 0.0894 & 0.4116 & 0.5996 & 0.1072 \tabularnewline
72 & 4.447 & 4.6919 & 4.1029 & 5.2809 & 0.2075 & 0.7729 & 0.8028 & 0.8028 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114815&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[60])[/C][/ROW]
[ROW][C]48[/C][C]4.767[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]5.019[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]4.343[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]4.853[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]4.154[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]4.035[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]3.996[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]4.734[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]3.778[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]3.887[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]3.953[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]3.987[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]4.436[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]4.803[/C][C]4.9454[/C][C]4.4101[/C][C]5.4807[/C][C]0.301[/C][C]0.9689[/C][C]0.3938[/C][C]0.9689[/C][/ROW]
[ROW][C]62[/C][C]4.672[/C][C]4.4181[/C][C]3.8381[/C][C]4.9981[/C][C]0.1955[/C][C]0.0967[/C][C]0.6002[/C][C]0.4759[/C][/ROW]
[ROW][C]63[/C][C]4.56[/C][C]4.9071[/C][C]4.3196[/C][C]5.4946[/C][C]0.1234[/C][C]0.7836[/C][C]0.5716[/C][C]0.942[/C][/ROW]
[ROW][C]64[/C][C]4.289[/C][C]4.2371[/C][C]3.6483[/C][C]4.8259[/C][C]0.4314[/C][C]0.1412[/C][C]0.6089[/C][C]0.2539[/C][/ROW]
[ROW][C]65[/C][C]3.961[/C][C]4.1148[/C][C]3.5257[/C][C]4.7038[/C][C]0.3044[/C][C]0.2811[/C][C]0.6047[/C][C]0.1426[/C][/ROW]
[ROW][C]66[/C][C]3.943[/C][C]4.022[/C][C]3.4329[/C][C]4.611[/C][C]0.3964[/C][C]0.5804[/C][C]0.5344[/C][C]0.0842[/C][/ROW]
[ROW][C]67[/C][C]3.932[/C][C]4.2913[/C][C]3.7023[/C][C]4.8804[/C][C]0.1159[/C][C]0.8768[/C][C]0.0704[/C][C]0.3152[/C][/ROW]
[ROW][C]68[/C][C]3.816[/C][C]3.8762[/C][C]3.2871[/C][C]4.4653[/C][C]0.4206[/C][C]0.4264[/C][C]0.6281[/C][C]0.0313[/C][/ROW]
[ROW][C]69[/C][C]3.834[/C][C]3.8835[/C][C]3.2944[/C][C]4.4725[/C][C]0.4347[/C][C]0.5888[/C][C]0.4953[/C][C]0.033[/C][/ROW]
[ROW][C]70[/C][C]4.13[/C][C]4.1103[/C][C]3.5212[/C][C]4.6994[/C][C]0.4739[/C][C]0.8211[/C][C]0.6997[/C][C]0.1393[/C][/ROW]
[ROW][C]71[/C][C]4.467[/C][C]4.0628[/C][C]3.4738[/C][C]4.6519[/C][C]0.0894[/C][C]0.4116[/C][C]0.5996[/C][C]0.1072[/C][/ROW]
[ROW][C]72[/C][C]4.447[/C][C]4.6919[/C][C]4.1029[/C][C]5.2809[/C][C]0.2075[/C][C]0.7729[/C][C]0.8028[/C][C]0.8028[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114815&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114815&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[60])
484.767-------
495.019-------
504.343-------
514.853-------
524.154-------
534.035-------
543.996-------
554.734-------
563.778-------
573.887-------
583.953-------
593.987-------
604.436-------
614.8034.94544.41015.48070.3010.96890.39380.9689
624.6724.41813.83814.99810.19550.09670.60020.4759
634.564.90714.31965.49460.12340.78360.57160.942
644.2894.23713.64834.82590.43140.14120.60890.2539
653.9614.11483.52574.70380.30440.28110.60470.1426
663.9434.0223.43294.6110.39640.58040.53440.0842
673.9324.29133.70234.88040.11590.87680.07040.3152
683.8163.87623.28714.46530.42060.42640.62810.0313
693.8343.88353.29444.47250.43470.58880.49530.033
704.134.11033.52124.69940.47390.82110.69970.1393
714.4674.06283.47384.65190.08940.41160.59960.1072
724.4474.69194.10295.28090.20750.77290.80280.8028







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0552-0.028800.020300
620.0670.05750.04310.06450.04240.2058
630.0611-0.07070.05230.12050.06840.2616
640.07090.01230.04230.00270.0520.228
650.073-0.03740.04130.02370.04630.2152
660.0747-0.01960.03770.00620.03960.1991
670.07-0.08370.04430.12910.05240.229
680.0775-0.01550.04070.00360.04630.2152
690.0774-0.01270.03760.00240.04140.2036
700.07310.00480.03434e-040.03730.1932
710.0740.09950.04020.16330.04880.2209
720.064-0.05220.04120.060.04970.223

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0552 & -0.0288 & 0 & 0.0203 & 0 & 0 \tabularnewline
62 & 0.067 & 0.0575 & 0.0431 & 0.0645 & 0.0424 & 0.2058 \tabularnewline
63 & 0.0611 & -0.0707 & 0.0523 & 0.1205 & 0.0684 & 0.2616 \tabularnewline
64 & 0.0709 & 0.0123 & 0.0423 & 0.0027 & 0.052 & 0.228 \tabularnewline
65 & 0.073 & -0.0374 & 0.0413 & 0.0237 & 0.0463 & 0.2152 \tabularnewline
66 & 0.0747 & -0.0196 & 0.0377 & 0.0062 & 0.0396 & 0.1991 \tabularnewline
67 & 0.07 & -0.0837 & 0.0443 & 0.1291 & 0.0524 & 0.229 \tabularnewline
68 & 0.0775 & -0.0155 & 0.0407 & 0.0036 & 0.0463 & 0.2152 \tabularnewline
69 & 0.0774 & -0.0127 & 0.0376 & 0.0024 & 0.0414 & 0.2036 \tabularnewline
70 & 0.0731 & 0.0048 & 0.0343 & 4e-04 & 0.0373 & 0.1932 \tabularnewline
71 & 0.074 & 0.0995 & 0.0402 & 0.1633 & 0.0488 & 0.2209 \tabularnewline
72 & 0.064 & -0.0522 & 0.0412 & 0.06 & 0.0497 & 0.223 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114815&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]61[/C][C]0.0552[/C][C]-0.0288[/C][C]0[/C][C]0.0203[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.067[/C][C]0.0575[/C][C]0.0431[/C][C]0.0645[/C][C]0.0424[/C][C]0.2058[/C][/ROW]
[ROW][C]63[/C][C]0.0611[/C][C]-0.0707[/C][C]0.0523[/C][C]0.1205[/C][C]0.0684[/C][C]0.2616[/C][/ROW]
[ROW][C]64[/C][C]0.0709[/C][C]0.0123[/C][C]0.0423[/C][C]0.0027[/C][C]0.052[/C][C]0.228[/C][/ROW]
[ROW][C]65[/C][C]0.073[/C][C]-0.0374[/C][C]0.0413[/C][C]0.0237[/C][C]0.0463[/C][C]0.2152[/C][/ROW]
[ROW][C]66[/C][C]0.0747[/C][C]-0.0196[/C][C]0.0377[/C][C]0.0062[/C][C]0.0396[/C][C]0.1991[/C][/ROW]
[ROW][C]67[/C][C]0.07[/C][C]-0.0837[/C][C]0.0443[/C][C]0.1291[/C][C]0.0524[/C][C]0.229[/C][/ROW]
[ROW][C]68[/C][C]0.0775[/C][C]-0.0155[/C][C]0.0407[/C][C]0.0036[/C][C]0.0463[/C][C]0.2152[/C][/ROW]
[ROW][C]69[/C][C]0.0774[/C][C]-0.0127[/C][C]0.0376[/C][C]0.0024[/C][C]0.0414[/C][C]0.2036[/C][/ROW]
[ROW][C]70[/C][C]0.0731[/C][C]0.0048[/C][C]0.0343[/C][C]4e-04[/C][C]0.0373[/C][C]0.1932[/C][/ROW]
[ROW][C]71[/C][C]0.074[/C][C]0.0995[/C][C]0.0402[/C][C]0.1633[/C][C]0.0488[/C][C]0.2209[/C][/ROW]
[ROW][C]72[/C][C]0.064[/C][C]-0.0522[/C][C]0.0412[/C][C]0.06[/C][C]0.0497[/C][C]0.223[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114815&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114815&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
610.0552-0.028800.020300
620.0670.05750.04310.06450.04240.2058
630.0611-0.07070.05230.12050.06840.2616
640.07090.01230.04230.00270.0520.228
650.073-0.03740.04130.02370.04630.2152
660.0747-0.01960.03770.00620.03960.1991
670.07-0.08370.04430.12910.05240.229
680.0775-0.01550.04070.00360.04630.2152
690.0774-0.01270.03760.00240.04140.2036
700.07310.00480.03434e-040.03730.1932
710.0740.09950.04020.16330.04880.2209
720.064-0.05220.04120.060.04970.223



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