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, 20 Dec 2008 04:34:44 -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/20/t12297729851aoyjcblcnyk894.htm/, Retrieved Fri, 17 May 2024 15:53:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35329, Retrieved Fri, 17 May 2024 15:53:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact228
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [SMP prof bach] [2008-12-15 22:25:20] [bc937651ef42bf891200cf0e0edc7238]
- RM    [Variance Reduction Matrix] [VRM prof bach] [2008-12-15 22:31:00] [bc937651ef42bf891200cf0e0edc7238]
- RMP     [(Partial) Autocorrelation Function] [ARIMA Prof bach A...] [2008-12-15 22:38:57] [bc937651ef42bf891200cf0e0edc7238]
- RMP       [ARIMA Backward Selection] [Arima backward se...] [2008-12-19 17:26:16] [bc937651ef42bf891200cf0e0edc7238]
- RMP           [ARIMA Forecasting] [ARIMA forecast pr...] [2008-12-20 11:34:44] [21d7d81e7693ad6dde5aadefb1046611] [Current]
-  MPD            [ARIMA Forecasting] [] [2010-12-21 19:37:30] [94f4aa1c01e87d8321fffb341ed4df07]
-    D              [ARIMA Forecasting] [] [2010-12-22 16:40:18] [94f4aa1c01e87d8321fffb341ed4df07]
-  MPD            [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-22 13:25:50] [616fb52b46273b7e6805de1e68b3a688]
-    D              [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-24 15:04:34] [616fb52b46273b7e6805de1e68b3a688]
- RMPD            [ARIMA Forecasting] [] [2010-12-24 13:59:54] [4dfa50539945b119a90a7606969443b9]
-   PD              [ARIMA Forecasting] [] [2010-12-26 10:14:56] [4dfa50539945b119a90a7606969443b9]
Feedback Forum

Post a new message
Dataseries X:
13363
12530
11420
10948
10173
10602
16094
19631
17140
14345
12632
12894
11808
10673
9939
9890
9283
10131
15864
19283
16203
13919
11937
11795
11268
10522
9929
9725
9372
10068
16230
19115
18351
16265
14103
14115
13327
12618
12129
11775
11493
12470
20792
22337
21325
18581
16475
16581
15745
14453
13712
13766
13336
15346
24446
26178
24628
21282
18850
18822
18060
17536
16417
15842
15188
16905
25430
27962
26607
23364
20827
20506
19181
18016
17354
16256
15770
17538
26899
28915
25247
22856
19980
19856
16994
16839
15618
15883
15513
17106
25272
26731
22891
19583
16939
16757
15435
14786
13680
13208
12707
14277
22436
23229
18241
16145
13994
14780
13100
12329
12463
11532
10784
13106
19491
20418
16094
14491
13067




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35329&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'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[107])
9516939-------
9616757-------
9715435-------
9814786-------
9913680-------
10013208-------
10112707-------
10214277-------
10322436-------
10423229-------
10518241-------
10616145-------
10713994-------
1081478013912.830612943.247114932.14770.04770.43800.438
1091310012431.951611260.229513686.46670.14831e-0400.0073
1101232912012.004210606.874613542.5190.34240.08182e-040.0056
1111246311042.14269545.9112695.28110.0460.06359e-042e-04
1121153210801.79939159.595212639.7670.21810.03820.00513e-04
1131078410395.40228663.991112355.58190.34880.12790.01042e-04
1141310611731.08659699.118814043.77590.1220.78890.01550.0276
1151949118691.053715674.712822091.94360.32240.99940.01550.9966
1162041819540.921616249.037123273.41230.32260.51050.02640.9982
1171609415507.723812584.146918876.45330.36650.00210.05590.8108
1181449113481.275210720.161116705.35480.26970.05610.05270.3776
1191306711551.7628984.349114593.26370.16440.02910.05780.0578

