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 computationMon, 22 Dec 2008 06:03:25 -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/22/t1229951152o59om47x64wp3s7.htm/, Retrieved Sun, 12 May 2024 15:32:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36037, Retrieved Sun, 12 May 2024 15:32:44 +0000
QR Codes:

Original text written by user:In samenwerking met stéphanie claes, kevin engels en katrien Bourdiaudhy
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact205
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [blog 1e tijdreeks...] [2008-10-13 19:23:31] [7173087adebe3e3a714c80ea2417b3eb]
-   PD  [Univariate Data Series] [tijdreeksen opnie...] [2008-10-19 17:13:12] [7173087adebe3e3a714c80ea2417b3eb]
-   PD    [Univariate Data Series] [tijdreeksen opnie...] [2008-10-19 18:55:20] [7173087adebe3e3a714c80ea2417b3eb]
- RM        [Central Tendency] [central tendency ...] [2008-10-19 19:10:37] [7173087adebe3e3a714c80ea2417b3eb]
- RMP         [ARIMA Backward Selection] [step 5 arima back...] [2008-12-08 22:32:26] [7173087adebe3e3a714c80ea2417b3eb]
- RMP             [ARIMA Forecasting] [Arima forecasting...] [2008-12-22 13:03:25] [70ba55c7ff8e068610dc28fc16e6d1e2] [Current]
Feedback Forum

Post a new message
Dataseries X:
5014
6153
6441
5584
6427
6062
5589
6216
5809
4989
6706
7174
6122
8075
6292
6337
8576
6077
5931
6288
7167
6054
6468
6401
6927
7914
7728
8699
8522
6481
7502
7778
7424
6941
8574
9169
7701
9035
7158
8195
8124
7073
7017
7390
7776
6197
6889
7087
6485
7654
6501
6313
7826
6589
6729
5684
8105
6391
5901
6758




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36037&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'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[48])
369169-------
377701-------
389035-------
397158-------
408195-------
418124-------
427073-------
437017-------
447390-------
457776-------
466197-------
476889-------
487087-------
4964856568.07275195.80697940.33860.45280.22930.05280.2293
5076547501.34556028.25528974.43590.41950.91190.02060.7093
5165016800.06875270.56548329.57190.35080.13690.32320.3566
5263137011.33035284.418738.25050.2140.71880.08960.4658
5378267495.27735667.36499323.18960.36140.89750.25010.6692
5465896368.04094466.24938269.83240.40990.06650.23380.2294
5567296401.20034398.98568403.41510.37410.42710.27330.251
5656846676.33514594.44328758.2270.17510.48020.25080.3495
5781056746.96754598.20118895.73380.10770.83390.1740.3782
5863915959.25593742.05798176.45390.35140.02890.41680.1594
5959016763.35514484.2549042.45630.22920.62560.4570.3904
6067586994.43734660.0299328.84550.42130.82070.4690.469

