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 06:33:58 -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/t12296073748kdq6hjweeqfv4u.htm/, Retrieved Sun, 12 May 2024 11:56:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34748, Retrieved Sun, 12 May 2024 11:56:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Forecasting] [Paper: ARIMA fore...] [2008-12-09 20:22:15] [57850c80fd59ccfb28f882be994e814e]
-   P     [ARIMA Forecasting] [paper: forecast] [2008-12-18 13:33:58] [eda0613752f6a8c9915475ca285fcc77] [Current]
Feedback Forum

Post a new message
Dataseries X:
15107
15024
12083
15761
16943
15070
13660
14769
14725
15998
15371
14957
15470
15102
11704
16284
16727
14969
14861
14583
15306
17904
16379
15420
17871
15913
13867
17823
17872
17422
16705
15991
16584
19124
17839
17209
18587
16258
15142
19202
17747
19090
18040
17516
17752
21073
17170
19440
19795
17575
16165
19465
19932
19961
17343
18924
18574
21351
18595
19823
20844
19640
17735
19814
22239
20682
17819
21872
22117
21866




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 4 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34748&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34748&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34748&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 time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[58])
4621073-------
4717170-------
4819440-------
4919795-------
5017575-------
5116165-------
5219465-------
5319932-------
5419961-------
5517343-------
5618924-------
5718574-------
5821351-------
591859518836.841117460.823620321.29710.37475e-040.98615e-04
601982319743.418318292.505521309.41370.46030.92470.64790.0221
612084420407.069218874.288322064.32710.30270.75510.76540.1321
621964018700.573117121.45220425.33750.14290.00740.89960.0013
631773516433.661515041.356917954.84480.046800.63540
641981420503.315418717.039222460.06640.2450.99720.85080.1979
652223920967.864919059.325323067.51940.11770.85930.83320.3603
662068220439.204618556.519522512.90090.40920.04450.67440.1944
671781918377.101116642.642620292.3210.28390.00920.8550.0012
682187219409.347317529.574221490.69670.01020.93290.67620.0337
692211719346.309117444.356421455.63130.0050.00950.76350.0312
702186622093.713619876.51524558.23780.42810.49260.72260.7226