\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[107]) \tabularnewline
95 & 16939 & - & - & - & - & - & - & - \tabularnewline
96 & 16757 & - & - & - & - & - & - & - \tabularnewline
97 & 15435 & - & - & - & - & - & - & - \tabularnewline
98 & 14786 & - & - & - & - & - & - & - \tabularnewline
99 & 13680 & - & - & - & - & - & - & - \tabularnewline
100 & 13208 & - & - & - & - & - & - & - \tabularnewline
101 & 12707 & - & - & - & - & - & - & - \tabularnewline
102 & 14277 & - & - & - & - & - & - & - \tabularnewline
103 & 22436 & - & - & - & - & - & - & - \tabularnewline
104 & 23229 & - & - & - & - & - & - & - \tabularnewline
105 & 18241 & - & - & - & - & - & - & - \tabularnewline
106 & 16145 & - & - & - & - & - & - & - \tabularnewline
107 & 13994 & - & - & - & - & - & - & - \tabularnewline
108 & 14780 & 13912.8306 & 12943.2471 & 14932.1477 & 0.0477 & 0.438 & 0 & 0.438 \tabularnewline
109 & 13100 & 12431.9516 & 11260.2295 & 13686.4667 & 0.1483 & 1e-04 & 0 & 0.0073 \tabularnewline
110 & 12329 & 12012.0042 & 10606.8746 & 13542.519 & 0.3424 & 0.0818 & 2e-04 & 0.0056 \tabularnewline
111 & 12463 & 11042.1426 & 9545.91 & 12695.2811 & 0.046 & 0.0635 & 9e-04 & 2e-04 \tabularnewline
112 & 11532 & 10801.7993 & 9159.5952 & 12639.767 & 0.2181 & 0.0382 & 0.0051 & 3e-04 \tabularnewline
113 & 10784 & 10395.4022 & 8663.9911 & 12355.5819 & 0.3488 & 0.1279 & 0.0104 & 2e-04 \tabularnewline
114 & 13106 & 11731.0865 & 9699.1188 & 14043.7759 & 0.122 & 0.7889 & 0.0155 & 0.0276 \tabularnewline
115 & 19491 & 18691.0537 & 15674.7128 & 22091.9436 & 0.3224 & 0.9994 & 0.0155 & 0.9966 \tabularnewline
116 & 20418 & 19540.9216 & 16249.0371 & 23273.4123 & 0.3226 & 0.5105 & 0.0264 & 0.9982 \tabularnewline
117 & 16094 & 15507.7238 & 12584.1469 & 18876.4533 & 0.3665 & 0.0021 & 0.0559 & 0.8108 \tabularnewline
118 & 14491 & 13481.2752 & 10720.1611 & 16705.3548 & 0.2697 & 0.0561 & 0.0527 & 0.3776 \tabularnewline
119 & 13067 & 11551.762 & 8984.3491 & 14593.2637 & 0.1644 & 0.0291 & 0.0578 & 0.0578 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35329&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[107])[/C][/ROW]
[ROW][C]95[/C][C]16939[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]16757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]15435[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]14786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]13680[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]13208[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]12707[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]14277[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]22436[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]23229[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]18241[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]16145[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]13994[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]14780[/C][C]13912.8306[/C][C]12943.2471[/C][C]14932.1477[/C][C]0.0477[/C][C]0.438[/C][C]0[/C][C]0.438[/C][/ROW]
[ROW][C]109[/C][C]13100[/C][C]12431.9516[/C][C]11260.2295[/C][C]13686.4667[/C][C]0.1483[/C][C]1e-04[/C][C]0[/C][C]0.0073[/C][/ROW]
[ROW][C]110[/C][C]12329[/C][C]12012.0042[/C][C]10606.8746[/C][C]13542.519[/C][C]0.3424[/C][C]0.0818[/C][C]2e-04[/C][C]0.0056[/C][/ROW]
[ROW][C]111[/C][C]12463[/C][C]11042.1426[/C][C]9545.91[/C][C]12695.2811[/C][C]0.046[/C][C]0.0635[/C][C]9e-04[/C][C]2e-04[/C][/ROW]
[ROW][C]112[/C][C]11532[/C][C]10801.7993[/C][C]9159.5952[/C][C]12639.767[/C][C]0.2181[/C][C]0.0382[/C][C]0.0051[/C][C]3e-04[/C][/ROW]
[ROW][C]113[/C][C]10784[/C][C]10395.4022[/C][C]8663.9911[/C][C]12355.5819[/C][C]0.3488[/C][C]0.1279[/C][C]0.0104[/C][C]2e-04[/C][/ROW]
[ROW][C]114[/C][C]13106[/C][C]11731.0865[/C][C]9699.1188[/C][C]14043.7759[/C][C]0.122[/C][C]0.7889[/C][C]0.0155[/C][C]0.0276[/C][/ROW]
[ROW][C]115[/C][C]19491[/C][C]18691.0537[/C][C]15674.7128[/C][C]22091.9436[/C][C]0.3224[/C][C]0.9994[/C][C]0.0155[/C][C]0.9966[/C][/ROW]
[ROW][C]116[/C][C]20418[/C][C]19540.9216[/C][C]16249.0371[/C][C]23273.4123[/C][C]0.3226[/C][C]0.5105[/C][C]0.0264[/C][C]0.9982[/C][/ROW]
[ROW][C]117[/C][C]16094[/C][C]15507.7238[/C][C]12584.1469[/C][C]18876.4533[/C][C]0.3665[/C][C]0.0021[/C][C]0.0559[/C][C]0.8108[/C][/ROW]
[ROW][C]118[/C][C]14491[/C][C]13481.2752[/C][C]10720.1611[/C][C]16705.3548[/C][C]0.2697[/C][C]0.0561[/C][C]0.0527[/C][C]0.3776[/C][/ROW]
[ROW][C]119[/C][C]13067[/C][C]11551.762[/C][C]8984.3491[/C][C]14593.2637[/C][C]0.1644[/C][C]0.0291[/C][C]0.0578[/C][C]0.0578[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35329&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35329&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[107])
9516939-------
9616757-------
9715435-------
9814786-------
9913680-------
10013208-------
10112707-------
10214277-------
10322436-------
10423229-------
10518241-------
10616145-------
10713994-------
1081478013912.830612943.247114932.14770.04770.43800.438
1091310012431.951611260.229513686.46670.14831e-0400.0073
1101232912012.004210606.874613542.5190.34240.08182e-040.0056
1111246311042.14269545.9112695.28110.0460.06359e-042e-04
1121153210801.79939159.595212639.7670.21810.03820.00513e-04
1131078410395.40228663.991112355.58190.34880.12790.01042e-04
1141310611731.08659699.118814043.77590.1220.78890.01550.0276
1151949118691.053715674.712822091.94360.32240.99940.01550.9966
1162041819540.921616249.037123273.41230.32260.51050.02640.9982
1171609415507.723812584.146918876.45330.36650.00210.05590.8108
1181449113481.275210720.161116705.35480.26970.05610.05270.3776
1191306711551.7628984.349114593.26370.16440.02910.05780.0578







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1080.03740.06230.0052751982.693162665.2244250.3302
1090.05150.05370.0045446288.663237190.7219192.849
1100.0650.02640.0022100486.36528373.863891.5088
1110.07640.12870.01072018835.8034168236.317410.1662
1120.08680.06760.0056533193.109344432.7591210.7908
1130.09620.03740.0031151008.226812584.0189112.1785
1140.10060.11720.00981890387.1599157532.2633396.9033
1150.09280.04280.0036639914.14753326.1789230.9246
1160.09750.04490.0037769266.529464105.5441253.1907
1170.11080.03780.0032343719.73628643.3113169.2433
1180.1220.07490.00621019544.218984962.0182291.4824
1190.13430.13120.01092295946.1722191328.8477437.4115

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
108 & 0.0374 & 0.0623 & 0.0052 & 751982.6931 & 62665.2244 & 250.3302 \tabularnewline
109 & 0.0515 & 0.0537 & 0.0045 & 446288.6632 & 37190.7219 & 192.849 \tabularnewline
110 & 0.065 & 0.0264 & 0.0022 & 100486.3652 & 8373.8638 & 91.5088 \tabularnewline
111 & 0.0764 & 0.1287 & 0.0107 & 2018835.8034 & 168236.317 & 410.1662 \tabularnewline
112 & 0.0868 & 0.0676 & 0.0056 & 533193.1093 & 44432.7591 & 210.7908 \tabularnewline
113 & 0.0962 & 0.0374 & 0.0031 & 151008.2268 & 12584.0189 & 112.1785 \tabularnewline
114 & 0.1006 & 0.1172 & 0.0098 & 1890387.1599 & 157532.2633 & 396.9033 \tabularnewline
115 & 0.0928 & 0.0428 & 0.0036 & 639914.147 & 53326.1789 & 230.9246 \tabularnewline
116 & 0.0975 & 0.0449 & 0.0037 & 769266.5294 & 64105.5441 & 253.1907 \tabularnewline
117 & 0.1108 & 0.0378 & 0.0032 & 343719.736 & 28643.3113 & 169.2433 \tabularnewline
118 & 0.122 & 0.0749 & 0.0062 & 1019544.2189 & 84962.0182 & 291.4824 \tabularnewline
119 & 0.1343 & 0.1312 & 0.0109 & 2295946.1722 & 191328.8477 & 437.4115 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35329&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]108[/C][C]0.0374[/C][C]0.0623[/C][C]0.0052[/C][C]751982.6931[/C][C]62665.2244[/C][C]250.3302[/C][/ROW]
[ROW][C]109[/C][C]0.0515[/C][C]0.0537[/C][C]0.0045[/C][C]446288.6632[/C][C]37190.7219[/C][C]192.849[/C][/ROW]
[ROW][C]110[/C][C]0.065[/C][C]0.0264[/C][C]0.0022[/C][C]100486.3652[/C][C]8373.8638[/C][C]91.5088[/C][/ROW]
[ROW][C]111[/C][C]0.0764[/C][C]0.1287[/C][C]0.0107[/C][C]2018835.8034[/C][C]168236.317[/C][C]410.1662[/C][/ROW]
[ROW][C]112[/C][C]0.0868[/C][C]0.0676[/C][C]0.0056[/C][C]533193.1093[/C][C]44432.7591[/C][C]210.7908[/C][/ROW]
[ROW][C]113[/C][C]0.0962[/C][C]0.0374[/C][C]0.0031[/C][C]151008.2268[/C][C]12584.0189[/C][C]112.1785[/C][/ROW]
[ROW][C]114[/C][C]0.1006[/C][C]0.1172[/C][C]0.0098[/C][C]1890387.1599[/C][C]157532.2633[/C][C]396.9033[/C][/ROW]
[ROW][C]115[/C][C]0.0928[/C][C]0.0428[/C][C]0.0036[/C][C]639914.147[/C][C]53326.1789[/C][C]230.9246[/C][/ROW]
[ROW][C]116[/C][C]0.0975[/C][C]0.0449[/C][C]0.0037[/C][C]769266.5294[/C][C]64105.5441[/C][C]253.1907[/C][/ROW]
[ROW][C]117[/C][C]0.1108[/C][C]0.0378[/C][C]0.0032[/C][C]343719.736[/C][C]28643.3113[/C][C]169.2433[/C][/ROW]
[ROW][C]118[/C][C]0.122[/C][C]0.0749[/C][C]0.0062[/C][C]1019544.2189[/C][C]84962.0182[/C][C]291.4824[/C][/ROW]
[ROW][C]119[/C][C]0.1343[/C][C]0.1312[/C][C]0.0109[/C][C]2295946.1722[/C][C]191328.8477[/C][C]437.4115[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35329&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35329&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
1080.03740.06230.0052751982.693162665.2244250.3302
1090.05150.05370.0045446288.663237190.7219192.849
1100.0650.02640.0022100486.36528373.863891.5088
1110.07640.12870.01072018835.8034168236.317410.1662
1120.08680.06760.0056533193.109344432.7591210.7908
1130.09620.03740.0031151008.226812584.0189112.1785
1140.10060.11720.00981890387.1599157532.2633396.9033
1150.09280.04280.0036639914.14753326.1789230.9246
1160.09750.04490.0037769266.529464105.5441253.1907
1170.11080.03780.0032343719.73628643.3113169.2433
1180.1220.07490.00621019544.218984962.0182291.4824
1190.13430.13120.01092295946.1722191328.8477437.4115



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