\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 & 9169 & - & - & - & - & - & - & - \tabularnewline
37 & 7701 & - & - & - & - & - & - & - \tabularnewline
38 & 9035 & - & - & - & - & - & - & - \tabularnewline
39 & 7158 & - & - & - & - & - & - & - \tabularnewline
40 & 8195 & - & - & - & - & - & - & - \tabularnewline
41 & 8124 & - & - & - & - & - & - & - \tabularnewline
42 & 7073 & - & - & - & - & - & - & - \tabularnewline
43 & 7017 & - & - & - & - & - & - & - \tabularnewline
44 & 7390 & - & - & - & - & - & - & - \tabularnewline
45 & 7776 & - & - & - & - & - & - & - \tabularnewline
46 & 6197 & - & - & - & - & - & - & - \tabularnewline
47 & 6889 & - & - & - & - & - & - & - \tabularnewline
48 & 7087 & - & - & - & - & - & - & - \tabularnewline
49 & 6485 & 6568.0727 & 5195.8069 & 7940.3386 & 0.4528 & 0.2293 & 0.0528 & 0.2293 \tabularnewline
50 & 7654 & 7501.3455 & 6028.2552 & 8974.4359 & 0.4195 & 0.9119 & 0.0206 & 0.7093 \tabularnewline
51 & 6501 & 6800.0687 & 5270.5654 & 8329.5719 & 0.3508 & 0.1369 & 0.3232 & 0.3566 \tabularnewline
52 & 6313 & 7011.3303 & 5284.41 & 8738.2505 & 0.214 & 0.7188 & 0.0896 & 0.4658 \tabularnewline
53 & 7826 & 7495.2773 & 5667.3649 & 9323.1896 & 0.3614 & 0.8975 & 0.2501 & 0.6692 \tabularnewline
54 & 6589 & 6368.0409 & 4466.2493 & 8269.8324 & 0.4099 & 0.0665 & 0.2338 & 0.2294 \tabularnewline
55 & 6729 & 6401.2003 & 4398.9856 & 8403.4151 & 0.3741 & 0.4271 & 0.2733 & 0.251 \tabularnewline
56 & 5684 & 6676.3351 & 4594.4432 & 8758.227 & 0.1751 & 0.4802 & 0.2508 & 0.3495 \tabularnewline
57 & 8105 & 6746.9675 & 4598.2011 & 8895.7338 & 0.1077 & 0.8339 & 0.174 & 0.3782 \tabularnewline
58 & 6391 & 5959.2559 & 3742.0579 & 8176.4539 & 0.3514 & 0.0289 & 0.4168 & 0.1594 \tabularnewline
59 & 5901 & 6763.3551 & 4484.254 & 9042.4563 & 0.2292 & 0.6256 & 0.457 & 0.3904 \tabularnewline
60 & 6758 & 6994.4373 & 4660.029 & 9328.8455 & 0.4213 & 0.8207 & 0.469 & 0.469 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36037&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]9169[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]7701[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]9035[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]7158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8195[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]7073[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]7017[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]7390[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]7776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]6889[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7087[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]6485[/C][C]6568.0727[/C][C]5195.8069[/C][C]7940.3386[/C][C]0.4528[/C][C]0.2293[/C][C]0.0528[/C][C]0.2293[/C][/ROW]
[ROW][C]50[/C][C]7654[/C][C]7501.3455[/C][C]6028.2552[/C][C]8974.4359[/C][C]0.4195[/C][C]0.9119[/C][C]0.0206[/C][C]0.7093[/C][/ROW]
[ROW][C]51[/C][C]6501[/C][C]6800.0687[/C][C]5270.5654[/C][C]8329.5719[/C][C]0.3508[/C][C]0.1369[/C][C]0.3232[/C][C]0.3566[/C][/ROW]
[ROW][C]52[/C][C]6313[/C][C]7011.3303[/C][C]5284.41[/C][C]8738.2505[/C][C]0.214[/C][C]0.7188[/C][C]0.0896[/C][C]0.4658[/C][/ROW]
[ROW][C]53[/C][C]7826[/C][C]7495.2773[/C][C]5667.3649[/C][C]9323.1896[/C][C]0.3614[/C][C]0.8975[/C][C]0.2501[/C][C]0.6692[/C][/ROW]
[ROW][C]54[/C][C]6589[/C][C]6368.0409[/C][C]4466.2493[/C][C]8269.8324[/C][C]0.4099[/C][C]0.0665[/C][C]0.2338[/C][C]0.2294[/C][/ROW]
[ROW][C]55[/C][C]6729[/C][C]6401.2003[/C][C]4398.9856[/C][C]8403.4151[/C][C]0.3741[/C][C]0.4271[/C][C]0.2733[/C][C]0.251[/C][/ROW]
[ROW][C]56[/C][C]5684[/C][C]6676.3351[/C][C]4594.4432[/C][C]8758.227[/C][C]0.1751[/C][C]0.4802[/C][C]0.2508[/C][C]0.3495[/C][/ROW]
[ROW][C]57[/C][C]8105[/C][C]6746.9675[/C][C]4598.2011[/C][C]8895.7338[/C][C]0.1077[/C][C]0.8339[/C][C]0.174[/C][C]0.3782[/C][/ROW]
[ROW][C]58[/C][C]6391[/C][C]5959.2559[/C][C]3742.0579[/C][C]8176.4539[/C][C]0.3514[/C][C]0.0289[/C][C]0.4168[/C][C]0.1594[/C][/ROW]
[ROW][C]59[/C][C]5901[/C][C]6763.3551[/C][C]4484.254[/C][C]9042.4563[/C][C]0.2292[/C][C]0.6256[/C][C]0.457[/C][C]0.3904[/C][/ROW]
[ROW][C]60[/C][C]6758[/C][C]6994.4373[/C][C]4660.029[/C][C]9328.8455[/C][C]0.4213[/C][C]0.8207[/C][C]0.469[/C][C]0.469[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36037&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36037&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])
369169-------
377701-------
389035-------
397158-------
408195-------
418124-------
427073-------
437017-------
447390-------
457776-------
466197-------
476889-------
487087-------
4964856568.07275195.80697940.33860.45280.22930.05280.2293
5076547501.34556028.25528974.43590.41950.91190.02060.7093
5165016800.06875270.56548329.57190.35080.13690.32320.3566
5263137011.33035284.418738.25050.2140.71880.08960.4658
5378267495.27735667.36499323.18960.36140.89750.25010.6692
5465896368.04094466.24938269.83240.40990.06650.23380.2294
5567296401.20034398.98568403.41510.37410.42710.27330.251
5656846676.33514594.44328758.2270.17510.48020.25080.3495
5781056746.96754598.20118895.73380.10770.83390.1740.3782
5863915959.25593742.05798176.45390.35140.02890.41680.1594
5959016763.35514484.2549042.45630.22920.62560.4570.3904
6067586994.43734660.0299328.84550.42130.82070.4690.469







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1066-0.01260.00116901.0797575.0923.981
500.10020.02040.001723303.38911941.949144.0676
510.1148-0.0440.003789442.05877453.504986.3337
520.1257-0.09960.0083487665.173140638.7644201.5906
530.12440.04410.0037109377.53159114.794395.4714
540.15240.03470.002948822.94484068.578763.7854
550.15960.05120.0043107452.62148954.385194.6276
560.1591-0.14860.0124984729.008682060.7507286.4625
570.16250.20130.01681844252.3924153687.6994392.0302
580.18980.07240.006186402.935415533.5779124.6338
590.1719-0.12750.0106743656.395361971.3663248.9405
600.1703-0.03380.002855902.57884658.548268.2536

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1066 & -0.0126 & 0.0011 & 6901.0797 & 575.09 & 23.981 \tabularnewline
50 & 0.1002 & 0.0204 & 0.0017 & 23303.3891 & 1941.9491 & 44.0676 \tabularnewline
51 & 0.1148 & -0.044 & 0.0037 & 89442.0587 & 7453.5049 & 86.3337 \tabularnewline
52 & 0.1257 & -0.0996 & 0.0083 & 487665.1731 & 40638.7644 & 201.5906 \tabularnewline
53 & 0.1244 & 0.0441 & 0.0037 & 109377.5315 & 9114.7943 & 95.4714 \tabularnewline
54 & 0.1524 & 0.0347 & 0.0029 & 48822.9448 & 4068.5787 & 63.7854 \tabularnewline
55 & 0.1596 & 0.0512 & 0.0043 & 107452.6214 & 8954.3851 & 94.6276 \tabularnewline
56 & 0.1591 & -0.1486 & 0.0124 & 984729.0086 & 82060.7507 & 286.4625 \tabularnewline
57 & 0.1625 & 0.2013 & 0.0168 & 1844252.3924 & 153687.6994 & 392.0302 \tabularnewline
58 & 0.1898 & 0.0724 & 0.006 & 186402.9354 & 15533.5779 & 124.6338 \tabularnewline
59 & 0.1719 & -0.1275 & 0.0106 & 743656.3953 & 61971.3663 & 248.9405 \tabularnewline
60 & 0.1703 & -0.0338 & 0.0028 & 55902.5788 & 4658.5482 & 68.2536 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36037&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.1066[/C][C]-0.0126[/C][C]0.0011[/C][C]6901.0797[/C][C]575.09[/C][C]23.981[/C][/ROW]
[ROW][C]50[/C][C]0.1002[/C][C]0.0204[/C][C]0.0017[/C][C]23303.3891[/C][C]1941.9491[/C][C]44.0676[/C][/ROW]
[ROW][C]51[/C][C]0.1148[/C][C]-0.044[/C][C]0.0037[/C][C]89442.0587[/C][C]7453.5049[/C][C]86.3337[/C][/ROW]
[ROW][C]52[/C][C]0.1257[/C][C]-0.0996[/C][C]0.0083[/C][C]487665.1731[/C][C]40638.7644[/C][C]201.5906[/C][/ROW]
[ROW][C]53[/C][C]0.1244[/C][C]0.0441[/C][C]0.0037[/C][C]109377.5315[/C][C]9114.7943[/C][C]95.4714[/C][/ROW]
[ROW][C]54[/C][C]0.1524[/C][C]0.0347[/C][C]0.0029[/C][C]48822.9448[/C][C]4068.5787[/C][C]63.7854[/C][/ROW]
[ROW][C]55[/C][C]0.1596[/C][C]0.0512[/C][C]0.0043[/C][C]107452.6214[/C][C]8954.3851[/C][C]94.6276[/C][/ROW]
[ROW][C]56[/C][C]0.1591[/C][C]-0.1486[/C][C]0.0124[/C][C]984729.0086[/C][C]82060.7507[/C][C]286.4625[/C][/ROW]
[ROW][C]57[/C][C]0.1625[/C][C]0.2013[/C][C]0.0168[/C][C]1844252.3924[/C][C]153687.6994[/C][C]392.0302[/C][/ROW]
[ROW][C]58[/C][C]0.1898[/C][C]0.0724[/C][C]0.006[/C][C]186402.9354[/C][C]15533.5779[/C][C]124.6338[/C][/ROW]
[ROW][C]59[/C][C]0.1719[/C][C]-0.1275[/C][C]0.0106[/C][C]743656.3953[/C][C]61971.3663[/C][C]248.9405[/C][/ROW]
[ROW][C]60[/C][C]0.1703[/C][C]-0.0338[/C][C]0.0028[/C][C]55902.5788[/C][C]4658.5482[/C][C]68.2536[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36037&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36037&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.1066-0.01260.00116901.0797575.0923.981
500.10020.02040.001723303.38911941.949144.0676
510.1148-0.0440.003789442.05877453.504986.3337
520.1257-0.09960.0083487665.173140638.7644201.5906
530.12440.04410.0037109377.53159114.794395.4714
540.15240.03470.002948822.94484068.578763.7854
550.15960.05120.0043107452.62148954.385194.6276
560.1591-0.14860.0124984729.008682060.7507286.4625
570.16250.20130.01681844252.3924153687.6994392.0302
580.18980.07240.006186402.935415533.5779124.6338
590.1719-0.12750.0106743656.395361971.3663248.9405
600.1703-0.03380.002855902.57884658.548268.2536



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