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 computationWed, 21 Dec 2011 17:18:32 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/21/t1324505932twoctpos5jckdeg.htm/, Retrieved Tue, 23 Apr 2024 12:47:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159097, Retrieved Tue, 23 Apr 2024 12:47:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact99
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [HPC Retail Sales] [2008-03-02 15:42:48] [74be16979710d4c4e7c6647856088456]
- RMPD  [Univariate Data Series] [] [2011-11-25 14:57:13] [493236dcc414c5f9e1823f06b33a5ad6]
- RMPD    [ARIMA Forecasting] [] [2011-12-05 16:13:27] [493236dcc414c5f9e1823f06b33a5ad6]
- R           [ARIMA Forecasting] [] [2011-12-21 22:18:32] [75a32e1bc492240bc1028714aca23077] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.0622
1.0773
1.0807
1.0848
1.1582
1.1663
1.1372
1.1139
1.1222
1.1692
1.1702
1.2286
1.2613
1.2646
1.2262
1.1985
1.2007
1.2138
1.2266
1.2176
1.2218
1.249
1.2991
1.3408
1.3119
1.3014
1.3201
1.2938
1.2694
1.2165
1.2037
1.2292
1.2256
1.2015
1.1786
1.1856
1.2103
1.1938
1.202
1.2271
1.277
1.265
1.2684
1.2811
1.2727
1.2611
1.2881
1.3213
1.2999
1.3074
1.3242
1.3516
1.3511
1.3419
1.3716
1.3622
1.3896
1.4227
1.4684
1.457




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'AstonUniversity' @ aston.wessa.net

\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 & 2 seconds \tabularnewline
R Server & 'AstonUniversity' @ aston.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159097&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'AstonUniversity' @ aston.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159097&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159097&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 time2 seconds
R Server'AstonUniversity' @ aston.wessa.net







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[48])
361.1856-------
371.2103-------
381.1938-------
391.202-------
401.2271-------
411.277-------
421.265-------
431.2684-------
441.2811-------
451.2727-------
461.2611-------
471.2881-------
481.3213-------
491.29991.32981.27971.37990.12070.630910.6309
501.30741.32981.24351.41620.30530.75160.9990.5768
511.32421.32981.21841.44120.46050.65350.98770.5597
521.35161.32981.19811.46160.37310.53340.93680.5505
531.35111.32981.18051.47920.39010.38760.7560.5446
541.34191.32981.16471.4950.44310.40040.77930.5404
551.37161.32981.15041.50930.32420.44760.74890.5372
561.36221.32981.13711.52260.37110.33560.68990.5346
571.38961.32981.12461.53510.28410.37860.70740.5325
581.42271.32981.11291.54680.20080.29460.73270.5308
591.46841.32981.10181.55790.11690.21240.64010.5293
601.4571.32981.09121.56850.14820.12760.5280.528

