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, 18 Dec 2008 09:01:41 -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/2008/Dec/18/t122961612876vz9kpd92t5b81.htm/, Retrieved Sat, 11 May 2024 05:06:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34865, Retrieved Sat, 11 May 2024 05:06:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact200
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [Variance Reduction Matrix] [] [2008-11-30 18:13:06] [b745fd448f60064800b631a75a630267]
F RM D    [Standard Deviation-Mean Plot] [SMP Q1] [2008-12-07 13:12:10] [e5d91604aae608e98a8ea24759233f66]
F RM        [Variance Reduction Matrix] [VRM Q1] [2008-12-07 13:13:31] [e5d91604aae608e98a8ea24759233f66]
F RMP         [(Partial) Autocorrelation Function] [ACF Q2] [2008-12-07 13:20:49] [e5d91604aae608e98a8ea24759233f66]
F RMP           [ARIMA Backward Selection] [ARMA Q5] [2008-12-07 13:46:58] [e5d91604aae608e98a8ea24759233f66]
F RMPD            [ARIMA Forecasting] [Forecasting Infla...] [2008-12-10 18:36:07] [e5d91604aae608e98a8ea24759233f66]
-   P                 [ARIMA Forecasting] [Forecasting] [2008-12-18 16:01:41] [55ca0ca4a201c9689dcf5fae352c92eb] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.42
0.74
1.02
1.51
1.86
1.59
1.03
0.44
0.82
0.86
0.57
0.59
0.95
0.98
1.23
1.17
0.84
0.74
0.65
0.91
1.19
1.3
1.53
1.94
1.79
1.95
2.26
2.04
2.16
2.75
2.79
2.88
3.36
2.97
3.1
2.49
2.2
2.25
2.09
2.79
3.14
2.93
2.65
2.67
2.26
2.35
2.13
2.18
2.9
2.63
2.67
1.81
1.33
0.88
1.28
1.26
1.26
1.29
1.1
1.37
1.21
1.74
1.76
1.48
1.04
1.62
1.49
1.79
1.8
1.58
1.86
1.74
1.59
1.26
1.13
1.92
2.61
2.26
2.41
2.26
2.03
2.86
2.55
2.27
2.26
2.57
3.07
2.76
2.51
2.87
3.14
3.11
3.16
2.47
2.57
2.89
2.63
2.38
1.69
1.96
2.19
1.87
1.6
1.63
1.22
1.21
1.49
1.64
1.66
1.77
1.82
1.78
1.28
1.29
1.37
1.12
1.51
2.24
2.94
3.09




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34865&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 time1 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[108])
962.89-------
972.63-------
982.38-------
991.69-------
1001.96-------
1012.19-------
1021.87-------
1031.6-------
1041.63-------
1051.22-------
1061.21-------
1071.49-------
1081.64-------
1091.661.87491.36972.38010.20220.81890.00170.8189
1101.771.76831.00782.52880.49830.60990.05750.6296
1111.821.91751.01472.82030.41620.62560.68930.7266
1121.781.70740.7132.70180.44310.41220.30930.5528
1131.281.57640.50772.64510.29340.35440.13020.4536
1141.291.65460.51612.79310.26510.74050.35540.51
1151.371.62960.42312.83610.33660.70940.51920.4933
1161.121.53290.26072.80510.26230.59910.44050.4345
1171.511.94170.60683.27660.26310.88620.85540.6711
1182.242.09530.70043.49010.41940.79460.89320.7388
1192.941.9480.49563.40040.09030.34680.73170.6612
1203.091.78530.27753.29310.04490.06670.57490.5749

