Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 15:52: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/2007/Dec/11/t1197413524ce4s35kjc7sw21i.htm/, Retrieved Mon, 29 Apr 2024 07:43:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3173, Retrieved Mon, 29 Apr 2024 07:43:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsQ1
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima forecasting] [2007-12-11 22:52:58] [b9b7d48527f96e534ee0d9807d68e9c1] [Current]
Feedback Forum

Post a new message
Dataseries X:
467.037
460.070
447.988
442.867
436.087
431.328
484.015
509.673
512.927
502.831
470.984
471.067
476.049
474.605
470.439
461.251
454.724
455.626
516.847
525.192
522.975
518.585
509.239
512.238
519.164
517.009
509.933
509.127
500.857
506.971
569.323
579.714
577.992
565.464
547.344
554.788
562.325
560.854
555.332
543.599
536.662
542.722
593.530
610.763
612.613
611.324
594.167
595.454
590.865
589.379
584.428
573.100
567.456
569.028
620.735
628.884
628.232
612.117
595.404
597.141
593.408
590.072
579.799
574.205
572.775
572.942
619.567
625.809
619.916
587.625
565.742
557.274




Summary of compuational 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 compuational 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=3173&T=0

[TABLE]
[ROW][C]Summary of compuational 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=3173&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3173&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 compuational 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[60])
48595.454-------
49590.865-------
50589.379-------
51584.428-------
52573.1-------
53567.456-------
54569.028-------
55620.735-------
56628.884-------
57628.232-------
58612.117-------
59595.404-------
60597.141-------
61593.408603.0312594.0282611.92780.0170.90280.99630.9028
62590.072601.3675588.5746613.94640.03920.89260.96910.7449
63579.799595.6316579.809611.12480.02260.75910.92180.4243
64574.205589.9155571.4684607.91220.04350.86470.96650.2157
65572.775583.0462562.1894603.32240.16040.80360.93410.0865
66572.942588.3349565.6257610.36350.08540.91690.95710.2167
67619.567640.5321617.6427662.78510.032410.95940.9999
68625.809652.7719628.658676.19330.0120.99730.97721
69619.916652.667627.0631677.49130.00490.9830.97321
70587.625645.3463618.0791671.721400.97060.99320.9998
71565.742629.0395599.7992657.230600.9980.99030.9867
72557.274633.1072602.7046662.3841010.9920.992

