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, 19 Dec 2009 09:24:22 -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/19/t1261240751h11ym307n83wp95.htm/, Retrieved Sat, 04 May 2024 00:34:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69690, Retrieved Sat, 04 May 2024 00:34:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact147
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-    D      [ARIMA Forecasting] [WS 10 ] [2009-12-12 11:53:20] [3425351e86519d261a643e224a0c8ee1]
-   PD          [ARIMA Forecasting] [] [2009-12-19 16:24:22] [17416e80e7873ecccac25c455c5f767e] [Current]
-   P             [ARIMA Forecasting] [] [2009-12-20 10:24:37] [3425351e86519d261a643e224a0c8ee1]
-   PD              [ARIMA Forecasting] [ARIMA forecasting] [2009-12-21 15:59:35] [76ab39dc7a55316678260825bd5ad46c]
Feedback Forum

Post a new message
Dataseries X:
91.98
91.72
90.27
91.89
92.07
92.92
93.34
93.6
92.41
93.6
93.77
93.6
93.6
93.51
92.66
94.2
94.37
94.45
94.62
94.37
93.43
94.79
94.88
94.79
94.62
94.71
93.77
95.73
95.99
95.82
95.47
95.82
94.71
96.33
96.5
96.16
96.33
96.33
95.05
96.84
96.92
97.44
97.78
97.69
96.67
98.29
98.2
98.71
98.54
98.2
96.92
99.06
99.65
99.82
99.99
100.33
99.31
101.1
101.1
100.93
100.85
100.93
99.6
101.88
101.81
102.38
102.74
102.82
101.72
103.47
102.98
102.68
102.9
103.03
101.29
103.69
103.68
104.2
104.08
104.16
103.05
104.66
104.46
104.95
105.85
106.23
104.86
107.44
108.23
108.45
109.39
110.15
109.13
110.28
110.17
109.99
109.26
109.11
107.06
109.53
108.92
109.24
109.12
109
107.23
109.49
109.04
109.02
109.23




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69690&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[97])
85105.85-------
86106.23-------
87104.86-------
88107.44-------
89108.23-------
90108.45-------
91109.39-------
92110.15-------
93109.13-------
94110.28-------
95110.17-------
96109.99-------
97109.26-------
98109.11109.2354108.5771109.89360.35450.470810.4708
99107.06107.8142106.8367108.79180.06520.004710.0019
100109.53109.9922108.754111.23040.2322110.8768
101108.92110.2785108.8144111.74270.03450.84180.99690.9136
102109.24110.6173108.9519112.28280.05250.97710.99460.9449
103109.12110.9435109.0954112.79150.02660.96460.95030.9629
104109111.2197109.2039113.23560.01550.97940.85090.9716
105107.23110.1565107.9849112.3280.00410.85170.82290.7908
106109.49111.6485109.3313113.96580.03390.99990.87650.9783
107109.04111.5266109.072113.98130.02350.9480.86060.9648
108109.02111.5158108.931114.10070.02920.96980.87640.9564
109109.23111.5103108.8015114.21910.04950.96420.94830.9483

