Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 24 Dec 2008 03:45:55 -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/24/t1230115751ne8iq72qpoy5syy.htm/, Retrieved Sun, 19 May 2024 11:30:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36455, Retrieved Sun, 19 May 2024 11:30:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact198
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Forecasting] [step 1] [2008-12-16 19:27:17] [89807c1e898f33ff9d3cae28449e7b22]
-   PD    [ARIMA Forecasting] [ARIMA FC Mannen] [2008-12-24 10:45:55] [f0e1dc59aca2fa8d78080b39899f316a] [Current]
Feedback Forum

Post a new message
Dataseries X:
54156
53661
52441
50648
48141
46127
45623
56527
60205
61321
58088
54623
53495
51824
50518
49050
47111
45264
44357
54862
57871
59070
56273
52837
51702
49447
48965
46922
46256
45200
44471
53119
55016
56641
51847
47990
45744
46390
44461
41582
40813
38096
35461
44375
46255
45610
43375
40167
40628
40590
39473
36735
36634
32806
32907
41076
42254
43215
41116
40373




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36455&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[48])
3647990-------
3745744-------
3846390-------
3944461-------
4041582.0000000000-------
4140813-------
4238096-------
4335461-------
4444375-------
4546255-------
4645610-------
4743375-------
4840167-------
494062838918.718537286.875440637.01640.02560.077200.0772
504059038431.2436194.325240836.11980.03930.036700.0786
513947337425.611334797.137340295.97750.08110.015400.0306
523673535724.002532874.075938875.60880.26480.00991e-040.0029
533663434839.30631766.102238276.28190.1530.13983e-040.0012
543280633290.282630118.476936871.48030.39550.03360.00431e-04
553290732081.491628818.97735797.40070.33160.35120.03730
564107639131.205234736.50944210.26340.22650.99180.02150.3447
574225440850.799235967.125346552.20960.31480.46910.03160.5929
584321541174.128635999.39747267.62390.25580.36420.07680.627
594111638873.415233822.996344856.34670.23130.07750.07010.3359
604037336292.168331446.89442061.47710.08280.05060.0940.094

