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 14:12:18 -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/t1229635131my4xjqj6zf017l0.htm/, Retrieved Sat, 11 May 2024 20:05:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34954, Retrieved Sat, 11 May 2024 20:05:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact239
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Forecasting] [paper arima forec...] [2008-12-14 19:17:18] [85134b6edb9973b9193450dd2306c65b]
-   P     [ARIMA Forecasting] [Hercomputatie fee...] [2008-12-18 21:12:18] [5e9e099b83e50415d7642e10d74756e4] [Current]
Feedback Forum

Post a new message
Dataseries X:
111078
150739
159129
157928
147768
137507
136919
136151
133001
125554
119647
114158
116193
152803
161761
160942
149470
139208
134588
130322
126611
122401
117352
112135
112879
148729
157230
157221
146681
136524
132111
125326
122716
116615
113719
110737
112093
143565
149946
149147
134339
122683
115614
116566
111272
104609
101802
94542
93051
124129
130374
123946
114971
105531
104919
104782
101281
94545
93248
84031
87486




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34954&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34954&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34954&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[49])
37112093-------
38143565-------
39149946-------
40149147-------
41134339-------
42122683-------
43115614-------
44116566-------
45111272-------
46104609-------
47101802-------
4894542-------
4993051-------
50124129124523119651.7993129394.20070.437101
51130374130904124015.0819137792.91810.44010.97301
52123946130105121667.8329138542.16710.07620.475101
53114971115297105554.5986125039.40140.47390.04091e-041
5410553110364192748.6641114533.33590.36690.02073e-040.9716
551049199657284640.0439108503.95610.08520.07069e-040.7185
561047829752484636.0144110411.98560.13480.13040.00190.7518
571012819223078452.1639106007.83610.09890.03710.00340.4535
58945458556770953.398100180.6020.11430.01750.00530.1577
59932488276067355.910998164.08910.0910.06690.00770.0952
60840317550059344.055191655.94490.15030.01570.01040.0166
61874867400957134.665990883.33410.05870.12220.01350.0135