\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[97]) \tabularnewline
85 & 105.85 & - & - & - & - & - & - & - \tabularnewline
86 & 106.23 & - & - & - & - & - & - & - \tabularnewline
87 & 104.86 & - & - & - & - & - & - & - \tabularnewline
88 & 107.44 & - & - & - & - & - & - & - \tabularnewline
89 & 108.23 & - & - & - & - & - & - & - \tabularnewline
90 & 108.45 & - & - & - & - & - & - & - \tabularnewline
91 & 109.39 & - & - & - & - & - & - & - \tabularnewline
92 & 110.15 & - & - & - & - & - & - & - \tabularnewline
93 & 109.13 & - & - & - & - & - & - & - \tabularnewline
94 & 110.28 & - & - & - & - & - & - & - \tabularnewline
95 & 110.17 & - & - & - & - & - & - & - \tabularnewline
96 & 109.99 & - & - & - & - & - & - & - \tabularnewline
97 & 109.26 & - & - & - & - & - & - & - \tabularnewline
98 & 109.11 & 109.2354 & 108.5771 & 109.8936 & 0.3545 & 0.4708 & 1 & 0.4708 \tabularnewline
99 & 107.06 & 107.8142 & 106.8367 & 108.7918 & 0.0652 & 0.0047 & 1 & 0.0019 \tabularnewline
100 & 109.53 & 109.9922 & 108.754 & 111.2304 & 0.2322 & 1 & 1 & 0.8768 \tabularnewline
101 & 108.92 & 110.2785 & 108.8144 & 111.7427 & 0.0345 & 0.8418 & 0.9969 & 0.9136 \tabularnewline
102 & 109.24 & 110.6173 & 108.9519 & 112.2828 & 0.0525 & 0.9771 & 0.9946 & 0.9449 \tabularnewline
103 & 109.12 & 110.9435 & 109.0954 & 112.7915 & 0.0266 & 0.9646 & 0.9503 & 0.9629 \tabularnewline
104 & 109 & 111.2197 & 109.2039 & 113.2356 & 0.0155 & 0.9794 & 0.8509 & 0.9716 \tabularnewline
105 & 107.23 & 110.1565 & 107.9849 & 112.328 & 0.0041 & 0.8517 & 0.8229 & 0.7908 \tabularnewline
106 & 109.49 & 111.6485 & 109.3313 & 113.9658 & 0.0339 & 0.9999 & 0.8765 & 0.9783 \tabularnewline
107 & 109.04 & 111.5266 & 109.072 & 113.9813 & 0.0235 & 0.948 & 0.8606 & 0.9648 \tabularnewline
108 & 109.02 & 111.5158 & 108.931 & 114.1007 & 0.0292 & 0.9698 & 0.8764 & 0.9564 \tabularnewline
109 & 109.23 & 111.5103 & 108.8015 & 114.2191 & 0.0495 & 0.9642 & 0.9483 & 0.9483 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69690&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[97])[/C][/ROW]
[ROW][C]85[/C][C]105.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]106.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]104.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]107.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]108.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]108.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]109.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]110.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]109.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]110.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]110.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]109.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]109.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]109.11[/C][C]109.2354[/C][C]108.5771[/C][C]109.8936[/C][C]0.3545[/C][C]0.4708[/C][C]1[/C][C]0.4708[/C][/ROW]
[ROW][C]99[/C][C]107.06[/C][C]107.8142[/C][C]106.8367[/C][C]108.7918[/C][C]0.0652[/C][C]0.0047[/C][C]1[/C][C]0.0019[/C][/ROW]
[ROW][C]100[/C][C]109.53[/C][C]109.9922[/C][C]108.754[/C][C]111.2304[/C][C]0.2322[/C][C]1[/C][C]1[/C][C]0.8768[/C][/ROW]
[ROW][C]101[/C][C]108.92[/C][C]110.2785[/C][C]108.8144[/C][C]111.7427[/C][C]0.0345[/C][C]0.8418[/C][C]0.9969[/C][C]0.9136[/C][/ROW]
[ROW][C]102[/C][C]109.24[/C][C]110.6173[/C][C]108.9519[/C][C]112.2828[/C][C]0.0525[/C][C]0.9771[/C][C]0.9946[/C][C]0.9449[/C][/ROW]
[ROW][C]103[/C][C]109.12[/C][C]110.9435[/C][C]109.0954[/C][C]112.7915[/C][C]0.0266[/C][C]0.9646[/C][C]0.9503[/C][C]0.9629[/C][/ROW]
[ROW][C]104[/C][C]109[/C][C]111.2197[/C][C]109.2039[/C][C]113.2356[/C][C]0.0155[/C][C]0.9794[/C][C]0.8509[/C][C]0.9716[/C][/ROW]
[ROW][C]105[/C][C]107.23[/C][C]110.1565[/C][C]107.9849[/C][C]112.328[/C][C]0.0041[/C][C]0.8517[/C][C]0.8229[/C][C]0.7908[/C][/ROW]
[ROW][C]106[/C][C]109.49[/C][C]111.6485[/C][C]109.3313[/C][C]113.9658[/C][C]0.0339[/C][C]0.9999[/C][C]0.8765[/C][C]0.9783[/C][/ROW]
[ROW][C]107[/C][C]109.04[/C][C]111.5266[/C][C]109.072[/C][C]113.9813[/C][C]0.0235[/C][C]0.948[/C][C]0.8606[/C][C]0.9648[/C][/ROW]
[ROW][C]108[/C][C]109.02[/C][C]111.5158[/C][C]108.931[/C][C]114.1007[/C][C]0.0292[/C][C]0.9698[/C][C]0.8764[/C][C]0.9564[/C][/ROW]
[ROW][C]109[/C][C]109.23[/C][C]111.5103[/C][C]108.8015[/C][C]114.2191[/C][C]0.0495[/C][C]0.9642[/C][C]0.9483[/C][C]0.9483[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69690&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69690&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[97])
85105.85-------
86106.23-------
87104.86-------
88107.44-------
89108.23-------
90108.45-------
91109.39-------
92110.15-------
93109.13-------
94110.28-------
95110.17-------
96109.99-------
97109.26-------
98109.11109.2354108.5771109.89360.35450.470810.4708
99107.06107.8142106.8367108.79180.06520.004710.0019
100109.53109.9922108.754111.23040.2322110.8768
101108.92110.2785108.8144111.74270.03450.84180.99690.9136
102109.24110.6173108.9519112.28280.05250.97710.99460.9449
103109.12110.9435109.0954112.79150.02660.96460.95030.9629
104109111.2197109.2039113.23560.01550.97940.85090.9716
105107.23110.1565107.9849112.3280.00410.85170.82290.7908
106109.49111.6485109.3313113.96580.03390.99990.87650.9783
107109.04111.5266109.072113.98130.02350.9480.86060.9648
108109.02111.5158108.931114.10070.02920.96980.87640.9564
109109.23111.5103108.8015114.21910.04950.96420.94830.9483







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
980.0031-0.00111e-040.01570.00130.0362
990.0046-0.0076e-040.56890.04740.2177
1000.0057-0.00424e-040.21360.01780.1334
1010.0068-0.01230.0011.84570.15380.3922
1020.0077-0.01250.0011.89710.15810.3976
1030.0085-0.01640.00143.3250.27710.5264
1040.0092-0.020.00174.92720.41060.6408
1050.0101-0.02660.00228.56420.71370.8448
1060.0106-0.01930.00164.65930.38830.6231
1070.0112-0.02230.00196.18320.51530.7178
1080.0118-0.02240.00196.22920.51910.7205
1090.0124-0.02040.00175.19990.43330.6583

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
98 & 0.0031 & -0.0011 & 1e-04 & 0.0157 & 0.0013 & 0.0362 \tabularnewline
99 & 0.0046 & -0.007 & 6e-04 & 0.5689 & 0.0474 & 0.2177 \tabularnewline
100 & 0.0057 & -0.0042 & 4e-04 & 0.2136 & 0.0178 & 0.1334 \tabularnewline
101 & 0.0068 & -0.0123 & 0.001 & 1.8457 & 0.1538 & 0.3922 \tabularnewline
102 & 0.0077 & -0.0125 & 0.001 & 1.8971 & 0.1581 & 0.3976 \tabularnewline
103 & 0.0085 & -0.0164 & 0.0014 & 3.325 & 0.2771 & 0.5264 \tabularnewline
104 & 0.0092 & -0.02 & 0.0017 & 4.9272 & 0.4106 & 0.6408 \tabularnewline
105 & 0.0101 & -0.0266 & 0.0022 & 8.5642 & 0.7137 & 0.8448 \tabularnewline
106 & 0.0106 & -0.0193 & 0.0016 & 4.6593 & 0.3883 & 0.6231 \tabularnewline
107 & 0.0112 & -0.0223 & 0.0019 & 6.1832 & 0.5153 & 0.7178 \tabularnewline
108 & 0.0118 & -0.0224 & 0.0019 & 6.2292 & 0.5191 & 0.7205 \tabularnewline
109 & 0.0124 & -0.0204 & 0.0017 & 5.1999 & 0.4333 & 0.6583 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69690&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]98[/C][C]0.0031[/C][C]-0.0011[/C][C]1e-04[/C][C]0.0157[/C][C]0.0013[/C][C]0.0362[/C][/ROW]
[ROW][C]99[/C][C]0.0046[/C][C]-0.007[/C][C]6e-04[/C][C]0.5689[/C][C]0.0474[/C][C]0.2177[/C][/ROW]
[ROW][C]100[/C][C]0.0057[/C][C]-0.0042[/C][C]4e-04[/C][C]0.2136[/C][C]0.0178[/C][C]0.1334[/C][/ROW]
[ROW][C]101[/C][C]0.0068[/C][C]-0.0123[/C][C]0.001[/C][C]1.8457[/C][C]0.1538[/C][C]0.3922[/C][/ROW]
[ROW][C]102[/C][C]0.0077[/C][C]-0.0125[/C][C]0.001[/C][C]1.8971[/C][C]0.1581[/C][C]0.3976[/C][/ROW]
[ROW][C]103[/C][C]0.0085[/C][C]-0.0164[/C][C]0.0014[/C][C]3.325[/C][C]0.2771[/C][C]0.5264[/C][/ROW]
[ROW][C]104[/C][C]0.0092[/C][C]-0.02[/C][C]0.0017[/C][C]4.9272[/C][C]0.4106[/C][C]0.6408[/C][/ROW]
[ROW][C]105[/C][C]0.0101[/C][C]-0.0266[/C][C]0.0022[/C][C]8.5642[/C][C]0.7137[/C][C]0.8448[/C][/ROW]
[ROW][C]106[/C][C]0.0106[/C][C]-0.0193[/C][C]0.0016[/C][C]4.6593[/C][C]0.3883[/C][C]0.6231[/C][/ROW]
[ROW][C]107[/C][C]0.0112[/C][C]-0.0223[/C][C]0.0019[/C][C]6.1832[/C][C]0.5153[/C][C]0.7178[/C][/ROW]
[ROW][C]108[/C][C]0.0118[/C][C]-0.0224[/C][C]0.0019[/C][C]6.2292[/C][C]0.5191[/C][C]0.7205[/C][/ROW]
[ROW][C]109[/C][C]0.0124[/C][C]-0.0204[/C][C]0.0017[/C][C]5.1999[/C][C]0.4333[/C][C]0.6583[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69690&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69690&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
980.0031-0.00111e-040.01570.00130.0362
990.0046-0.0076e-040.56890.04740.2177
1000.0057-0.00424e-040.21360.01780.1334
1010.0068-0.01230.0011.84570.15380.3922
1020.0077-0.01250.0011.89710.15810.3976
1030.0085-0.01640.00143.3250.27710.5264
1040.0092-0.020.00174.92720.41060.6408
1050.0101-0.02660.00228.56420.71370.8448
1060.0106-0.01930.00164.65930.38830.6231
1070.0112-0.02230.00196.18320.51530.7178
1080.0118-0.02240.00196.22920.51910.7205
1090.0124-0.02040.00175.19990.43330.6583



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