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 computationSat, 18 Dec 2010 16:56:39 +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/18/t129269126888gd2oo7gnm9z61.htm/, Retrieved Tue, 30 Apr 2024 00:48:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112107, Retrieved Tue, 30 Apr 2024 00:48:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact165
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [] [] [1970-01-01 00:00:00] [ed939ef6f97e5f2afb6796311d9e7a5f]
- RMPD  [(Partial) Autocorrelation Function] [] [2010-12-17 18:01:53] [ed939ef6f97e5f2afb6796311d9e7a5f]
- RMP     [ARIMA Forecasting] [] [2010-12-17 18:35:23] [ed939ef6f97e5f2afb6796311d9e7a5f]
-   P         [ARIMA Forecasting] [Paper] [2010-12-18 16:56:39] [476d588d86fe88306e0383abd6004235] [Current]
Feedback Forum

Post a new message
Dataseries X:
31.514
27.071
29.462
26.105
22.397
23.843
21.705
18.089
20.764
25.316
17.704
15.548
28.029
29.383
36.438
32.034
22.679
24.319
18.004
17.537
20.366
22.782
19.169
13.807
29.743
25.591
29.096
26.482
22.405
27.044
17.970
18.730
19.684
19.785
18.479
10.698
31.956
29.506
34.506
27.165
26.736
23.691
18.157
17.328
18.205
20.995
17.382
9.367
31.124
26.551
30.651
25.859
25.100
25.778
20.418
18.688
20.424
24.776
19.814
12.738
31.566
30.111
30.019
31.934
25.826
26.835
20.205
17.789
20.520
22.518
15.572
11.509
25.447
24.090
27.786
26.195
20.516
22.759
19.028
16.971
20.036
22.485
18.730
14.538




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=112107&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=112107&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112107&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[72])
6012.738-------
6131.566-------
6230.111-------
6330.019-------
6431.934-------
6525.826-------
6626.835-------
6720.205-------
6817.789-------
6920.52-------
7022.518-------
7115.572-------
7211.509-------
7325.44729.46825.622733.31330.020210.14251
7424.0927.366823.493131.24050.04870.83430.08251
7527.78631.128427.176435.08030.04870.99980.70891
7626.19527.835223.883231.78720.2080.50970.0211
7720.51623.858219.905427.8110.04870.12330.16461
7822.75925.002121.039428.96470.13360.98680.18231
7919.02819.215815.241523.190.46310.04030.31280.9999
8016.97117.887313.899321.87520.32620.28750.51930.9991
8120.03619.886415.886223.88650.47080.92340.37811
8222.48522.610918.600326.62160.47550.89590.51811
8318.7318.013513.996422.03060.36330.01460.88320.9992
8414.53812.22068.197516.24360.12948e-040.63560.6356