\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[49]) \tabularnewline
37 & 112093 & - & - & - & - & - & - & - \tabularnewline
38 & 143565 & - & - & - & - & - & - & - \tabularnewline
39 & 149946 & - & - & - & - & - & - & - \tabularnewline
40 & 149147 & - & - & - & - & - & - & - \tabularnewline
41 & 134339 & - & - & - & - & - & - & - \tabularnewline
42 & 122683 & - & - & - & - & - & - & - \tabularnewline
43 & 115614 & - & - & - & - & - & - & - \tabularnewline
44 & 116566 & - & - & - & - & - & - & - \tabularnewline
45 & 111272 & - & - & - & - & - & - & - \tabularnewline
46 & 104609 & - & - & - & - & - & - & - \tabularnewline
47 & 101802 & - & - & - & - & - & - & - \tabularnewline
48 & 94542 & - & - & - & - & - & - & - \tabularnewline
49 & 93051 & - & - & - & - & - & - & - \tabularnewline
50 & 124129 & 124523 & 119651.7993 & 129394.2007 & 0.437 & 1 & 0 & 1 \tabularnewline
51 & 130374 & 130904 & 124015.0819 & 137792.9181 & 0.4401 & 0.973 & 0 & 1 \tabularnewline
52 & 123946 & 130105 & 121667.8329 & 138542.1671 & 0.0762 & 0.4751 & 0 & 1 \tabularnewline
53 & 114971 & 115297 & 105554.5986 & 125039.4014 & 0.4739 & 0.0409 & 1e-04 & 1 \tabularnewline
54 & 105531 & 103641 & 92748.6641 & 114533.3359 & 0.3669 & 0.0207 & 3e-04 & 0.9716 \tabularnewline
55 & 104919 & 96572 & 84640.0439 & 108503.9561 & 0.0852 & 0.0706 & 9e-04 & 0.7185 \tabularnewline
56 & 104782 & 97524 & 84636.0144 & 110411.9856 & 0.1348 & 0.1304 & 0.0019 & 0.7518 \tabularnewline
57 & 101281 & 92230 & 78452.1639 & 106007.8361 & 0.0989 & 0.0371 & 0.0034 & 0.4535 \tabularnewline
58 & 94545 & 85567 & 70953.398 & 100180.602 & 0.1143 & 0.0175 & 0.0053 & 0.1577 \tabularnewline
59 & 93248 & 82760 & 67355.9109 & 98164.0891 & 0.091 & 0.0669 & 0.0077 & 0.0952 \tabularnewline
60 & 84031 & 75500 & 59344.0551 & 91655.9449 & 0.1503 & 0.0157 & 0.0104 & 0.0166 \tabularnewline
61 & 87486 & 74009 & 57134.6659 & 90883.3341 & 0.0587 & 0.1222 & 0.0135 & 0.0135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34954&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[49])[/C][/ROW]
[ROW][C]37[/C][C]112093[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]143565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]149946[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]149147[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]134339[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]122683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]115614[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]116566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]111272[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]104609[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]101802[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]94542[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]93051[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]124129[/C][C]124523[/C][C]119651.7993[/C][C]129394.2007[/C][C]0.437[/C][C]1[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]130374[/C][C]130904[/C][C]124015.0819[/C][C]137792.9181[/C][C]0.4401[/C][C]0.973[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]123946[/C][C]130105[/C][C]121667.8329[/C][C]138542.1671[/C][C]0.0762[/C][C]0.4751[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]114971[/C][C]115297[/C][C]105554.5986[/C][C]125039.4014[/C][C]0.4739[/C][C]0.0409[/C][C]1e-04[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]105531[/C][C]103641[/C][C]92748.6641[/C][C]114533.3359[/C][C]0.3669[/C][C]0.0207[/C][C]3e-04[/C][C]0.9716[/C][/ROW]
[ROW][C]55[/C][C]104919[/C][C]96572[/C][C]84640.0439[/C][C]108503.9561[/C][C]0.0852[/C][C]0.0706[/C][C]9e-04[/C][C]0.7185[/C][/ROW]
[ROW][C]56[/C][C]104782[/C][C]97524[/C][C]84636.0144[/C][C]110411.9856[/C][C]0.1348[/C][C]0.1304[/C][C]0.0019[/C][C]0.7518[/C][/ROW]
[ROW][C]57[/C][C]101281[/C][C]92230[/C][C]78452.1639[/C][C]106007.8361[/C][C]0.0989[/C][C]0.0371[/C][C]0.0034[/C][C]0.4535[/C][/ROW]
[ROW][C]58[/C][C]94545[/C][C]85567[/C][C]70953.398[/C][C]100180.602[/C][C]0.1143[/C][C]0.0175[/C][C]0.0053[/C][C]0.1577[/C][/ROW]
[ROW][C]59[/C][C]93248[/C][C]82760[/C][C]67355.9109[/C][C]98164.0891[/C][C]0.091[/C][C]0.0669[/C][C]0.0077[/C][C]0.0952[/C][/ROW]
[ROW][C]60[/C][C]84031[/C][C]75500[/C][C]59344.0551[/C][C]91655.9449[/C][C]0.1503[/C][C]0.0157[/C][C]0.0104[/C][C]0.0166[/C][/ROW]
[ROW][C]61[/C][C]87486[/C][C]74009[/C][C]57134.6659[/C][C]90883.3341[/C][C]0.0587[/C][C]0.1222[/C][C]0.0135[/C][C]0.0135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34954&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34954&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[49])
37112093-------
38143565-------
39149946-------
40149147-------
41134339-------
42122683-------
43115614-------
44116566-------
45111272-------
46104609-------
47101802-------
4894542-------
4993051-------
50124129124523119651.7993129394.20070.437101
51130374130904124015.0819137792.91810.44010.97301
52123946130105121667.8329138542.16710.07620.475101
53114971115297105554.5986125039.40140.47390.04091e-041
5410553110364192748.6641114533.33590.36690.02073e-040.9716
551049199657284640.0439108503.95610.08520.07069e-040.7185
561047829752484636.0144110411.98560.13480.13040.00190.7518
571012819223078452.1639106007.83610.09890.03710.00340.4535
58945458556770953.398100180.6020.11430.01750.00530.1577
59932488276067355.910998164.08910.0910.06690.00770.0952
60840317550059344.055191655.94490.15030.01570.01040.0166
61874867400957134.665990883.33410.05870.12220.01350.0135







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.02-0.00323e-0415523612936.3333113.738
510.0268-0.0043e-0428090023408.3333152.9978
520.0331-0.04730.0039379332813161106.751777.9502
530.0431-0.00282e-041062768856.333394.1081
540.05360.01820.00153572100297675545.596
550.0630.08640.0072696724095806034.08332409.5713
560.06740.07440.0062526785644389880.33332095.2041
570.07620.09810.0082819206016826716.752612.7986
580.08710.10490.0087806044846717040.33332591.7254
590.0950.12670.010610999814491665123027.6248
600.10920.1130.0094727779616064830.08332462.6876
610.11630.18210.015218162952915135794.08333890.4748

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.02 & -0.0032 & 3e-04 & 155236 & 12936.3333 & 113.738 \tabularnewline
51 & 0.0268 & -0.004 & 3e-04 & 280900 & 23408.3333 & 152.9978 \tabularnewline
52 & 0.0331 & -0.0473 & 0.0039 & 37933281 & 3161106.75 & 1777.9502 \tabularnewline
53 & 0.0431 & -0.0028 & 2e-04 & 106276 & 8856.3333 & 94.1081 \tabularnewline
54 & 0.0536 & 0.0182 & 0.0015 & 3572100 & 297675 & 545.596 \tabularnewline
55 & 0.063 & 0.0864 & 0.0072 & 69672409 & 5806034.0833 & 2409.5713 \tabularnewline
56 & 0.0674 & 0.0744 & 0.0062 & 52678564 & 4389880.3333 & 2095.2041 \tabularnewline
57 & 0.0762 & 0.0981 & 0.0082 & 81920601 & 6826716.75 & 2612.7986 \tabularnewline
58 & 0.0871 & 0.1049 & 0.0087 & 80604484 & 6717040.3333 & 2591.7254 \tabularnewline
59 & 0.095 & 0.1267 & 0.0106 & 109998144 & 9166512 & 3027.6248 \tabularnewline
60 & 0.1092 & 0.113 & 0.0094 & 72777961 & 6064830.0833 & 2462.6876 \tabularnewline
61 & 0.1163 & 0.1821 & 0.0152 & 181629529 & 15135794.0833 & 3890.4748 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34954&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]50[/C][C]0.02[/C][C]-0.0032[/C][C]3e-04[/C][C]155236[/C][C]12936.3333[/C][C]113.738[/C][/ROW]
[ROW][C]51[/C][C]0.0268[/C][C]-0.004[/C][C]3e-04[/C][C]280900[/C][C]23408.3333[/C][C]152.9978[/C][/ROW]
[ROW][C]52[/C][C]0.0331[/C][C]-0.0473[/C][C]0.0039[/C][C]37933281[/C][C]3161106.75[/C][C]1777.9502[/C][/ROW]
[ROW][C]53[/C][C]0.0431[/C][C]-0.0028[/C][C]2e-04[/C][C]106276[/C][C]8856.3333[/C][C]94.1081[/C][/ROW]
[ROW][C]54[/C][C]0.0536[/C][C]0.0182[/C][C]0.0015[/C][C]3572100[/C][C]297675[/C][C]545.596[/C][/ROW]
[ROW][C]55[/C][C]0.063[/C][C]0.0864[/C][C]0.0072[/C][C]69672409[/C][C]5806034.0833[/C][C]2409.5713[/C][/ROW]
[ROW][C]56[/C][C]0.0674[/C][C]0.0744[/C][C]0.0062[/C][C]52678564[/C][C]4389880.3333[/C][C]2095.2041[/C][/ROW]
[ROW][C]57[/C][C]0.0762[/C][C]0.0981[/C][C]0.0082[/C][C]81920601[/C][C]6826716.75[/C][C]2612.7986[/C][/ROW]
[ROW][C]58[/C][C]0.0871[/C][C]0.1049[/C][C]0.0087[/C][C]80604484[/C][C]6717040.3333[/C][C]2591.7254[/C][/ROW]
[ROW][C]59[/C][C]0.095[/C][C]0.1267[/C][C]0.0106[/C][C]109998144[/C][C]9166512[/C][C]3027.6248[/C][/ROW]
[ROW][C]60[/C][C]0.1092[/C][C]0.113[/C][C]0.0094[/C][C]72777961[/C][C]6064830.0833[/C][C]2462.6876[/C][/ROW]
[ROW][C]61[/C][C]0.1163[/C][C]0.1821[/C][C]0.0152[/C][C]181629529[/C][C]15135794.0833[/C][C]3890.4748[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34954&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34954&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
500.02-0.00323e-0415523612936.3333113.738
510.0268-0.0043e-0428090023408.3333152.9978
520.0331-0.04730.0039379332813161106.751777.9502
530.0431-0.00282e-041062768856.333394.1081
540.05360.01820.00153572100297675545.596
550.0630.08640.0072696724095806034.08332409.5713
560.06740.07440.0062526785644389880.33332095.2041
570.07620.09810.0082819206016826716.752612.7986
580.08710.10490.0087806044846717040.33332591.7254
590.0950.12670.010610999814491665123027.6248
600.10920.1130.0094727779616064830.08332462.6876
610.11630.18210.015218162952915135794.08333890.4748



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