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 computationSun, 21 Dec 2008 05:14:19 -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/21/t1229861896otn6dy3iokdur74.htm/, Retrieved Sun, 19 May 2024 09:41:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35527, Retrieved Sun, 19 May 2024 09:41:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact140
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-21 12:14:19] [00a0a665d7a07edd2e460056b0c0c354] [Current]
Feedback Forum

Post a new message
Dataseries X:
1995
1947
1766
1635
1833
1910
1960
1970
2061
2093
2121
2175
2197
2350
2440
2409
2473
2408
2455
2448
2498
2646
2757
2849
2921
2982
3081
3106
3119
3061
3097
3162
3257
3277
3295
3364
3494
3667
3813
3918
3896
3801
3570
3702
3862
3970
4139
4200
4291
4444
4503
4357
4591
4697
4621
4563
4203
4296
4435
4105
4117




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35527&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[49])
373494-------
383667-------
393813-------
403918-------
413896-------
423801-------
433570-------
443702-------
453862-------
463970-------
474139-------
484200-------
494291-------
5044444335.55294165.18294505.92290.10610.695910.6959
5145034355.7794048.02974663.52820.17420.28710.99970.66
5243574364.96123938.45484791.46760.48540.26290.980.633
5345914369.12973840.09554898.16390.20550.51790.96020.6139
5446974371.02223752.19784989.84650.15090.2430.96450.6
5546214371.88133673.0495070.71350.24240.18090.98770.5897
5645634372.27133600.99445143.54820.31390.26370.95570.5818
5742034372.44843534.67685210.21990.34590.32790.88380.5756
5842964372.52873473.04135272.01620.43380.64410.80980.5705
5944354372.56523415.27965329.85090.44910.56230.68380.5663
6041054372.58183360.77155384.39210.30210.45190.63090.5628
6141174372.58933309.03625436.14240.31880.6890.55980.5598