\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[60]) \tabularnewline
48 & 595.454 & - & - & - & - & - & - & - \tabularnewline
49 & 590.865 & - & - & - & - & - & - & - \tabularnewline
50 & 589.379 & - & - & - & - & - & - & - \tabularnewline
51 & 584.428 & - & - & - & - & - & - & - \tabularnewline
52 & 573.1 & - & - & - & - & - & - & - \tabularnewline
53 & 567.456 & - & - & - & - & - & - & - \tabularnewline
54 & 569.028 & - & - & - & - & - & - & - \tabularnewline
55 & 620.735 & - & - & - & - & - & - & - \tabularnewline
56 & 628.884 & - & - & - & - & - & - & - \tabularnewline
57 & 628.232 & - & - & - & - & - & - & - \tabularnewline
58 & 612.117 & - & - & - & - & - & - & - \tabularnewline
59 & 595.404 & - & - & - & - & - & - & - \tabularnewline
60 & 597.141 & - & - & - & - & - & - & - \tabularnewline
61 & 593.408 & 603.0312 & 594.0282 & 611.9278 & 0.017 & 0.9028 & 0.9963 & 0.9028 \tabularnewline
62 & 590.072 & 601.3675 & 588.5746 & 613.9464 & 0.0392 & 0.8926 & 0.9691 & 0.7449 \tabularnewline
63 & 579.799 & 595.6316 & 579.809 & 611.1248 & 0.0226 & 0.7591 & 0.9218 & 0.4243 \tabularnewline
64 & 574.205 & 589.9155 & 571.4684 & 607.9122 & 0.0435 & 0.8647 & 0.9665 & 0.2157 \tabularnewline
65 & 572.775 & 583.0462 & 562.1894 & 603.3224 & 0.1604 & 0.8036 & 0.9341 & 0.0865 \tabularnewline
66 & 572.942 & 588.3349 & 565.6257 & 610.3635 & 0.0854 & 0.9169 & 0.9571 & 0.2167 \tabularnewline
67 & 619.567 & 640.5321 & 617.6427 & 662.7851 & 0.0324 & 1 & 0.9594 & 0.9999 \tabularnewline
68 & 625.809 & 652.7719 & 628.658 & 676.1933 & 0.012 & 0.9973 & 0.9772 & 1 \tabularnewline
69 & 619.916 & 652.667 & 627.0631 & 677.4913 & 0.0049 & 0.983 & 0.9732 & 1 \tabularnewline
70 & 587.625 & 645.3463 & 618.0791 & 671.7214 & 0 & 0.9706 & 0.9932 & 0.9998 \tabularnewline
71 & 565.742 & 629.0395 & 599.7992 & 657.2306 & 0 & 0.998 & 0.9903 & 0.9867 \tabularnewline
72 & 557.274 & 633.1072 & 602.7046 & 662.3841 & 0 & 1 & 0.992 & 0.992 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3173&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[60])[/C][/ROW]
[ROW][C]48[/C][C]595.454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]590.865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]589.379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]584.428[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]573.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]567.456[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]569.028[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]620.735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]628.884[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]628.232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]612.117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]595.404[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]597.141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]593.408[/C][C]603.0312[/C][C]594.0282[/C][C]611.9278[/C][C]0.017[/C][C]0.9028[/C][C]0.9963[/C][C]0.9028[/C][/ROW]
[ROW][C]62[/C][C]590.072[/C][C]601.3675[/C][C]588.5746[/C][C]613.9464[/C][C]0.0392[/C][C]0.8926[/C][C]0.9691[/C][C]0.7449[/C][/ROW]
[ROW][C]63[/C][C]579.799[/C][C]595.6316[/C][C]579.809[/C][C]611.1248[/C][C]0.0226[/C][C]0.7591[/C][C]0.9218[/C][C]0.4243[/C][/ROW]
[ROW][C]64[/C][C]574.205[/C][C]589.9155[/C][C]571.4684[/C][C]607.9122[/C][C]0.0435[/C][C]0.8647[/C][C]0.9665[/C][C]0.2157[/C][/ROW]
[ROW][C]65[/C][C]572.775[/C][C]583.0462[/C][C]562.1894[/C][C]603.3224[/C][C]0.1604[/C][C]0.8036[/C][C]0.9341[/C][C]0.0865[/C][/ROW]
[ROW][C]66[/C][C]572.942[/C][C]588.3349[/C][C]565.6257[/C][C]610.3635[/C][C]0.0854[/C][C]0.9169[/C][C]0.9571[/C][C]0.2167[/C][/ROW]
[ROW][C]67[/C][C]619.567[/C][C]640.5321[/C][C]617.6427[/C][C]662.7851[/C][C]0.0324[/C][C]1[/C][C]0.9594[/C][C]0.9999[/C][/ROW]
[ROW][C]68[/C][C]625.809[/C][C]652.7719[/C][C]628.658[/C][C]676.1933[/C][C]0.012[/C][C]0.9973[/C][C]0.9772[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]619.916[/C][C]652.667[/C][C]627.0631[/C][C]677.4913[/C][C]0.0049[/C][C]0.983[/C][C]0.9732[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]587.625[/C][C]645.3463[/C][C]618.0791[/C][C]671.7214[/C][C]0[/C][C]0.9706[/C][C]0.9932[/C][C]0.9998[/C][/ROW]
[ROW][C]71[/C][C]565.742[/C][C]629.0395[/C][C]599.7992[/C][C]657.2306[/C][C]0[/C][C]0.998[/C][C]0.9903[/C][C]0.9867[/C][/ROW]
[ROW][C]72[/C][C]557.274[/C][C]633.1072[/C][C]602.7046[/C][C]662.3841[/C][C]0[/C][C]1[/C][C]0.992[/C][C]0.992[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3173&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3173&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[60])
48595.454-------
49590.865-------
50589.379-------
51584.428-------
52573.1-------
53567.456-------
54569.028-------
55620.735-------
56628.884-------
57628.232-------
58612.117-------
59595.404-------
60597.141-------
61593.408603.0312594.0282611.92780.0170.90280.99630.9028
62590.072601.3675588.5746613.94640.03920.89260.96910.7449
63579.799595.6316579.809611.12480.02260.75910.92180.4243
64574.205589.9155571.4684607.91220.04350.86470.96650.2157
65572.775583.0462562.1894603.32240.16040.80360.93410.0865
66572.942588.3349565.6257610.36350.08540.91690.95710.2167
67619.567640.5321617.6427662.78510.032410.95940.9999
68625.809652.7719628.658676.19330.0120.99730.97721
69619.916652.667627.0631677.49130.00490.9830.97321
70587.625645.3463618.0791671.721400.97060.99320.9998
71565.742629.0395599.7992657.230600.9980.99030.9867
72557.274633.1072602.7046662.3841010.9920.992







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0075-0.0160.001392.6057.71712.778
620.0107-0.01880.0016127.589110.63243.2607
630.0133-0.02660.0022250.671620.88934.5705
640.0156-0.02660.0022246.820320.56844.5352
650.0177-0.01760.0015105.49728.79142.965
660.0191-0.02620.0022236.942919.74524.4436
670.0177-0.03270.0027439.537336.62816.0521
680.0183-0.04130.0034726.998560.58327.7835
690.0194-0.05020.00421072.627689.38569.4544
700.0209-0.08940.00753331.7525277.64616.6627
710.0229-0.10060.00844006.5785333.881518.2724
720.0236-0.11980.015750.6814479.223521.8912

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0075 & -0.016 & 0.0013 & 92.605 & 7.7171 & 2.778 \tabularnewline
62 & 0.0107 & -0.0188 & 0.0016 & 127.5891 & 10.6324 & 3.2607 \tabularnewline
63 & 0.0133 & -0.0266 & 0.0022 & 250.6716 & 20.8893 & 4.5705 \tabularnewline
64 & 0.0156 & -0.0266 & 0.0022 & 246.8203 & 20.5684 & 4.5352 \tabularnewline
65 & 0.0177 & -0.0176 & 0.0015 & 105.4972 & 8.7914 & 2.965 \tabularnewline
66 & 0.0191 & -0.0262 & 0.0022 & 236.9429 & 19.7452 & 4.4436 \tabularnewline
67 & 0.0177 & -0.0327 & 0.0027 & 439.5373 & 36.6281 & 6.0521 \tabularnewline
68 & 0.0183 & -0.0413 & 0.0034 & 726.9985 & 60.5832 & 7.7835 \tabularnewline
69 & 0.0194 & -0.0502 & 0.0042 & 1072.6276 & 89.3856 & 9.4544 \tabularnewline
70 & 0.0209 & -0.0894 & 0.0075 & 3331.7525 & 277.646 & 16.6627 \tabularnewline
71 & 0.0229 & -0.1006 & 0.0084 & 4006.5785 & 333.8815 & 18.2724 \tabularnewline
72 & 0.0236 & -0.1198 & 0.01 & 5750.6814 & 479.2235 & 21.8912 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3173&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]61[/C][C]0.0075[/C][C]-0.016[/C][C]0.0013[/C][C]92.605[/C][C]7.7171[/C][C]2.778[/C][/ROW]
[ROW][C]62[/C][C]0.0107[/C][C]-0.0188[/C][C]0.0016[/C][C]127.5891[/C][C]10.6324[/C][C]3.2607[/C][/ROW]
[ROW][C]63[/C][C]0.0133[/C][C]-0.0266[/C][C]0.0022[/C][C]250.6716[/C][C]20.8893[/C][C]4.5705[/C][/ROW]
[ROW][C]64[/C][C]0.0156[/C][C]-0.0266[/C][C]0.0022[/C][C]246.8203[/C][C]20.5684[/C][C]4.5352[/C][/ROW]
[ROW][C]65[/C][C]0.0177[/C][C]-0.0176[/C][C]0.0015[/C][C]105.4972[/C][C]8.7914[/C][C]2.965[/C][/ROW]
[ROW][C]66[/C][C]0.0191[/C][C]-0.0262[/C][C]0.0022[/C][C]236.9429[/C][C]19.7452[/C][C]4.4436[/C][/ROW]
[ROW][C]67[/C][C]0.0177[/C][C]-0.0327[/C][C]0.0027[/C][C]439.5373[/C][C]36.6281[/C][C]6.0521[/C][/ROW]
[ROW][C]68[/C][C]0.0183[/C][C]-0.0413[/C][C]0.0034[/C][C]726.9985[/C][C]60.5832[/C][C]7.7835[/C][/ROW]
[ROW][C]69[/C][C]0.0194[/C][C]-0.0502[/C][C]0.0042[/C][C]1072.6276[/C][C]89.3856[/C][C]9.4544[/C][/ROW]
[ROW][C]70[/C][C]0.0209[/C][C]-0.0894[/C][C]0.0075[/C][C]3331.7525[/C][C]277.646[/C][C]16.6627[/C][/ROW]
[ROW][C]71[/C][C]0.0229[/C][C]-0.1006[/C][C]0.0084[/C][C]4006.5785[/C][C]333.8815[/C][C]18.2724[/C][/ROW]
[ROW][C]72[/C][C]0.0236[/C][C]-0.1198[/C][C]0.01[/C][C]5750.6814[/C][C]479.2235[/C][C]21.8912[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3173&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3173&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
610.0075-0.0160.001392.6057.71712.778
620.0107-0.01880.0016127.589110.63243.2607
630.0133-0.02660.0022250.671620.88934.5705
640.0156-0.02660.0022246.820320.56844.5352
650.0177-0.01760.0015105.49728.79142.965
660.0191-0.02620.0022236.942919.74524.4436
670.0177-0.03270.0027439.537336.62816.0521
680.0183-0.04130.0034726.998560.58327.7835
690.0194-0.05020.00421072.627689.38569.4544
700.0209-0.08940.00753331.7525277.64616.6627
710.0229-0.10060.00844006.5785333.881518.2724
720.0236-0.11980.015750.6814479.223521.8912



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