\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 & 47990 & - & - & - & - & - & - & - \tabularnewline
37 & 45744 & - & - & - & - & - & - & - \tabularnewline
38 & 46390 & - & - & - & - & - & - & - \tabularnewline
39 & 44461 & - & - & - & - & - & - & - \tabularnewline
40 & 41582.0000000000 & - & - & - & - & - & - & - \tabularnewline
41 & 40813 & - & - & - & - & - & - & - \tabularnewline
42 & 38096 & - & - & - & - & - & - & - \tabularnewline
43 & 35461 & - & - & - & - & - & - & - \tabularnewline
44 & 44375 & - & - & - & - & - & - & - \tabularnewline
45 & 46255 & - & - & - & - & - & - & - \tabularnewline
46 & 45610 & - & - & - & - & - & - & - \tabularnewline
47 & 43375 & - & - & - & - & - & - & - \tabularnewline
48 & 40167 & - & - & - & - & - & - & - \tabularnewline
49 & 40628 & 38918.7185 & 37286.8754 & 40637.0164 & 0.0256 & 0.0772 & 0 & 0.0772 \tabularnewline
50 & 40590 & 38431.24 & 36194.3252 & 40836.1198 & 0.0393 & 0.0367 & 0 & 0.0786 \tabularnewline
51 & 39473 & 37425.6113 & 34797.1373 & 40295.9775 & 0.0811 & 0.0154 & 0 & 0.0306 \tabularnewline
52 & 36735 & 35724.0025 & 32874.0759 & 38875.6088 & 0.2648 & 0.0099 & 1e-04 & 0.0029 \tabularnewline
53 & 36634 & 34839.306 & 31766.1022 & 38276.2819 & 0.153 & 0.1398 & 3e-04 & 0.0012 \tabularnewline
54 & 32806 & 33290.2826 & 30118.4769 & 36871.4803 & 0.3955 & 0.0336 & 0.0043 & 1e-04 \tabularnewline
55 & 32907 & 32081.4916 & 28818.977 & 35797.4007 & 0.3316 & 0.3512 & 0.0373 & 0 \tabularnewline
56 & 41076 & 39131.2052 & 34736.509 & 44210.2634 & 0.2265 & 0.9918 & 0.0215 & 0.3447 \tabularnewline
57 & 42254 & 40850.7992 & 35967.1253 & 46552.2096 & 0.3148 & 0.4691 & 0.0316 & 0.5929 \tabularnewline
58 & 43215 & 41174.1286 & 35999.397 & 47267.6239 & 0.2558 & 0.3642 & 0.0768 & 0.627 \tabularnewline
59 & 41116 & 38873.4152 & 33822.9963 & 44856.3467 & 0.2313 & 0.0775 & 0.0701 & 0.3359 \tabularnewline
60 & 40373 & 36292.1683 & 31446.894 & 42061.4771 & 0.0828 & 0.0506 & 0.094 & 0.094 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36455&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]47990[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]45744[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]46390[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]44461[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]41582.0000000000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]40813[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]38096[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]35461[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]44375[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]46255[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]45610[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]43375[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]40167[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]40628[/C][C]38918.7185[/C][C]37286.8754[/C][C]40637.0164[/C][C]0.0256[/C][C]0.0772[/C][C]0[/C][C]0.0772[/C][/ROW]
[ROW][C]50[/C][C]40590[/C][C]38431.24[/C][C]36194.3252[/C][C]40836.1198[/C][C]0.0393[/C][C]0.0367[/C][C]0[/C][C]0.0786[/C][/ROW]
[ROW][C]51[/C][C]39473[/C][C]37425.6113[/C][C]34797.1373[/C][C]40295.9775[/C][C]0.0811[/C][C]0.0154[/C][C]0[/C][C]0.0306[/C][/ROW]
[ROW][C]52[/C][C]36735[/C][C]35724.0025[/C][C]32874.0759[/C][C]38875.6088[/C][C]0.2648[/C][C]0.0099[/C][C]1e-04[/C][C]0.0029[/C][/ROW]
[ROW][C]53[/C][C]36634[/C][C]34839.306[/C][C]31766.1022[/C][C]38276.2819[/C][C]0.153[/C][C]0.1398[/C][C]3e-04[/C][C]0.0012[/C][/ROW]
[ROW][C]54[/C][C]32806[/C][C]33290.2826[/C][C]30118.4769[/C][C]36871.4803[/C][C]0.3955[/C][C]0.0336[/C][C]0.0043[/C][C]1e-04[/C][/ROW]
[ROW][C]55[/C][C]32907[/C][C]32081.4916[/C][C]28818.977[/C][C]35797.4007[/C][C]0.3316[/C][C]0.3512[/C][C]0.0373[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]41076[/C][C]39131.2052[/C][C]34736.509[/C][C]44210.2634[/C][C]0.2265[/C][C]0.9918[/C][C]0.0215[/C][C]0.3447[/C][/ROW]
[ROW][C]57[/C][C]42254[/C][C]40850.7992[/C][C]35967.1253[/C][C]46552.2096[/C][C]0.3148[/C][C]0.4691[/C][C]0.0316[/C][C]0.5929[/C][/ROW]
[ROW][C]58[/C][C]43215[/C][C]41174.1286[/C][C]35999.397[/C][C]47267.6239[/C][C]0.2558[/C][C]0.3642[/C][C]0.0768[/C][C]0.627[/C][/ROW]
[ROW][C]59[/C][C]41116[/C][C]38873.4152[/C][C]33822.9963[/C][C]44856.3467[/C][C]0.2313[/C][C]0.0775[/C][C]0.0701[/C][C]0.3359[/C][/ROW]
[ROW][C]60[/C][C]40373[/C][C]36292.1683[/C][C]31446.894[/C][C]42061.4771[/C][C]0.0828[/C][C]0.0506[/C][C]0.094[/C][C]0.094[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36455&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36455&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])
3647990-------
3745744-------
3846390-------
3944461-------
4041582.0000000000-------
4140813-------
4238096-------
4335461-------
4444375-------
4546255-------
4645610-------
4743375-------
4840167-------
494062838918.718537286.875440637.01640.02560.077200.0772
504059038431.2436194.325240836.11980.03930.036700.0786
513947337425.611334797.137340295.97750.08110.015400.0306
523673535724.002532874.075938875.60880.26480.00991e-040.0029
533663434839.30631766.102238276.28190.1530.13983e-040.0012
543280633290.282630118.476936871.48030.39550.03360.00431e-04
553290732081.491628818.97735797.40070.33160.35120.03730
564107639131.205234736.50944210.26340.22650.99180.02150.3447
574225440850.799235967.125346552.20960.31480.46910.03160.5929
584321541174.128635999.39747267.62390.25580.36420.07680.627
594111638873.415233822.996344856.34670.23130.07750.07010.3359
604037336292.168331446.89442061.47710.08280.05060.0940.094







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.02250.04390.00372921643.1274243470.2606493.4271
500.03190.05620.00474660244.7323388353.7277623.1803
510.03910.05470.00464191800.6921349316.7243591.0302
520.0450.02830.00241022115.961585176.3301291.8498
530.05030.05150.00433220926.4292268410.5358518.0835
540.0549-0.01450.0012234529.599219544.1333139.8003
550.05910.02570.0021681464.079356788.6733238.3037
560.06620.04970.00413782226.9602315185.58561.4139
570.07120.03430.00291968972.5569164081.0464405.0692
580.07550.04960.00414165156.2074347096.3506589.1488
590.07850.05770.00485029186.6385419098.8865647.3785
600.08110.11240.009416653187.50851387765.62571178.0346

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0225 & 0.0439 & 0.0037 & 2921643.1274 & 243470.2606 & 493.4271 \tabularnewline
50 & 0.0319 & 0.0562 & 0.0047 & 4660244.7323 & 388353.7277 & 623.1803 \tabularnewline
51 & 0.0391 & 0.0547 & 0.0046 & 4191800.6921 & 349316.7243 & 591.0302 \tabularnewline
52 & 0.045 & 0.0283 & 0.0024 & 1022115.9615 & 85176.3301 & 291.8498 \tabularnewline
53 & 0.0503 & 0.0515 & 0.0043 & 3220926.4292 & 268410.5358 & 518.0835 \tabularnewline
54 & 0.0549 & -0.0145 & 0.0012 & 234529.5992 & 19544.1333 & 139.8003 \tabularnewline
55 & 0.0591 & 0.0257 & 0.0021 & 681464.0793 & 56788.6733 & 238.3037 \tabularnewline
56 & 0.0662 & 0.0497 & 0.0041 & 3782226.9602 & 315185.58 & 561.4139 \tabularnewline
57 & 0.0712 & 0.0343 & 0.0029 & 1968972.5569 & 164081.0464 & 405.0692 \tabularnewline
58 & 0.0755 & 0.0496 & 0.0041 & 4165156.2074 & 347096.3506 & 589.1488 \tabularnewline
59 & 0.0785 & 0.0577 & 0.0048 & 5029186.6385 & 419098.8865 & 647.3785 \tabularnewline
60 & 0.0811 & 0.1124 & 0.0094 & 16653187.5085 & 1387765.6257 & 1178.0346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36455&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.0225[/C][C]0.0439[/C][C]0.0037[/C][C]2921643.1274[/C][C]243470.2606[/C][C]493.4271[/C][/ROW]
[ROW][C]50[/C][C]0.0319[/C][C]0.0562[/C][C]0.0047[/C][C]4660244.7323[/C][C]388353.7277[/C][C]623.1803[/C][/ROW]
[ROW][C]51[/C][C]0.0391[/C][C]0.0547[/C][C]0.0046[/C][C]4191800.6921[/C][C]349316.7243[/C][C]591.0302[/C][/ROW]
[ROW][C]52[/C][C]0.045[/C][C]0.0283[/C][C]0.0024[/C][C]1022115.9615[/C][C]85176.3301[/C][C]291.8498[/C][/ROW]
[ROW][C]53[/C][C]0.0503[/C][C]0.0515[/C][C]0.0043[/C][C]3220926.4292[/C][C]268410.5358[/C][C]518.0835[/C][/ROW]
[ROW][C]54[/C][C]0.0549[/C][C]-0.0145[/C][C]0.0012[/C][C]234529.5992[/C][C]19544.1333[/C][C]139.8003[/C][/ROW]
[ROW][C]55[/C][C]0.0591[/C][C]0.0257[/C][C]0.0021[/C][C]681464.0793[/C][C]56788.6733[/C][C]238.3037[/C][/ROW]
[ROW][C]56[/C][C]0.0662[/C][C]0.0497[/C][C]0.0041[/C][C]3782226.9602[/C][C]315185.58[/C][C]561.4139[/C][/ROW]
[ROW][C]57[/C][C]0.0712[/C][C]0.0343[/C][C]0.0029[/C][C]1968972.5569[/C][C]164081.0464[/C][C]405.0692[/C][/ROW]
[ROW][C]58[/C][C]0.0755[/C][C]0.0496[/C][C]0.0041[/C][C]4165156.2074[/C][C]347096.3506[/C][C]589.1488[/C][/ROW]
[ROW][C]59[/C][C]0.0785[/C][C]0.0577[/C][C]0.0048[/C][C]5029186.6385[/C][C]419098.8865[/C][C]647.3785[/C][/ROW]
[ROW][C]60[/C][C]0.0811[/C][C]0.1124[/C][C]0.0094[/C][C]16653187.5085[/C][C]1387765.6257[/C][C]1178.0346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36455&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36455&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.02250.04390.00372921643.1274243470.2606493.4271
500.03190.05620.00474660244.7323388353.7277623.1803
510.03910.05470.00464191800.6921349316.7243591.0302
520.0450.02830.00241022115.961585176.3301291.8498
530.05030.05150.00433220926.4292268410.5358518.0835
540.0549-0.01450.0012234529.599219544.1333139.8003
550.05910.02570.0021681464.079356788.6733238.3037
560.06620.04970.00413782226.9602315185.58561.4139
570.07120.03430.00291968972.5569164081.0464405.0692
580.07550.04960.00414165156.2074347096.3506589.1488
590.07850.05770.00485029186.6385419098.8865647.3785
600.08110.11240.009416653187.50851387765.62571178.0346



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