\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 & 3494 & - & - & - & - & - & - & - \tabularnewline
38 & 3667 & - & - & - & - & - & - & - \tabularnewline
39 & 3813 & - & - & - & - & - & - & - \tabularnewline
40 & 3918 & - & - & - & - & - & - & - \tabularnewline
41 & 3896 & - & - & - & - & - & - & - \tabularnewline
42 & 3801 & - & - & - & - & - & - & - \tabularnewline
43 & 3570 & - & - & - & - & - & - & - \tabularnewline
44 & 3702 & - & - & - & - & - & - & - \tabularnewline
45 & 3862 & - & - & - & - & - & - & - \tabularnewline
46 & 3970 & - & - & - & - & - & - & - \tabularnewline
47 & 4139 & - & - & - & - & - & - & - \tabularnewline
48 & 4200 & - & - & - & - & - & - & - \tabularnewline
49 & 4291 & - & - & - & - & - & - & - \tabularnewline
50 & 4444 & 4335.5529 & 4165.1829 & 4505.9229 & 0.1061 & 0.6959 & 1 & 0.6959 \tabularnewline
51 & 4503 & 4355.779 & 4048.0297 & 4663.5282 & 0.1742 & 0.2871 & 0.9997 & 0.66 \tabularnewline
52 & 4357 & 4364.9612 & 3938.4548 & 4791.4676 & 0.4854 & 0.2629 & 0.98 & 0.633 \tabularnewline
53 & 4591 & 4369.1297 & 3840.0955 & 4898.1639 & 0.2055 & 0.5179 & 0.9602 & 0.6139 \tabularnewline
54 & 4697 & 4371.0222 & 3752.1978 & 4989.8465 & 0.1509 & 0.243 & 0.9645 & 0.6 \tabularnewline
55 & 4621 & 4371.8813 & 3673.049 & 5070.7135 & 0.2424 & 0.1809 & 0.9877 & 0.5897 \tabularnewline
56 & 4563 & 4372.2713 & 3600.9944 & 5143.5482 & 0.3139 & 0.2637 & 0.9557 & 0.5818 \tabularnewline
57 & 4203 & 4372.4484 & 3534.6768 & 5210.2199 & 0.3459 & 0.3279 & 0.8838 & 0.5756 \tabularnewline
58 & 4296 & 4372.5287 & 3473.0413 & 5272.0162 & 0.4338 & 0.6441 & 0.8098 & 0.5705 \tabularnewline
59 & 4435 & 4372.5652 & 3415.2796 & 5329.8509 & 0.4491 & 0.5623 & 0.6838 & 0.5663 \tabularnewline
60 & 4105 & 4372.5818 & 3360.7715 & 5384.3921 & 0.3021 & 0.4519 & 0.6309 & 0.5628 \tabularnewline
61 & 4117 & 4372.5893 & 3309.0362 & 5436.1424 & 0.3188 & 0.689 & 0.5598 & 0.5598 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35527&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]3494[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]3667[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]3813[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]3918[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]3896[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]3801[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]3570[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]3702[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]3862[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]3970[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]4139[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]4200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]4291[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]4444[/C][C]4335.5529[/C][C]4165.1829[/C][C]4505.9229[/C][C]0.1061[/C][C]0.6959[/C][C]1[/C][C]0.6959[/C][/ROW]
[ROW][C]51[/C][C]4503[/C][C]4355.779[/C][C]4048.0297[/C][C]4663.5282[/C][C]0.1742[/C][C]0.2871[/C][C]0.9997[/C][C]0.66[/C][/ROW]
[ROW][C]52[/C][C]4357[/C][C]4364.9612[/C][C]3938.4548[/C][C]4791.4676[/C][C]0.4854[/C][C]0.2629[/C][C]0.98[/C][C]0.633[/C][/ROW]
[ROW][C]53[/C][C]4591[/C][C]4369.1297[/C][C]3840.0955[/C][C]4898.1639[/C][C]0.2055[/C][C]0.5179[/C][C]0.9602[/C][C]0.6139[/C][/ROW]
[ROW][C]54[/C][C]4697[/C][C]4371.0222[/C][C]3752.1978[/C][C]4989.8465[/C][C]0.1509[/C][C]0.243[/C][C]0.9645[/C][C]0.6[/C][/ROW]
[ROW][C]55[/C][C]4621[/C][C]4371.8813[/C][C]3673.049[/C][C]5070.7135[/C][C]0.2424[/C][C]0.1809[/C][C]0.9877[/C][C]0.5897[/C][/ROW]
[ROW][C]56[/C][C]4563[/C][C]4372.2713[/C][C]3600.9944[/C][C]5143.5482[/C][C]0.3139[/C][C]0.2637[/C][C]0.9557[/C][C]0.5818[/C][/ROW]
[ROW][C]57[/C][C]4203[/C][C]4372.4484[/C][C]3534.6768[/C][C]5210.2199[/C][C]0.3459[/C][C]0.3279[/C][C]0.8838[/C][C]0.5756[/C][/ROW]
[ROW][C]58[/C][C]4296[/C][C]4372.5287[/C][C]3473.0413[/C][C]5272.0162[/C][C]0.4338[/C][C]0.6441[/C][C]0.8098[/C][C]0.5705[/C][/ROW]
[ROW][C]59[/C][C]4435[/C][C]4372.5652[/C][C]3415.2796[/C][C]5329.8509[/C][C]0.4491[/C][C]0.5623[/C][C]0.6838[/C][C]0.5663[/C][/ROW]
[ROW][C]60[/C][C]4105[/C][C]4372.5818[/C][C]3360.7715[/C][C]5384.3921[/C][C]0.3021[/C][C]0.4519[/C][C]0.6309[/C][C]0.5628[/C][/ROW]
[ROW][C]61[/C][C]4117[/C][C]4372.5893[/C][C]3309.0362[/C][C]5436.1424[/C][C]0.3188[/C][C]0.689[/C][C]0.5598[/C][C]0.5598[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35527&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35527&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])
373494-------
383667-------
393813-------
403918-------
413896-------
423801-------
433570-------
443702-------
453862-------
463970-------
474139-------
484200-------
494291-------
5044444335.55294165.18294505.92290.10610.695910.6959
5145034355.7794048.02974663.52820.17420.28710.99970.66
5243574364.96123938.45484791.46760.48540.26290.980.633
5345914369.12973840.09554898.16390.20550.51790.96020.6139
5446974371.02223752.19784989.84650.15090.2430.96450.6
5546214371.88133673.0495070.71350.24240.18090.98770.5897
5645634372.27133600.99445143.54820.31390.26370.95570.5818
5742034372.44843534.67685210.21990.34590.32790.88380.5756
5842964372.52873473.04135272.01620.43380.64410.80980.5705
5944354372.56523415.27965329.85090.44910.56230.68380.5663
6041054372.58183360.77155384.39210.30210.45190.63090.5628
6141174372.58933309.03625436.14240.31880.6890.55980.5598







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.020.0250.002111760.7725980.064431.306
510.0360.03380.002821674.02731806.168942.499
520.0499-0.00182e-0463.38075.28172.2982
530.06180.05080.004249226.41634102.201464.0484
540.07220.07460.0062106261.55458855.129594.1017
550.08160.0570.004762060.13775171.678171.9144
560.090.04360.003636377.43673031.453155.0586
570.0978-0.03880.003228712.74772392.72948.9155
580.105-0.01750.00155856.6489488.054122.0919
590.11170.01430.00123898.0996324.841618.0234
600.1181-0.06120.005171600.02195966.668577.2442
610.1241-0.05850.004965325.90315443.825373.7823

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.02 & 0.025 & 0.0021 & 11760.7725 & 980.0644 & 31.306 \tabularnewline
51 & 0.036 & 0.0338 & 0.0028 & 21674.0273 & 1806.1689 & 42.499 \tabularnewline
52 & 0.0499 & -0.0018 & 2e-04 & 63.3807 & 5.2817 & 2.2982 \tabularnewline
53 & 0.0618 & 0.0508 & 0.0042 & 49226.4163 & 4102.2014 & 64.0484 \tabularnewline
54 & 0.0722 & 0.0746 & 0.0062 & 106261.5545 & 8855.1295 & 94.1017 \tabularnewline
55 & 0.0816 & 0.057 & 0.0047 & 62060.1377 & 5171.6781 & 71.9144 \tabularnewline
56 & 0.09 & 0.0436 & 0.0036 & 36377.4367 & 3031.4531 & 55.0586 \tabularnewline
57 & 0.0978 & -0.0388 & 0.0032 & 28712.7477 & 2392.729 & 48.9155 \tabularnewline
58 & 0.105 & -0.0175 & 0.0015 & 5856.6489 & 488.0541 & 22.0919 \tabularnewline
59 & 0.1117 & 0.0143 & 0.0012 & 3898.0996 & 324.8416 & 18.0234 \tabularnewline
60 & 0.1181 & -0.0612 & 0.0051 & 71600.0219 & 5966.6685 & 77.2442 \tabularnewline
61 & 0.1241 & -0.0585 & 0.0049 & 65325.9031 & 5443.8253 & 73.7823 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35527&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.025[/C][C]0.0021[/C][C]11760.7725[/C][C]980.0644[/C][C]31.306[/C][/ROW]
[ROW][C]51[/C][C]0.036[/C][C]0.0338[/C][C]0.0028[/C][C]21674.0273[/C][C]1806.1689[/C][C]42.499[/C][/ROW]
[ROW][C]52[/C][C]0.0499[/C][C]-0.0018[/C][C]2e-04[/C][C]63.3807[/C][C]5.2817[/C][C]2.2982[/C][/ROW]
[ROW][C]53[/C][C]0.0618[/C][C]0.0508[/C][C]0.0042[/C][C]49226.4163[/C][C]4102.2014[/C][C]64.0484[/C][/ROW]
[ROW][C]54[/C][C]0.0722[/C][C]0.0746[/C][C]0.0062[/C][C]106261.5545[/C][C]8855.1295[/C][C]94.1017[/C][/ROW]
[ROW][C]55[/C][C]0.0816[/C][C]0.057[/C][C]0.0047[/C][C]62060.1377[/C][C]5171.6781[/C][C]71.9144[/C][/ROW]
[ROW][C]56[/C][C]0.09[/C][C]0.0436[/C][C]0.0036[/C][C]36377.4367[/C][C]3031.4531[/C][C]55.0586[/C][/ROW]
[ROW][C]57[/C][C]0.0978[/C][C]-0.0388[/C][C]0.0032[/C][C]28712.7477[/C][C]2392.729[/C][C]48.9155[/C][/ROW]
[ROW][C]58[/C][C]0.105[/C][C]-0.0175[/C][C]0.0015[/C][C]5856.6489[/C][C]488.0541[/C][C]22.0919[/C][/ROW]
[ROW][C]59[/C][C]0.1117[/C][C]0.0143[/C][C]0.0012[/C][C]3898.0996[/C][C]324.8416[/C][C]18.0234[/C][/ROW]
[ROW][C]60[/C][C]0.1181[/C][C]-0.0612[/C][C]0.0051[/C][C]71600.0219[/C][C]5966.6685[/C][C]77.2442[/C][/ROW]
[ROW][C]61[/C][C]0.1241[/C][C]-0.0585[/C][C]0.0049[/C][C]65325.9031[/C][C]5443.8253[/C][C]73.7823[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35527&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35527&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.020.0250.002111760.7725980.064431.306
510.0360.03380.002821674.02731806.168942.499
520.0499-0.00182e-0463.38075.28172.2982
530.06180.05080.004249226.41634102.201464.0484
540.07220.07460.0062106261.55458855.129594.1017
550.08160.0570.004762060.13775171.678171.9144
560.090.04360.003636377.43673031.453155.0586
570.0978-0.03880.003228712.74772392.72948.9155
580.105-0.01750.00155856.6489488.054122.0919
590.11170.01430.00123898.0996324.841618.0234
600.1181-0.06120.005171600.02195966.668577.2442
610.1241-0.05850.004965325.90315443.825373.7823



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