\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[108]) \tabularnewline
96 & 2.89 & - & - & - & - & - & - & - \tabularnewline
97 & 2.63 & - & - & - & - & - & - & - \tabularnewline
98 & 2.38 & - & - & - & - & - & - & - \tabularnewline
99 & 1.69 & - & - & - & - & - & - & - \tabularnewline
100 & 1.96 & - & - & - & - & - & - & - \tabularnewline
101 & 2.19 & - & - & - & - & - & - & - \tabularnewline
102 & 1.87 & - & - & - & - & - & - & - \tabularnewline
103 & 1.6 & - & - & - & - & - & - & - \tabularnewline
104 & 1.63 & - & - & - & - & - & - & - \tabularnewline
105 & 1.22 & - & - & - & - & - & - & - \tabularnewline
106 & 1.21 & - & - & - & - & - & - & - \tabularnewline
107 & 1.49 & - & - & - & - & - & - & - \tabularnewline
108 & 1.64 & - & - & - & - & - & - & - \tabularnewline
109 & 1.66 & 1.8749 & 1.3697 & 2.3801 & 0.2022 & 0.8189 & 0.0017 & 0.8189 \tabularnewline
110 & 1.77 & 1.7683 & 1.0078 & 2.5288 & 0.4983 & 0.6099 & 0.0575 & 0.6296 \tabularnewline
111 & 1.82 & 1.9175 & 1.0147 & 2.8203 & 0.4162 & 0.6256 & 0.6893 & 0.7266 \tabularnewline
112 & 1.78 & 1.7074 & 0.713 & 2.7018 & 0.4431 & 0.4122 & 0.3093 & 0.5528 \tabularnewline
113 & 1.28 & 1.5764 & 0.5077 & 2.6451 & 0.2934 & 0.3544 & 0.1302 & 0.4536 \tabularnewline
114 & 1.29 & 1.6546 & 0.5161 & 2.7931 & 0.2651 & 0.7405 & 0.3554 & 0.51 \tabularnewline
115 & 1.37 & 1.6296 & 0.4231 & 2.8361 & 0.3366 & 0.7094 & 0.5192 & 0.4933 \tabularnewline
116 & 1.12 & 1.5329 & 0.2607 & 2.8051 & 0.2623 & 0.5991 & 0.4405 & 0.4345 \tabularnewline
117 & 1.51 & 1.9417 & 0.6068 & 3.2766 & 0.2631 & 0.8862 & 0.8554 & 0.6711 \tabularnewline
118 & 2.24 & 2.0953 & 0.7004 & 3.4901 & 0.4194 & 0.7946 & 0.8932 & 0.7388 \tabularnewline
119 & 2.94 & 1.948 & 0.4956 & 3.4004 & 0.0903 & 0.3468 & 0.7317 & 0.6612 \tabularnewline
120 & 3.09 & 1.7853 & 0.2775 & 3.2931 & 0.0449 & 0.0667 & 0.5749 & 0.5749 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34865&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[108])[/C][/ROW]
[ROW][C]96[/C][C]2.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]2.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]2.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]1.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]1.96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]2.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]1.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]1.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]1.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]1.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]1.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]1.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]1.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]1.66[/C][C]1.8749[/C][C]1.3697[/C][C]2.3801[/C][C]0.2022[/C][C]0.8189[/C][C]0.0017[/C][C]0.8189[/C][/ROW]
[ROW][C]110[/C][C]1.77[/C][C]1.7683[/C][C]1.0078[/C][C]2.5288[/C][C]0.4983[/C][C]0.6099[/C][C]0.0575[/C][C]0.6296[/C][/ROW]
[ROW][C]111[/C][C]1.82[/C][C]1.9175[/C][C]1.0147[/C][C]2.8203[/C][C]0.4162[/C][C]0.6256[/C][C]0.6893[/C][C]0.7266[/C][/ROW]
[ROW][C]112[/C][C]1.78[/C][C]1.7074[/C][C]0.713[/C][C]2.7018[/C][C]0.4431[/C][C]0.4122[/C][C]0.3093[/C][C]0.5528[/C][/ROW]
[ROW][C]113[/C][C]1.28[/C][C]1.5764[/C][C]0.5077[/C][C]2.6451[/C][C]0.2934[/C][C]0.3544[/C][C]0.1302[/C][C]0.4536[/C][/ROW]
[ROW][C]114[/C][C]1.29[/C][C]1.6546[/C][C]0.5161[/C][C]2.7931[/C][C]0.2651[/C][C]0.7405[/C][C]0.3554[/C][C]0.51[/C][/ROW]
[ROW][C]115[/C][C]1.37[/C][C]1.6296[/C][C]0.4231[/C][C]2.8361[/C][C]0.3366[/C][C]0.7094[/C][C]0.5192[/C][C]0.4933[/C][/ROW]
[ROW][C]116[/C][C]1.12[/C][C]1.5329[/C][C]0.2607[/C][C]2.8051[/C][C]0.2623[/C][C]0.5991[/C][C]0.4405[/C][C]0.4345[/C][/ROW]
[ROW][C]117[/C][C]1.51[/C][C]1.9417[/C][C]0.6068[/C][C]3.2766[/C][C]0.2631[/C][C]0.8862[/C][C]0.8554[/C][C]0.6711[/C][/ROW]
[ROW][C]118[/C][C]2.24[/C][C]2.0953[/C][C]0.7004[/C][C]3.4901[/C][C]0.4194[/C][C]0.7946[/C][C]0.8932[/C][C]0.7388[/C][/ROW]
[ROW][C]119[/C][C]2.94[/C][C]1.948[/C][C]0.4956[/C][C]3.4004[/C][C]0.0903[/C][C]0.3468[/C][C]0.7317[/C][C]0.6612[/C][/ROW]
[ROW][C]120[/C][C]3.09[/C][C]1.7853[/C][C]0.2775[/C][C]3.2931[/C][C]0.0449[/C][C]0.0667[/C][C]0.5749[/C][C]0.5749[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34865&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34865&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[108])
962.89-------
972.63-------
982.38-------
991.69-------
1001.96-------
1012.19-------
1021.87-------
1031.6-------
1041.63-------
1051.22-------
1061.21-------
1071.49-------
1081.64-------
1091.661.87491.36972.38010.20220.81890.00170.8189
1101.771.76831.00782.52880.49830.60990.05750.6296
1111.821.91751.01472.82030.41620.62560.68930.7266
1121.781.70740.7132.70180.44310.41220.30930.5528
1131.281.57640.50772.64510.29340.35440.13020.4536
1141.291.65460.51612.79310.26510.74050.35540.51
1151.371.62960.42312.83610.33660.70940.51920.4933
1161.121.53290.26072.80510.26230.59910.44050.4345
1171.511.94170.60683.27660.26310.88620.85540.6711
1182.242.09530.70043.49010.41940.79460.89320.7388
1192.941.9480.49563.40040.09030.34680.73170.6612
1203.091.78530.27753.29310.04490.06670.57490.5749







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.1375-0.11460.00960.04620.00380.062
1100.21940.0011e-04005e-04
1110.2402-0.05080.00420.00958e-040.0281
1120.29710.04250.00350.00534e-040.021
1130.3459-0.1880.01570.08790.00730.0856
1140.3511-0.22040.01840.13290.01110.1053
1150.3777-0.15930.01330.06740.00560.0749
1160.4234-0.26940.02240.17050.01420.1192
1170.3508-0.22230.01850.18640.01550.1246
1180.33960.06910.00580.02090.00170.0418
1190.38040.50920.04240.98410.0820.2864
1200.43090.73080.06091.70230.14190.3766

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.1375 & -0.1146 & 0.0096 & 0.0462 & 0.0038 & 0.062 \tabularnewline
110 & 0.2194 & 0.001 & 1e-04 & 0 & 0 & 5e-04 \tabularnewline
111 & 0.2402 & -0.0508 & 0.0042 & 0.0095 & 8e-04 & 0.0281 \tabularnewline
112 & 0.2971 & 0.0425 & 0.0035 & 0.0053 & 4e-04 & 0.021 \tabularnewline
113 & 0.3459 & -0.188 & 0.0157 & 0.0879 & 0.0073 & 0.0856 \tabularnewline
114 & 0.3511 & -0.2204 & 0.0184 & 0.1329 & 0.0111 & 0.1053 \tabularnewline
115 & 0.3777 & -0.1593 & 0.0133 & 0.0674 & 0.0056 & 0.0749 \tabularnewline
116 & 0.4234 & -0.2694 & 0.0224 & 0.1705 & 0.0142 & 0.1192 \tabularnewline
117 & 0.3508 & -0.2223 & 0.0185 & 0.1864 & 0.0155 & 0.1246 \tabularnewline
118 & 0.3396 & 0.0691 & 0.0058 & 0.0209 & 0.0017 & 0.0418 \tabularnewline
119 & 0.3804 & 0.5092 & 0.0424 & 0.9841 & 0.082 & 0.2864 \tabularnewline
120 & 0.4309 & 0.7308 & 0.0609 & 1.7023 & 0.1419 & 0.3766 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34865&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]109[/C][C]0.1375[/C][C]-0.1146[/C][C]0.0096[/C][C]0.0462[/C][C]0.0038[/C][C]0.062[/C][/ROW]
[ROW][C]110[/C][C]0.2194[/C][C]0.001[/C][C]1e-04[/C][C]0[/C][C]0[/C][C]5e-04[/C][/ROW]
[ROW][C]111[/C][C]0.2402[/C][C]-0.0508[/C][C]0.0042[/C][C]0.0095[/C][C]8e-04[/C][C]0.0281[/C][/ROW]
[ROW][C]112[/C][C]0.2971[/C][C]0.0425[/C][C]0.0035[/C][C]0.0053[/C][C]4e-04[/C][C]0.021[/C][/ROW]
[ROW][C]113[/C][C]0.3459[/C][C]-0.188[/C][C]0.0157[/C][C]0.0879[/C][C]0.0073[/C][C]0.0856[/C][/ROW]
[ROW][C]114[/C][C]0.3511[/C][C]-0.2204[/C][C]0.0184[/C][C]0.1329[/C][C]0.0111[/C][C]0.1053[/C][/ROW]
[ROW][C]115[/C][C]0.3777[/C][C]-0.1593[/C][C]0.0133[/C][C]0.0674[/C][C]0.0056[/C][C]0.0749[/C][/ROW]
[ROW][C]116[/C][C]0.4234[/C][C]-0.2694[/C][C]0.0224[/C][C]0.1705[/C][C]0.0142[/C][C]0.1192[/C][/ROW]
[ROW][C]117[/C][C]0.3508[/C][C]-0.2223[/C][C]0.0185[/C][C]0.1864[/C][C]0.0155[/C][C]0.1246[/C][/ROW]
[ROW][C]118[/C][C]0.3396[/C][C]0.0691[/C][C]0.0058[/C][C]0.0209[/C][C]0.0017[/C][C]0.0418[/C][/ROW]
[ROW][C]119[/C][C]0.3804[/C][C]0.5092[/C][C]0.0424[/C][C]0.9841[/C][C]0.082[/C][C]0.2864[/C][/ROW]
[ROW][C]120[/C][C]0.4309[/C][C]0.7308[/C][C]0.0609[/C][C]1.7023[/C][C]0.1419[/C][C]0.3766[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34865&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34865&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
1090.1375-0.11460.00960.04620.00380.062
1100.21940.0011e-04005e-04
1110.2402-0.05080.00420.00958e-040.0281
1120.29710.04250.00350.00534e-040.021
1130.3459-0.1880.01570.08790.00730.0856
1140.3511-0.22040.01840.13290.01110.1053
1150.3777-0.15930.01330.06740.00560.0749
1160.4234-0.26940.02240.17050.01420.1192
1170.3508-0.22230.01850.18640.01550.1246
1180.33960.06910.00580.02090.00170.0418
1190.38040.50920.04240.98410.0820.2864
1200.43090.73080.06091.70230.14190.3766



Parameters (Session):
par1 = 1.3 ; par2 = 0 ; par3 = 0 ; par4 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')