\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[72]) \tabularnewline
60 & 12.738 & - & - & - & - & - & - & - \tabularnewline
61 & 31.566 & - & - & - & - & - & - & - \tabularnewline
62 & 30.111 & - & - & - & - & - & - & - \tabularnewline
63 & 30.019 & - & - & - & - & - & - & - \tabularnewline
64 & 31.934 & - & - & - & - & - & - & - \tabularnewline
65 & 25.826 & - & - & - & - & - & - & - \tabularnewline
66 & 26.835 & - & - & - & - & - & - & - \tabularnewline
67 & 20.205 & - & - & - & - & - & - & - \tabularnewline
68 & 17.789 & - & - & - & - & - & - & - \tabularnewline
69 & 20.52 & - & - & - & - & - & - & - \tabularnewline
70 & 22.518 & - & - & - & - & - & - & - \tabularnewline
71 & 15.572 & - & - & - & - & - & - & - \tabularnewline
72 & 11.509 & - & - & - & - & - & - & - \tabularnewline
73 & 25.447 & 29.468 & 25.6227 & 33.3133 & 0.0202 & 1 & 0.1425 & 1 \tabularnewline
74 & 24.09 & 27.3668 & 23.4931 & 31.2405 & 0.0487 & 0.8343 & 0.0825 & 1 \tabularnewline
75 & 27.786 & 31.1284 & 27.1764 & 35.0803 & 0.0487 & 0.9998 & 0.7089 & 1 \tabularnewline
76 & 26.195 & 27.8352 & 23.8832 & 31.7872 & 0.208 & 0.5097 & 0.021 & 1 \tabularnewline
77 & 20.516 & 23.8582 & 19.9054 & 27.811 & 0.0487 & 0.1233 & 0.1646 & 1 \tabularnewline
78 & 22.759 & 25.0021 & 21.0394 & 28.9647 & 0.1336 & 0.9868 & 0.1823 & 1 \tabularnewline
79 & 19.028 & 19.2158 & 15.2415 & 23.19 & 0.4631 & 0.0403 & 0.3128 & 0.9999 \tabularnewline
80 & 16.971 & 17.8873 & 13.8993 & 21.8752 & 0.3262 & 0.2875 & 0.5193 & 0.9991 \tabularnewline
81 & 20.036 & 19.8864 & 15.8862 & 23.8865 & 0.4708 & 0.9234 & 0.3781 & 1 \tabularnewline
82 & 22.485 & 22.6109 & 18.6003 & 26.6216 & 0.4755 & 0.8959 & 0.5181 & 1 \tabularnewline
83 & 18.73 & 18.0135 & 13.9964 & 22.0306 & 0.3633 & 0.0146 & 0.8832 & 0.9992 \tabularnewline
84 & 14.538 & 12.2206 & 8.1975 & 16.2436 & 0.1294 & 8e-04 & 0.6356 & 0.6356 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112107&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[72])[/C][/ROW]
[ROW][C]60[/C][C]12.738[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]31.566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]30.111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]30.019[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]31.934[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]25.826[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]26.835[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]20.205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]17.789[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]20.52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]22.518[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]15.572[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]11.509[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]25.447[/C][C]29.468[/C][C]25.6227[/C][C]33.3133[/C][C]0.0202[/C][C]1[/C][C]0.1425[/C][C]1[/C][/ROW]
[ROW][C]74[/C][C]24.09[/C][C]27.3668[/C][C]23.4931[/C][C]31.2405[/C][C]0.0487[/C][C]0.8343[/C][C]0.0825[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]27.786[/C][C]31.1284[/C][C]27.1764[/C][C]35.0803[/C][C]0.0487[/C][C]0.9998[/C][C]0.7089[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]26.195[/C][C]27.8352[/C][C]23.8832[/C][C]31.7872[/C][C]0.208[/C][C]0.5097[/C][C]0.021[/C][C]1[/C][/ROW]
[ROW][C]77[/C][C]20.516[/C][C]23.8582[/C][C]19.9054[/C][C]27.811[/C][C]0.0487[/C][C]0.1233[/C][C]0.1646[/C][C]1[/C][/ROW]
[ROW][C]78[/C][C]22.759[/C][C]25.0021[/C][C]21.0394[/C][C]28.9647[/C][C]0.1336[/C][C]0.9868[/C][C]0.1823[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]19.028[/C][C]19.2158[/C][C]15.2415[/C][C]23.19[/C][C]0.4631[/C][C]0.0403[/C][C]0.3128[/C][C]0.9999[/C][/ROW]
[ROW][C]80[/C][C]16.971[/C][C]17.8873[/C][C]13.8993[/C][C]21.8752[/C][C]0.3262[/C][C]0.2875[/C][C]0.5193[/C][C]0.9991[/C][/ROW]
[ROW][C]81[/C][C]20.036[/C][C]19.8864[/C][C]15.8862[/C][C]23.8865[/C][C]0.4708[/C][C]0.9234[/C][C]0.3781[/C][C]1[/C][/ROW]
[ROW][C]82[/C][C]22.485[/C][C]22.6109[/C][C]18.6003[/C][C]26.6216[/C][C]0.4755[/C][C]0.8959[/C][C]0.5181[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]18.73[/C][C]18.0135[/C][C]13.9964[/C][C]22.0306[/C][C]0.3633[/C][C]0.0146[/C][C]0.8832[/C][C]0.9992[/C][/ROW]
[ROW][C]84[/C][C]14.538[/C][C]12.2206[/C][C]8.1975[/C][C]16.2436[/C][C]0.1294[/C][C]8e-04[/C][C]0.6356[/C][C]0.6356[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112107&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112107&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[72])
6012.738-------
6131.566-------
6230.111-------
6330.019-------
6431.934-------
6525.826-------
6626.835-------
6720.205-------
6817.789-------
6920.52-------
7022.518-------
7115.572-------
7211.509-------
7325.44729.46825.622733.31330.020210.14251
7424.0927.366823.493131.24050.04870.83430.08251
7527.78631.128427.176435.08030.04870.99980.70891
7626.19527.835223.883231.78720.2080.50970.0211
7720.51623.858219.905427.8110.04870.12330.16461
7822.75925.002121.039428.96470.13360.98680.18231
7919.02819.215815.241523.190.46310.04030.31280.9999
8016.97117.887313.899321.87520.32620.28750.51930.9991
8120.03619.886415.886223.88650.47080.92340.37811
8222.48522.610918.600326.62160.47550.89590.51811
8318.7318.013513.996422.03060.36330.01460.88320.9992
8414.53812.22068.197516.24360.12948e-040.63560.6356







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.0666-0.1365016.168400
740.0722-0.11970.128110.737613.4533.6678
750.0648-0.10740.121211.171312.69243.5626
760.0724-0.05890.10562.690210.19193.1925
770.0845-0.14010.112511.170410.38763.223
780.0809-0.08970.10875.03139.49493.0814
790.1055-0.00980.09460.03538.14352.8537
800.1137-0.05120.08920.83967.23052.689
810.10260.00750.08010.02246.42962.5357
820.0905-0.00560.07260.01595.78822.4059
830.11380.03980.06970.51345.30872.3041
840.1680.18960.07965.37055.31392.3052

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0666 & -0.1365 & 0 & 16.1684 & 0 & 0 \tabularnewline
74 & 0.0722 & -0.1197 & 0.1281 & 10.7376 & 13.453 & 3.6678 \tabularnewline
75 & 0.0648 & -0.1074 & 0.1212 & 11.1713 & 12.6924 & 3.5626 \tabularnewline
76 & 0.0724 & -0.0589 & 0.1056 & 2.6902 & 10.1919 & 3.1925 \tabularnewline
77 & 0.0845 & -0.1401 & 0.1125 & 11.1704 & 10.3876 & 3.223 \tabularnewline
78 & 0.0809 & -0.0897 & 0.1087 & 5.0313 & 9.4949 & 3.0814 \tabularnewline
79 & 0.1055 & -0.0098 & 0.0946 & 0.0353 & 8.1435 & 2.8537 \tabularnewline
80 & 0.1137 & -0.0512 & 0.0892 & 0.8396 & 7.2305 & 2.689 \tabularnewline
81 & 0.1026 & 0.0075 & 0.0801 & 0.0224 & 6.4296 & 2.5357 \tabularnewline
82 & 0.0905 & -0.0056 & 0.0726 & 0.0159 & 5.7882 & 2.4059 \tabularnewline
83 & 0.1138 & 0.0398 & 0.0697 & 0.5134 & 5.3087 & 2.3041 \tabularnewline
84 & 0.168 & 0.1896 & 0.0796 & 5.3705 & 5.3139 & 2.3052 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112107&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]73[/C][C]0.0666[/C][C]-0.1365[/C][C]0[/C][C]16.1684[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0722[/C][C]-0.1197[/C][C]0.1281[/C][C]10.7376[/C][C]13.453[/C][C]3.6678[/C][/ROW]
[ROW][C]75[/C][C]0.0648[/C][C]-0.1074[/C][C]0.1212[/C][C]11.1713[/C][C]12.6924[/C][C]3.5626[/C][/ROW]
[ROW][C]76[/C][C]0.0724[/C][C]-0.0589[/C][C]0.1056[/C][C]2.6902[/C][C]10.1919[/C][C]3.1925[/C][/ROW]
[ROW][C]77[/C][C]0.0845[/C][C]-0.1401[/C][C]0.1125[/C][C]11.1704[/C][C]10.3876[/C][C]3.223[/C][/ROW]
[ROW][C]78[/C][C]0.0809[/C][C]-0.0897[/C][C]0.1087[/C][C]5.0313[/C][C]9.4949[/C][C]3.0814[/C][/ROW]
[ROW][C]79[/C][C]0.1055[/C][C]-0.0098[/C][C]0.0946[/C][C]0.0353[/C][C]8.1435[/C][C]2.8537[/C][/ROW]
[ROW][C]80[/C][C]0.1137[/C][C]-0.0512[/C][C]0.0892[/C][C]0.8396[/C][C]7.2305[/C][C]2.689[/C][/ROW]
[ROW][C]81[/C][C]0.1026[/C][C]0.0075[/C][C]0.0801[/C][C]0.0224[/C][C]6.4296[/C][C]2.5357[/C][/ROW]
[ROW][C]82[/C][C]0.0905[/C][C]-0.0056[/C][C]0.0726[/C][C]0.0159[/C][C]5.7882[/C][C]2.4059[/C][/ROW]
[ROW][C]83[/C][C]0.1138[/C][C]0.0398[/C][C]0.0697[/C][C]0.5134[/C][C]5.3087[/C][C]2.3041[/C][/ROW]
[ROW][C]84[/C][C]0.168[/C][C]0.1896[/C][C]0.0796[/C][C]5.3705[/C][C]5.3139[/C][C]2.3052[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112107&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112107&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
730.0666-0.1365016.168400
740.0722-0.11970.128110.737613.4533.6678
750.0648-0.10740.121211.171312.69243.5626
760.0724-0.05890.10562.690210.19193.1925
770.0845-0.14010.112511.170410.38763.223
780.0809-0.08970.10875.03139.49493.0814
790.1055-0.00980.09460.03538.14352.8537
800.1137-0.05120.08920.83967.23052.689
810.10260.00750.08010.02246.42962.5357
820.0905-0.00560.07260.01595.78822.4059
830.11380.03980.06970.51345.30872.3041
840.1680.18960.07965.37055.31392.3052



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