Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 01:36:50 -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/08/t119710227410z7zescae9hssk.htm/, Retrieved Mon, 29 Apr 2024 05:39:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2896, Retrieved Mon, 29 Apr 2024 05:39:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact279
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [WS9Q1(lambda1,81)] [2007-12-08 08:36:50] [77c9c0d97755c69877fabe95ec1f485a] [Current]
Feedback Forum

Post a new message
Dataseries X:
467037
460070
447988
442867
436087
431328
484015
509673
512927
502831
470984
471067
476049
474605
470439
461251
454724
455626
516847
525192
522975
518585
509239
512238
519164
517009
509933
509127
500857
506971
569323
579714
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2896&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 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[60])
48595454.000000001-------
49590865-------
50589379.000000001-------
51584428-------
52573100-------
53567456.0-------
54569028.0-------
55620735-------
56628884-------
57628232-------
58612117-------
59595404.000000001-------
60597141-------
61593408603031.1502594028.2313611927.80170.0170.90280.99630.9028
62590072601367.5355588574.5795613946.37860.03920.89260.96910.7449
63579799595631.6113579809.0275611124.84490.02260.75910.92180.4243
64574205589915.5154571468.441607912.19410.04350.86470.96650.2157
65572775583046.1853562189.3588603322.44750.16040.80360.93410.0865
66572942588334.9486565625.7114610363.5440.08540.91690.95710.2167
67619567640532.1442617642.6975662785.09070.032410.95940.9999
68625809652771.91628657.9542676193.31450.0120.99730.97721
69619916652666.9942627063.0761677491.34250.00490.9830.97321
70587625645346.3348618079.1101671721.391200.97060.99320.9998
71565742629039.5391599799.2124657230.598400.9980.99030.9867
72557274633107.2473602704.6295662384.0851010.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 & 595454.000000001 & - & - & - & - & - & - & - \tabularnewline
49 & 590865 & - & - & - & - & - & - & - \tabularnewline
50 & 589379.000000001 & - & - & - & - & - & - & - \tabularnewline
51 & 584428 & - & - & - & - & - & - & - \tabularnewline
52 & 573100 & - & - & - & - & - & - & - \tabularnewline
53 & 567456.0 & - & - & - & - & - & - & - \tabularnewline
54 & 569028.0 & - & - & - & - & - & - & - \tabularnewline
55 & 620735 & - & - & - & - & - & - & - \tabularnewline
56 & 628884 & - & - & - & - & - & - & - \tabularnewline
57 & 628232 & - & - & - & - & - & - & - \tabularnewline
58 & 612117 & - & - & - & - & - & - & - \tabularnewline
59 & 595404.000000001 & - & - & - & - & - & - & - \tabularnewline
60 & 597141 & - & - & - & - & - & - & - \tabularnewline
61 & 593408 & 603031.1502 & 594028.2313 & 611927.8017 & 0.017 & 0.9028 & 0.9963 & 0.9028 \tabularnewline
62 & 590072 & 601367.5355 & 588574.5795 & 613946.3786 & 0.0392 & 0.8926 & 0.9691 & 0.7449 \tabularnewline
63 & 579799 & 595631.6113 & 579809.0275 & 611124.8449 & 0.0226 & 0.7591 & 0.9218 & 0.4243 \tabularnewline
64 & 574205 & 589915.5154 & 571468.441 & 607912.1941 & 0.0435 & 0.8647 & 0.9665 & 0.2157 \tabularnewline
65 & 572775 & 583046.1853 & 562189.3588 & 603322.4475 & 0.1604 & 0.8036 & 0.9341 & 0.0865 \tabularnewline
66 & 572942 & 588334.9486 & 565625.7114 & 610363.544 & 0.0854 & 0.9169 & 0.9571 & 0.2167 \tabularnewline
67 & 619567 & 640532.1442 & 617642.6975 & 662785.0907 & 0.0324 & 1 & 0.9594 & 0.9999 \tabularnewline
68 & 625809 & 652771.91 & 628657.9542 & 676193.3145 & 0.012 & 0.9973 & 0.9772 & 1 \tabularnewline
69 & 619916 & 652666.9942 & 627063.0761 & 677491.3425 & 0.0049 & 0.983 & 0.9732 & 1 \tabularnewline
70 & 587625 & 645346.3348 & 618079.1101 & 671721.3912 & 0 & 0.9706 & 0.9932 & 0.9998 \tabularnewline
71 & 565742 & 629039.5391 & 599799.2124 & 657230.5984 & 0 & 0.998 & 0.9903 & 0.9867 \tabularnewline
72 & 557274 & 633107.2473 & 602704.6295 & 662384.0851 & 0 & 1 & 0.992 & 0.992 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2896&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]595454.000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]590865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]589379.000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]584428[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]573100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]567456.0[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]569028.0[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]620735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]628884[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]628232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]612117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]595404.000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]597141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]593408[/C][C]603031.1502[/C][C]594028.2313[/C][C]611927.8017[/C][C]0.017[/C][C]0.9028[/C][C]0.9963[/C][C]0.9028[/C][/ROW]
[ROW][C]62[/C][C]590072[/C][C]601367.5355[/C][C]588574.5795[/C][C]613946.3786[/C][C]0.0392[/C][C]0.8926[/C][C]0.9691[/C][C]0.7449[/C][/ROW]
[ROW][C]63[/C][C]579799[/C][C]595631.6113[/C][C]579809.0275[/C][C]611124.8449[/C][C]0.0226[/C][C]0.7591[/C][C]0.9218[/C][C]0.4243[/C][/ROW]
[ROW][C]64[/C][C]574205[/C][C]589915.5154[/C][C]571468.441[/C][C]607912.1941[/C][C]0.0435[/C][C]0.8647[/C][C]0.9665[/C][C]0.2157[/C][/ROW]
[ROW][C]65[/C][C]572775[/C][C]583046.1853[/C][C]562189.3588[/C][C]603322.4475[/C][C]0.1604[/C][C]0.8036[/C][C]0.9341[/C][C]0.0865[/C][/ROW]
[ROW][C]66[/C][C]572942[/C][C]588334.9486[/C][C]565625.7114[/C][C]610363.544[/C][C]0.0854[/C][C]0.9169[/C][C]0.9571[/C][C]0.2167[/C][/ROW]
[ROW][C]67[/C][C]619567[/C][C]640532.1442[/C][C]617642.6975[/C][C]662785.0907[/C][C]0.0324[/C][C]1[/C][C]0.9594[/C][C]0.9999[/C][/ROW]
[ROW][C]68[/C][C]625809[/C][C]652771.91[/C][C]628657.9542[/C][C]676193.3145[/C][C]0.012[/C][C]0.9973[/C][C]0.9772[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]619916[/C][C]652666.9942[/C][C]627063.0761[/C][C]677491.3425[/C][C]0.0049[/C][C]0.983[/C][C]0.9732[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]587625[/C][C]645346.3348[/C][C]618079.1101[/C][C]671721.3912[/C][C]0[/C][C]0.9706[/C][C]0.9932[/C][C]0.9998[/C][/ROW]
[ROW][C]71[/C][C]565742[/C][C]629039.5391[/C][C]599799.2124[/C][C]657230.5984[/C][C]0[/C][C]0.998[/C][C]0.9903[/C][C]0.9867[/C][/ROW]
[ROW][C]72[/C][C]557274[/C][C]633107.2473[/C][C]602704.6295[/C][C]662384.0851[/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=2896&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2896&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])
48595454.000000001-------
49590865-------
50589379.000000001-------
51584428-------
52573100-------
53567456.0-------
54569028.0-------
55620735-------
56628884-------
57628232-------
58612117-------
59595404.000000001-------
60597141-------
61593408603031.1502594028.2313611927.80170.0170.90280.99630.9028
62590072601367.5355588574.5795613946.37860.03920.89260.96910.7449
63579799595631.6113579809.0275611124.84490.02260.75910.92180.4243
64574205589915.5154571468.441607912.19410.04350.86470.96650.2157
65572775583046.1853562189.3588603322.44750.16040.80360.93410.0865
66572942588334.9486565625.7114610363.5440.08540.91690.95710.2167
67619567640532.1442617642.6975662785.09070.032410.95940.9999
68625809652771.91628657.9542676193.31450.0120.99730.97721
69619916652666.9942627063.0761677491.34250.00490.9830.97321
70587625645346.3348618079.1101671721.391200.97060.99320.9998
71565742629039.5391599799.2124657230.598400.9980.99030.9867
72557274633107.2473602704.6295662384.0851010.9920.992







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0075-0.0160.001392605020.38777717085.03232777.9642
620.0107-0.01880.0016127589122.573510632426.88113260.7402
630.0133-0.02660.0022250671579.043320889298.25364570.4812
640.0156-0.02660.0022246820293.263620568357.7724535.2351
650.0177-0.01760.0015105497246.9498791437.24572965.0358
660.0191-0.02620.0022236942865.168819745238.76414443.5615
670.0177-0.03270.0027439537271.87836628105.98986052.1158
680.0183-0.04130.0034726998514.354260583209.52957783.5217
690.0194-0.05020.00421072627623.821689385635.31859454.3977
700.0209-0.08940.00753331752496.0774277646041.339816662.7141
710.0229-0.10060.00844006578453.1323333881537.76118272.4256
720.0236-0.11980.015750681388.5689479223449.047421891.1729