\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[58]) \tabularnewline
46 & 21073 & - & - & - & - & - & - & - \tabularnewline
47 & 17170 & - & - & - & - & - & - & - \tabularnewline
48 & 19440 & - & - & - & - & - & - & - \tabularnewline
49 & 19795 & - & - & - & - & - & - & - \tabularnewline
50 & 17575 & - & - & - & - & - & - & - \tabularnewline
51 & 16165 & - & - & - & - & - & - & - \tabularnewline
52 & 19465 & - & - & - & - & - & - & - \tabularnewline
53 & 19932 & - & - & - & - & - & - & - \tabularnewline
54 & 19961 & - & - & - & - & - & - & - \tabularnewline
55 & 17343 & - & - & - & - & - & - & - \tabularnewline
56 & 18924 & - & - & - & - & - & - & - \tabularnewline
57 & 18574 & - & - & - & - & - & - & - \tabularnewline
58 & 21351 & - & - & - & - & - & - & - \tabularnewline
59 & 18595 & 18836.8411 & 17460.8236 & 20321.2971 & 0.3747 & 5e-04 & 0.9861 & 5e-04 \tabularnewline
60 & 19823 & 19743.4183 & 18292.5055 & 21309.4137 & 0.4603 & 0.9247 & 0.6479 & 0.0221 \tabularnewline
61 & 20844 & 20407.0692 & 18874.2883 & 22064.3271 & 0.3027 & 0.7551 & 0.7654 & 0.1321 \tabularnewline
62 & 19640 & 18700.5731 & 17121.452 & 20425.3375 & 0.1429 & 0.0074 & 0.8996 & 0.0013 \tabularnewline
63 & 17735 & 16433.6615 & 15041.3569 & 17954.8448 & 0.0468 & 0 & 0.6354 & 0 \tabularnewline
64 & 19814 & 20503.3154 & 18717.0392 & 22460.0664 & 0.245 & 0.9972 & 0.8508 & 0.1979 \tabularnewline
65 & 22239 & 20967.8649 & 19059.3253 & 23067.5194 & 0.1177 & 0.8593 & 0.8332 & 0.3603 \tabularnewline
66 & 20682 & 20439.2046 & 18556.5195 & 22512.9009 & 0.4092 & 0.0445 & 0.6744 & 0.1944 \tabularnewline
67 & 17819 & 18377.1011 & 16642.6426 & 20292.321 & 0.2839 & 0.0092 & 0.855 & 0.0012 \tabularnewline
68 & 21872 & 19409.3473 & 17529.5742 & 21490.6967 & 0.0102 & 0.9329 & 0.6762 & 0.0337 \tabularnewline
69 & 22117 & 19346.3091 & 17444.3564 & 21455.6313 & 0.005 & 0.0095 & 0.7635 & 0.0312 \tabularnewline
70 & 21866 & 22093.7136 & 19876.515 & 24558.2378 & 0.4281 & 0.4926 & 0.7226 & 0.7226 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34748&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[58])[/C][/ROW]
[ROW][C]46[/C][C]21073[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]17170[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]19440[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]19795[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]17575[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]16165[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]19465[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]19932[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]19961[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]17343[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]18924[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]18574[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]21351[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]18595[/C][C]18836.8411[/C][C]17460.8236[/C][C]20321.2971[/C][C]0.3747[/C][C]5e-04[/C][C]0.9861[/C][C]5e-04[/C][/ROW]
[ROW][C]60[/C][C]19823[/C][C]19743.4183[/C][C]18292.5055[/C][C]21309.4137[/C][C]0.4603[/C][C]0.9247[/C][C]0.6479[/C][C]0.0221[/C][/ROW]
[ROW][C]61[/C][C]20844[/C][C]20407.0692[/C][C]18874.2883[/C][C]22064.3271[/C][C]0.3027[/C][C]0.7551[/C][C]0.7654[/C][C]0.1321[/C][/ROW]
[ROW][C]62[/C][C]19640[/C][C]18700.5731[/C][C]17121.452[/C][C]20425.3375[/C][C]0.1429[/C][C]0.0074[/C][C]0.8996[/C][C]0.0013[/C][/ROW]
[ROW][C]63[/C][C]17735[/C][C]16433.6615[/C][C]15041.3569[/C][C]17954.8448[/C][C]0.0468[/C][C]0[/C][C]0.6354[/C][C]0[/C][/ROW]
[ROW][C]64[/C][C]19814[/C][C]20503.3154[/C][C]18717.0392[/C][C]22460.0664[/C][C]0.245[/C][C]0.9972[/C][C]0.8508[/C][C]0.1979[/C][/ROW]
[ROW][C]65[/C][C]22239[/C][C]20967.8649[/C][C]19059.3253[/C][C]23067.5194[/C][C]0.1177[/C][C]0.8593[/C][C]0.8332[/C][C]0.3603[/C][/ROW]
[ROW][C]66[/C][C]20682[/C][C]20439.2046[/C][C]18556.5195[/C][C]22512.9009[/C][C]0.4092[/C][C]0.0445[/C][C]0.6744[/C][C]0.1944[/C][/ROW]
[ROW][C]67[/C][C]17819[/C][C]18377.1011[/C][C]16642.6426[/C][C]20292.321[/C][C]0.2839[/C][C]0.0092[/C][C]0.855[/C][C]0.0012[/C][/ROW]
[ROW][C]68[/C][C]21872[/C][C]19409.3473[/C][C]17529.5742[/C][C]21490.6967[/C][C]0.0102[/C][C]0.9329[/C][C]0.6762[/C][C]0.0337[/C][/ROW]
[ROW][C]69[/C][C]22117[/C][C]19346.3091[/C][C]17444.3564[/C][C]21455.6313[/C][C]0.005[/C][C]0.0095[/C][C]0.7635[/C][C]0.0312[/C][/ROW]
[ROW][C]70[/C][C]21866[/C][C]22093.7136[/C][C]19876.515[/C][C]24558.2378[/C][C]0.4281[/C][C]0.4926[/C][C]0.7226[/C][C]0.7226[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34748&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34748&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[58])
4621073-------
4717170-------
4819440-------
4919795-------
5017575-------
5116165-------
5219465-------
5319932-------
5419961-------
5517343-------
5618924-------
5718574-------
5821351-------
591859518836.841117460.823620321.29710.37475e-040.98615e-04
601982319743.418318292.505521309.41370.46030.92470.64790.0221
612084420407.069218874.288322064.32710.30270.75510.76540.1321
621964018700.573117121.45220425.33750.14290.00740.89960.0013
631773516433.661515041.356917954.84480.046800.63540
641981420503.315418717.039222460.06640.2450.99720.85080.1979
652223920967.864919059.325323067.51940.11770.85930.83320.3603
662068220439.204618556.519522512.90090.40920.04450.67440.1944
671781918377.101116642.642620292.3210.28390.00920.8550.0012
682187219409.347317529.574221490.69670.01020.93290.67620.0337
692211719346.309117444.356421455.63130.0050.00950.76350.0312
702186622093.713619876.51524558.23780.42810.49260.72260.7226







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.0402-0.01280.001158487.13634873.92869.8135
600.04050.0043e-046333.246527.770522.9733
610.04140.02140.0018190908.549415909.0458126.1311
620.04710.05020.0042882522.859273543.5716271.1892
630.04720.07920.00661693482.0113141123.5009375.6641
640.0487-0.03360.0028475155.728939596.3107198.9882
650.05110.06060.00511615784.4927134648.7077366.9451
660.05180.01190.00158949.61984912.468370.089
670.0532-0.03040.0025311476.864325956.4054161.1099
680.05470.12690.01066064658.3794505388.1983710.9066
690.05560.14320.01197676727.8214639727.3184799.8296
700.0569-0.01039e-0451853.49434321.124565.7353

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.0402 & -0.0128 & 0.0011 & 58487.1363 & 4873.928 & 69.8135 \tabularnewline
60 & 0.0405 & 0.004 & 3e-04 & 6333.246 & 527.7705 & 22.9733 \tabularnewline
61 & 0.0414 & 0.0214 & 0.0018 & 190908.5494 & 15909.0458 & 126.1311 \tabularnewline
62 & 0.0471 & 0.0502 & 0.0042 & 882522.8592 & 73543.5716 & 271.1892 \tabularnewline
63 & 0.0472 & 0.0792 & 0.0066 & 1693482.0113 & 141123.5009 & 375.6641 \tabularnewline
64 & 0.0487 & -0.0336 & 0.0028 & 475155.7289 & 39596.3107 & 198.9882 \tabularnewline
65 & 0.0511 & 0.0606 & 0.0051 & 1615784.4927 & 134648.7077 & 366.9451 \tabularnewline
66 & 0.0518 & 0.0119 & 0.001 & 58949.6198 & 4912.4683 & 70.089 \tabularnewline
67 & 0.0532 & -0.0304 & 0.0025 & 311476.8643 & 25956.4054 & 161.1099 \tabularnewline
68 & 0.0547 & 0.1269 & 0.0106 & 6064658.3794 & 505388.1983 & 710.9066 \tabularnewline
69 & 0.0556 & 0.1432 & 0.0119 & 7676727.8214 & 639727.3184 & 799.8296 \tabularnewline
70 & 0.0569 & -0.0103 & 9e-04 & 51853.4943 & 4321.1245 & 65.7353 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34748&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]59[/C][C]0.0402[/C][C]-0.0128[/C][C]0.0011[/C][C]58487.1363[/C][C]4873.928[/C][C]69.8135[/C][/ROW]
[ROW][C]60[/C][C]0.0405[/C][C]0.004[/C][C]3e-04[/C][C]6333.246[/C][C]527.7705[/C][C]22.9733[/C][/ROW]
[ROW][C]61[/C][C]0.0414[/C][C]0.0214[/C][C]0.0018[/C][C]190908.5494[/C][C]15909.0458[/C][C]126.1311[/C][/ROW]
[ROW][C]62[/C][C]0.0471[/C][C]0.0502[/C][C]0.0042[/C][C]882522.8592[/C][C]73543.5716[/C][C]271.1892[/C][/ROW]
[ROW][C]63[/C][C]0.0472[/C][C]0.0792[/C][C]0.0066[/C][C]1693482.0113[/C][C]141123.5009[/C][C]375.6641[/C][/ROW]
[ROW][C]64[/C][C]0.0487[/C][C]-0.0336[/C][C]0.0028[/C][C]475155.7289[/C][C]39596.3107[/C][C]198.9882[/C][/ROW]
[ROW][C]65[/C][C]0.0511[/C][C]0.0606[/C][C]0.0051[/C][C]1615784.4927[/C][C]134648.7077[/C][C]366.9451[/C][/ROW]
[ROW][C]66[/C][C]0.0518[/C][C]0.0119[/C][C]0.001[/C][C]58949.6198[/C][C]4912.4683[/C][C]70.089[/C][/ROW]
[ROW][C]67[/C][C]0.0532[/C][C]-0.0304[/C][C]0.0025[/C][C]311476.8643[/C][C]25956.4054[/C][C]161.1099[/C][/ROW]
[ROW][C]68[/C][C]0.0547[/C][C]0.1269[/C][C]0.0106[/C][C]6064658.3794[/C][C]505388.1983[/C][C]710.9066[/C][/ROW]
[ROW][C]69[/C][C]0.0556[/C][C]0.1432[/C][C]0.0119[/C][C]7676727.8214[/C][C]639727.3184[/C][C]799.8296[/C][/ROW]
[ROW][C]70[/C][C]0.0569[/C][C]-0.0103[/C][C]9e-04[/C][C]51853.4943[/C][C]4321.1245[/C][C]65.7353[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34748&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34748&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
590.0402-0.01280.001158487.13634873.92869.8135
600.04050.0043e-046333.246527.770522.9733
610.04140.02140.0018190908.549415909.0458126.1311
620.04710.05020.0042882522.859273543.5716271.1892
630.04720.07920.00661693482.0113141123.5009375.6641
640.0487-0.03360.0028475155.728939596.3107198.9882
650.05110.06060.00511615784.4927134648.7077366.9451
660.05180.01190.00158949.61984912.468370.089
670.0532-0.03040.0025311476.864325956.4054161.1099
680.05470.12690.01066064658.3794505388.1983710.9066
690.05560.14320.01197676727.8214639727.3184799.8296
700.0569-0.01039e-0451853.49434321.124565.7353



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