\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[48]) \tabularnewline
36 & 1.1856 & - & - & - & - & - & - & - \tabularnewline
37 & 1.2103 & - & - & - & - & - & - & - \tabularnewline
38 & 1.1938 & - & - & - & - & - & - & - \tabularnewline
39 & 1.202 & - & - & - & - & - & - & - \tabularnewline
40 & 1.2271 & - & - & - & - & - & - & - \tabularnewline
41 & 1.277 & - & - & - & - & - & - & - \tabularnewline
42 & 1.265 & - & - & - & - & - & - & - \tabularnewline
43 & 1.2684 & - & - & - & - & - & - & - \tabularnewline
44 & 1.2811 & - & - & - & - & - & - & - \tabularnewline
45 & 1.2727 & - & - & - & - & - & - & - \tabularnewline
46 & 1.2611 & - & - & - & - & - & - & - \tabularnewline
47 & 1.2881 & - & - & - & - & - & - & - \tabularnewline
48 & 1.3213 & - & - & - & - & - & - & - \tabularnewline
49 & 1.2999 & 1.3298 & 1.2797 & 1.3799 & 0.1207 & 0.6309 & 1 & 0.6309 \tabularnewline
50 & 1.3074 & 1.3298 & 1.2435 & 1.4162 & 0.3053 & 0.7516 & 0.999 & 0.5768 \tabularnewline
51 & 1.3242 & 1.3298 & 1.2184 & 1.4412 & 0.4605 & 0.6535 & 0.9877 & 0.5597 \tabularnewline
52 & 1.3516 & 1.3298 & 1.1981 & 1.4616 & 0.3731 & 0.5334 & 0.9368 & 0.5505 \tabularnewline
53 & 1.3511 & 1.3298 & 1.1805 & 1.4792 & 0.3901 & 0.3876 & 0.756 & 0.5446 \tabularnewline
54 & 1.3419 & 1.3298 & 1.1647 & 1.495 & 0.4431 & 0.4004 & 0.7793 & 0.5404 \tabularnewline
55 & 1.3716 & 1.3298 & 1.1504 & 1.5093 & 0.3242 & 0.4476 & 0.7489 & 0.5372 \tabularnewline
56 & 1.3622 & 1.3298 & 1.1371 & 1.5226 & 0.3711 & 0.3356 & 0.6899 & 0.5346 \tabularnewline
57 & 1.3896 & 1.3298 & 1.1246 & 1.5351 & 0.2841 & 0.3786 & 0.7074 & 0.5325 \tabularnewline
58 & 1.4227 & 1.3298 & 1.1129 & 1.5468 & 0.2008 & 0.2946 & 0.7327 & 0.5308 \tabularnewline
59 & 1.4684 & 1.3298 & 1.1018 & 1.5579 & 0.1169 & 0.2124 & 0.6401 & 0.5293 \tabularnewline
60 & 1.457 & 1.3298 & 1.0912 & 1.5685 & 0.1482 & 0.1276 & 0.528 & 0.528 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159097&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[48])[/C][/ROW]
[ROW][C]36[/C][C]1.1856[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1.2103[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.1938[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.202[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.2271[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.277[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.265[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1.2684[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.2811[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.2727[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.2611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.2881[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.3213[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.2999[/C][C]1.3298[/C][C]1.2797[/C][C]1.3799[/C][C]0.1207[/C][C]0.6309[/C][C]1[/C][C]0.6309[/C][/ROW]
[ROW][C]50[/C][C]1.3074[/C][C]1.3298[/C][C]1.2435[/C][C]1.4162[/C][C]0.3053[/C][C]0.7516[/C][C]0.999[/C][C]0.5768[/C][/ROW]
[ROW][C]51[/C][C]1.3242[/C][C]1.3298[/C][C]1.2184[/C][C]1.4412[/C][C]0.4605[/C][C]0.6535[/C][C]0.9877[/C][C]0.5597[/C][/ROW]
[ROW][C]52[/C][C]1.3516[/C][C]1.3298[/C][C]1.1981[/C][C]1.4616[/C][C]0.3731[/C][C]0.5334[/C][C]0.9368[/C][C]0.5505[/C][/ROW]
[ROW][C]53[/C][C]1.3511[/C][C]1.3298[/C][C]1.1805[/C][C]1.4792[/C][C]0.3901[/C][C]0.3876[/C][C]0.756[/C][C]0.5446[/C][/ROW]
[ROW][C]54[/C][C]1.3419[/C][C]1.3298[/C][C]1.1647[/C][C]1.495[/C][C]0.4431[/C][C]0.4004[/C][C]0.7793[/C][C]0.5404[/C][/ROW]
[ROW][C]55[/C][C]1.3716[/C][C]1.3298[/C][C]1.1504[/C][C]1.5093[/C][C]0.3242[/C][C]0.4476[/C][C]0.7489[/C][C]0.5372[/C][/ROW]
[ROW][C]56[/C][C]1.3622[/C][C]1.3298[/C][C]1.1371[/C][C]1.5226[/C][C]0.3711[/C][C]0.3356[/C][C]0.6899[/C][C]0.5346[/C][/ROW]
[ROW][C]57[/C][C]1.3896[/C][C]1.3298[/C][C]1.1246[/C][C]1.5351[/C][C]0.2841[/C][C]0.3786[/C][C]0.7074[/C][C]0.5325[/C][/ROW]
[ROW][C]58[/C][C]1.4227[/C][C]1.3298[/C][C]1.1129[/C][C]1.5468[/C][C]0.2008[/C][C]0.2946[/C][C]0.7327[/C][C]0.5308[/C][/ROW]
[ROW][C]59[/C][C]1.4684[/C][C]1.3298[/C][C]1.1018[/C][C]1.5579[/C][C]0.1169[/C][C]0.2124[/C][C]0.6401[/C][C]0.5293[/C][/ROW]
[ROW][C]60[/C][C]1.457[/C][C]1.3298[/C][C]1.0912[/C][C]1.5685[/C][C]0.1482[/C][C]0.1276[/C][C]0.528[/C][C]0.528[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159097&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159097&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[48])
361.1856-------
371.2103-------
381.1938-------
391.202-------
401.2271-------
411.277-------
421.265-------
431.2684-------
441.2811-------
451.2727-------
461.2611-------
471.2881-------
481.3213-------
491.29991.32981.27971.37990.12070.630910.6309
501.30741.32981.24351.41620.30530.75160.9990.5768
511.32421.32981.21841.44120.46050.65350.98770.5597
521.35161.32981.19811.46160.37310.53340.93680.5505
531.35111.32981.18051.47920.39010.38760.7560.5446
541.34191.32981.16471.4950.44310.40040.77930.5404
551.37161.32981.15041.50930.32420.44760.74890.5372
561.36221.32981.13711.52260.37110.33560.68990.5346
571.38961.32981.12461.53510.28410.37860.70740.5325
581.42271.32981.11291.54680.20080.29460.73270.5308
591.46841.32981.10181.55790.11690.21240.64010.5293
601.4571.32981.09121.56850.14820.12760.5280.528







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0192-0.022509e-0400
500.0331-0.01690.01975e-047e-040.0265
510.0427-0.00420.014505e-040.0218
520.05060.01640.0155e-045e-040.0218
530.05730.0160.01525e-045e-040.0217
540.06330.00910.01421e-044e-040.0204
550.06890.03140.01660.00176e-040.0246
560.0740.02430.01760.0017e-040.0257
570.07870.04490.02060.00360.0010.0314
580.08320.06980.02560.00860.00170.0418
590.08750.10420.03270.01920.00330.0578
600.09160.09560.03790.01620.00440.0664

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0192 & -0.0225 & 0 & 9e-04 & 0 & 0 \tabularnewline
50 & 0.0331 & -0.0169 & 0.0197 & 5e-04 & 7e-04 & 0.0265 \tabularnewline
51 & 0.0427 & -0.0042 & 0.0145 & 0 & 5e-04 & 0.0218 \tabularnewline
52 & 0.0506 & 0.0164 & 0.015 & 5e-04 & 5e-04 & 0.0218 \tabularnewline
53 & 0.0573 & 0.016 & 0.0152 & 5e-04 & 5e-04 & 0.0217 \tabularnewline
54 & 0.0633 & 0.0091 & 0.0142 & 1e-04 & 4e-04 & 0.0204 \tabularnewline
55 & 0.0689 & 0.0314 & 0.0166 & 0.0017 & 6e-04 & 0.0246 \tabularnewline
56 & 0.074 & 0.0243 & 0.0176 & 0.001 & 7e-04 & 0.0257 \tabularnewline
57 & 0.0787 & 0.0449 & 0.0206 & 0.0036 & 0.001 & 0.0314 \tabularnewline
58 & 0.0832 & 0.0698 & 0.0256 & 0.0086 & 0.0017 & 0.0418 \tabularnewline
59 & 0.0875 & 0.1042 & 0.0327 & 0.0192 & 0.0033 & 0.0578 \tabularnewline
60 & 0.0916 & 0.0956 & 0.0379 & 0.0162 & 0.0044 & 0.0664 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159097&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]49[/C][C]0.0192[/C][C]-0.0225[/C][C]0[/C][C]9e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0331[/C][C]-0.0169[/C][C]0.0197[/C][C]5e-04[/C][C]7e-04[/C][C]0.0265[/C][/ROW]
[ROW][C]51[/C][C]0.0427[/C][C]-0.0042[/C][C]0.0145[/C][C]0[/C][C]5e-04[/C][C]0.0218[/C][/ROW]
[ROW][C]52[/C][C]0.0506[/C][C]0.0164[/C][C]0.015[/C][C]5e-04[/C][C]5e-04[/C][C]0.0218[/C][/ROW]
[ROW][C]53[/C][C]0.0573[/C][C]0.016[/C][C]0.0152[/C][C]5e-04[/C][C]5e-04[/C][C]0.0217[/C][/ROW]
[ROW][C]54[/C][C]0.0633[/C][C]0.0091[/C][C]0.0142[/C][C]1e-04[/C][C]4e-04[/C][C]0.0204[/C][/ROW]
[ROW][C]55[/C][C]0.0689[/C][C]0.0314[/C][C]0.0166[/C][C]0.0017[/C][C]6e-04[/C][C]0.0246[/C][/ROW]
[ROW][C]56[/C][C]0.074[/C][C]0.0243[/C][C]0.0176[/C][C]0.001[/C][C]7e-04[/C][C]0.0257[/C][/ROW]
[ROW][C]57[/C][C]0.0787[/C][C]0.0449[/C][C]0.0206[/C][C]0.0036[/C][C]0.001[/C][C]0.0314[/C][/ROW]
[ROW][C]58[/C][C]0.0832[/C][C]0.0698[/C][C]0.0256[/C][C]0.0086[/C][C]0.0017[/C][C]0.0418[/C][/ROW]
[ROW][C]59[/C][C]0.0875[/C][C]0.1042[/C][C]0.0327[/C][C]0.0192[/C][C]0.0033[/C][C]0.0578[/C][/ROW]
[ROW][C]60[/C][C]0.0916[/C][C]0.0956[/C][C]0.0379[/C][C]0.0162[/C][C]0.0044[/C][C]0.0664[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159097&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159097&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
490.0192-0.022509e-0400
500.0331-0.01690.01975e-047e-040.0265
510.0427-0.00420.014505e-040.0218
520.05060.01640.0155e-045e-040.0218
530.05730.0160.01525e-045e-040.0217
540.06330.00910.01421e-044e-040.0204
550.06890.03140.01660.00176e-040.0246
560.0740.02430.01760.0017e-040.0257
570.07870.04490.02060.00360.0010.0314
580.08320.06980.02560.00860.00170.0418
590.08750.10420.03270.01920.00330.0578
600.09160.09560.03790.01620.00440.0664



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