\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 & 92605020.3877 & 7717085.0323 & 2777.9642 \tabularnewline
62 & 0.0107 & -0.0188 & 0.0016 & 127589122.5735 & 10632426.8811 & 3260.7402 \tabularnewline
63 & 0.0133 & -0.0266 & 0.0022 & 250671579.0433 & 20889298.2536 & 4570.4812 \tabularnewline
64 & 0.0156 & -0.0266 & 0.0022 & 246820293.2636 & 20568357.772 & 4535.2351 \tabularnewline
65 & 0.0177 & -0.0176 & 0.0015 & 105497246.949 & 8791437.2457 & 2965.0358 \tabularnewline
66 & 0.0191 & -0.0262 & 0.0022 & 236942865.1688 & 19745238.7641 & 4443.5615 \tabularnewline
67 & 0.0177 & -0.0327 & 0.0027 & 439537271.878 & 36628105.9898 & 6052.1158 \tabularnewline
68 & 0.0183 & -0.0413 & 0.0034 & 726998514.3542 & 60583209.5295 & 7783.5217 \tabularnewline
69 & 0.0194 & -0.0502 & 0.0042 & 1072627623.8216 & 89385635.3185 & 9454.3977 \tabularnewline
70 & 0.0209 & -0.0894 & 0.0075 & 3331752496.0774 & 277646041.3398 & 16662.7141 \tabularnewline
71 & 0.0229 & -0.1006 & 0.0084 & 4006578453.1323 & 333881537.761 & 18272.4256 \tabularnewline
72 & 0.0236 & -0.1198 & 0.01 & 5750681388.5689 & 479223449.0474 & 21891.1729 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2896&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]92605020.3877[/C][C]7717085.0323[/C][C]2777.9642[/C][/ROW]
[ROW][C]62[/C][C]0.0107[/C][C]-0.0188[/C][C]0.0016[/C][C]127589122.5735[/C][C]10632426.8811[/C][C]3260.7402[/C][/ROW]
[ROW][C]63[/C][C]0.0133[/C][C]-0.0266[/C][C]0.0022[/C][C]250671579.0433[/C][C]20889298.2536[/C][C]4570.4812[/C][/ROW]
[ROW][C]64[/C][C]0.0156[/C][C]-0.0266[/C][C]0.0022[/C][C]246820293.2636[/C][C]20568357.772[/C][C]4535.2351[/C][/ROW]
[ROW][C]65[/C][C]0.0177[/C][C]-0.0176[/C][C]0.0015[/C][C]105497246.949[/C][C]8791437.2457[/C][C]2965.0358[/C][/ROW]
[ROW][C]66[/C][C]0.0191[/C][C]-0.0262[/C][C]0.0022[/C][C]236942865.1688[/C][C]19745238.7641[/C][C]4443.5615[/C][/ROW]
[ROW][C]67[/C][C]0.0177[/C][C]-0.0327[/C][C]0.0027[/C][C]439537271.878[/C][C]36628105.9898[/C][C]6052.1158[/C][/ROW]
[ROW][C]68[/C][C]0.0183[/C][C]-0.0413[/C][C]0.0034[/C][C]726998514.3542[/C][C]60583209.5295[/C][C]7783.5217[/C][/ROW]
[ROW][C]69[/C][C]0.0194[/C][C]-0.0502[/C][C]0.0042[/C][C]1072627623.8216[/C][C]89385635.3185[/C][C]9454.3977[/C][/ROW]
[ROW][C]70[/C][C]0.0209[/C][C]-0.0894[/C][C]0.0075[/C][C]3331752496.0774[/C][C]277646041.3398[/C][C]16662.7141[/C][/ROW]
[ROW][C]71[/C][C]0.0229[/C][C]-0.1006[/C][C]0.0084[/C][C]4006578453.1323[/C][C]333881537.761[/C][C]18272.4256[/C][/ROW]
[ROW][C]72[/C][C]0.0236[/C][C]-0.1198[/C][C]0.01[/C][C]5750681388.5689[/C][C]479223449.0474[/C][C]21891.1729[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2896&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2896&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.001392605020.38777717085.03232777.9642
620.0107-0.01880.0016127589122.573510632426.88113260.7402
630.0133-0.02660.0022250671579.043320889298.25364570.4812
640.0156-0.02660.0022246820293.263620568357.7724535.2351
650.0177-0.01760.0015105497246.9498791437.24572965.0358
660.0191-0.02620.0022236942865.168819745238.76414443.5615
670.0177-0.03270.0027439537271.87836628105.98986052.1158
680.0183-0.04130.0034726998514.354260583209.52957783.5217
690.0194-0.05020.00421072627623.821689385635.31859454.3977
700.0209-0.08940.00753331752496.0774277646041.339816662.7141
710.0229-0.10060.00844006578453.1323333881537.76118272.4256
720.0236-0.11980.015750681388.5689479223449.047421891.1729



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')