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 computationFri, 11 Dec 2009 08:07:05 -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/2009/Dec/11/t1260544102jqb2bv7c9nvft9c.htm/, Retrieved Sun, 28 Apr 2024 23:30:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66310, Retrieved Sun, 28 Apr 2024 23:30:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact115
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Exponential Smoothing] [] [2009-11-27 15:04:36] [b98453cac15ba1066b407e146608df68]
- RMPD      [ARIMA Forecasting] [] [2009-12-11 15:07:05] [9f6463b67b1eb7bae5c03a796abf0348] [Current]
Feedback Forum

Post a new message
Dataseries X:
12610
10862
52929
56902
81776
87876
82103
72846
60632
33521
15342
7758
8668
13082
38157
58263
81153
88476
72329
75845
61108
37665
12755
2793
12935
19533
33404
52074
70735
69702
61656
82993
53990
32283
15686
2713
12842
19244
48488
54464
84192
84458
85793
75163
68212
49233
24302
5402
15058
33559
70358
85934
94452
129305
113882
107256
94274
57842
26611
14521




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66310&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])
362713-------
3712842-------
3819244-------
3948488-------
4054464-------
4184192-------
4284458-------
4385793-------
4475163-------
4568212-------
4649233-------
4724302-------
485402-------
491505821178.02734456.891837899.16270.23660.96780.83570.9678
503355927580.027310226.461444933.59310.24970.92140.82680.9939
517035856824.027338860.282674787.7720.06990.99440.81851
528593462800.027344246.159781353.89480.00730.21230.81071
539445292528.027373402.2364111653.81820.42180.75040.80351
5412930592794.027373112.9258112475.12871e-040.43440.79681
5511388294129.027373907.8594114350.19510.02783e-040.79051
5610725683499.027362751.8466104246.2080.01240.00210.78451
579427476548.027355287.844297808.21030.05110.00230.77891
585784257569.027335807.932279330.12240.49025e-040.77361
592661132638.027310387.293954888.76070.29770.01320.76860.9918
601452113738.0273-8991.799236467.85380.47310.13350.76390.7639

\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 & 2713 & - & - & - & - & - & - & - \tabularnewline
37 & 12842 & - & - & - & - & - & - & - \tabularnewline
38 & 19244 & - & - & - & - & - & - & - \tabularnewline
39 & 48488 & - & - & - & - & - & - & - \tabularnewline
40 & 54464 & - & - & - & - & - & - & - \tabularnewline
41 & 84192 & - & - & - & - & - & - & - \tabularnewline
42 & 84458 & - & - & - & - & - & - & - \tabularnewline
43 & 85793 & - & - & - & - & - & - & - \tabularnewline
44 & 75163 & - & - & - & - & - & - & - \tabularnewline
45 & 68212 & - & - & - & - & - & - & - \tabularnewline
46 & 49233 & - & - & - & - & - & - & - \tabularnewline
47 & 24302 & - & - & - & - & - & - & - \tabularnewline
48 & 5402 & - & - & - & - & - & - & - \tabularnewline
49 & 15058 & 21178.0273 & 4456.8918 & 37899.1627 & 0.2366 & 0.9678 & 0.8357 & 0.9678 \tabularnewline
50 & 33559 & 27580.0273 & 10226.4614 & 44933.5931 & 0.2497 & 0.9214 & 0.8268 & 0.9939 \tabularnewline
51 & 70358 & 56824.0273 & 38860.2826 & 74787.772 & 0.0699 & 0.9944 & 0.8185 & 1 \tabularnewline
52 & 85934 & 62800.0273 & 44246.1597 & 81353.8948 & 0.0073 & 0.2123 & 0.8107 & 1 \tabularnewline
53 & 94452 & 92528.0273 & 73402.2364 & 111653.8182 & 0.4218 & 0.7504 & 0.8035 & 1 \tabularnewline
54 & 129305 & 92794.0273 & 73112.9258 & 112475.1287 & 1e-04 & 0.4344 & 0.7968 & 1 \tabularnewline
55 & 113882 & 94129.0273 & 73907.8594 & 114350.1951 & 0.0278 & 3e-04 & 0.7905 & 1 \tabularnewline
56 & 107256 & 83499.0273 & 62751.8466 & 104246.208 & 0.0124 & 0.0021 & 0.7845 & 1 \tabularnewline
57 & 94274 & 76548.0273 & 55287.8442 & 97808.2103 & 0.0511 & 0.0023 & 0.7789 & 1 \tabularnewline
58 & 57842 & 57569.0273 & 35807.9322 & 79330.1224 & 0.4902 & 5e-04 & 0.7736 & 1 \tabularnewline
59 & 26611 & 32638.0273 & 10387.2939 & 54888.7607 & 0.2977 & 0.0132 & 0.7686 & 0.9918 \tabularnewline
60 & 14521 & 13738.0273 & -8991.7992 & 36467.8538 & 0.4731 & 0.1335 & 0.7639 & 0.7639 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66310&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]2713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]12842[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]19244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]48488[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]54464[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]84192[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]84458[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]85793[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]75163[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]68212[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]49233[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]24302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]5402[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]15058[/C][C]21178.0273[/C][C]4456.8918[/C][C]37899.1627[/C][C]0.2366[/C][C]0.9678[/C][C]0.8357[/C][C]0.9678[/C][/ROW]
[ROW][C]50[/C][C]33559[/C][C]27580.0273[/C][C]10226.4614[/C][C]44933.5931[/C][C]0.2497[/C][C]0.9214[/C][C]0.8268[/C][C]0.9939[/C][/ROW]
[ROW][C]51[/C][C]70358[/C][C]56824.0273[/C][C]38860.2826[/C][C]74787.772[/C][C]0.0699[/C][C]0.9944[/C][C]0.8185[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]85934[/C][C]62800.0273[/C][C]44246.1597[/C][C]81353.8948[/C][C]0.0073[/C][C]0.2123[/C][C]0.8107[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]94452[/C][C]92528.0273[/C][C]73402.2364[/C][C]111653.8182[/C][C]0.4218[/C][C]0.7504[/C][C]0.8035[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]129305[/C][C]92794.0273[/C][C]73112.9258[/C][C]112475.1287[/C][C]1e-04[/C][C]0.4344[/C][C]0.7968[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]113882[/C][C]94129.0273[/C][C]73907.8594[/C][C]114350.1951[/C][C]0.0278[/C][C]3e-04[/C][C]0.7905[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]107256[/C][C]83499.0273[/C][C]62751.8466[/C][C]104246.208[/C][C]0.0124[/C][C]0.0021[/C][C]0.7845[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]94274[/C][C]76548.0273[/C][C]55287.8442[/C][C]97808.2103[/C][C]0.0511[/C][C]0.0023[/C][C]0.7789[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]57842[/C][C]57569.0273[/C][C]35807.9322[/C][C]79330.1224[/C][C]0.4902[/C][C]5e-04[/C][C]0.7736[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]26611[/C][C]32638.0273[/C][C]10387.2939[/C][C]54888.7607[/C][C]0.2977[/C][C]0.0132[/C][C]0.7686[/C][C]0.9918[/C][/ROW]
[ROW][C]60[/C][C]14521[/C][C]13738.0273[/C][C]-8991.7992[/C][C]36467.8538[/C][C]0.4731[/C][C]0.1335[/C][C]0.7639[/C][C]0.7639[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66310&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66310&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])
362713-------
3712842-------
3819244-------
3948488-------
4054464-------
4184192-------
4284458-------
4385793-------
4475163-------
4568212-------
4649233-------
4724302-------
485402-------
491505821178.02734456.891837899.16270.23660.96780.83570.9678
503355927580.027310226.461444933.59310.24970.92140.82680.9939
517035856824.027338860.282674787.7720.06990.99440.81851
528593462800.027344246.159781353.89480.00730.21230.81071
539445292528.027373402.2364111653.81820.42180.75040.80351
5412930592794.027373112.9258112475.12871e-040.43440.79681
5511388294129.027373907.8594114350.19510.02783e-040.79051
5610725683499.027362751.8466104246.2080.01240.00210.78451
579427476548.027355287.844297808.21030.05110.00230.77891
585784257569.027335807.932279330.12240.49025e-040.77361
592661132638.027310387.293954888.76070.29770.01320.76860.9918
601452113738.0273-8991.799236467.85380.47310.13350.76390.7639







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.4028-0.289037454733.828300
500.3210.21680.252935748114.864336601424.34636049.9111
510.16130.23820.248183168417.761885457088.81819244.3003
520.15070.36840.2781535180694.1107197887990.141314067.2666
530.10550.02080.22663701671.0523159050726.323512611.5315
540.10820.39350.25441333051129.4356354717460.175518833.9444
550.10960.20980.2481390179931.5341359783527.512418967.9606
560.12680.28450.2526564393753.1279385359805.714419630.5834
570.14170.23160.2503314210109.1008377454283.868419428.1827
580.19290.00470.225774514.1094339716306.892518431.3946
590.3478-0.18470.22236325057.7554312135284.243717667.3508
600.84410.0570.2082613046.2905286175097.747616916.7106

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.4028 & -0.289 & 0 & 37454733.8283 & 0 & 0 \tabularnewline
50 & 0.321 & 0.2168 & 0.2529 & 35748114.8643 & 36601424.3463 & 6049.9111 \tabularnewline
51 & 0.1613 & 0.2382 & 0.248 & 183168417.7618 & 85457088.8181 & 9244.3003 \tabularnewline
52 & 0.1507 & 0.3684 & 0.2781 & 535180694.1107 & 197887990.1413 & 14067.2666 \tabularnewline
53 & 0.1055 & 0.0208 & 0.2266 & 3701671.0523 & 159050726.3235 & 12611.5315 \tabularnewline
54 & 0.1082 & 0.3935 & 0.2544 & 1333051129.4356 & 354717460.1755 & 18833.9444 \tabularnewline
55 & 0.1096 & 0.2098 & 0.2481 & 390179931.5341 & 359783527.5124 & 18967.9606 \tabularnewline
56 & 0.1268 & 0.2845 & 0.2526 & 564393753.1279 & 385359805.7144 & 19630.5834 \tabularnewline
57 & 0.1417 & 0.2316 & 0.2503 & 314210109.1008 & 377454283.8684 & 19428.1827 \tabularnewline
58 & 0.1929 & 0.0047 & 0.2257 & 74514.1094 & 339716306.8925 & 18431.3946 \tabularnewline
59 & 0.3478 & -0.1847 & 0.222 & 36325057.7554 & 312135284.2437 & 17667.3508 \tabularnewline
60 & 0.8441 & 0.057 & 0.2082 & 613046.2905 & 286175097.7476 & 16916.7106 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66310&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.4028[/C][C]-0.289[/C][C]0[/C][C]37454733.8283[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.321[/C][C]0.2168[/C][C]0.2529[/C][C]35748114.8643[/C][C]36601424.3463[/C][C]6049.9111[/C][/ROW]
[ROW][C]51[/C][C]0.1613[/C][C]0.2382[/C][C]0.248[/C][C]183168417.7618[/C][C]85457088.8181[/C][C]9244.3003[/C][/ROW]
[ROW][C]52[/C][C]0.1507[/C][C]0.3684[/C][C]0.2781[/C][C]535180694.1107[/C][C]197887990.1413[/C][C]14067.2666[/C][/ROW]
[ROW][C]53[/C][C]0.1055[/C][C]0.0208[/C][C]0.2266[/C][C]3701671.0523[/C][C]159050726.3235[/C][C]12611.5315[/C][/ROW]
[ROW][C]54[/C][C]0.1082[/C][C]0.3935[/C][C]0.2544[/C][C]1333051129.4356[/C][C]354717460.1755[/C][C]18833.9444[/C][/ROW]
[ROW][C]55[/C][C]0.1096[/C][C]0.2098[/C][C]0.2481[/C][C]390179931.5341[/C][C]359783527.5124[/C][C]18967.9606[/C][/ROW]
[ROW][C]56[/C][C]0.1268[/C][C]0.2845[/C][C]0.2526[/C][C]564393753.1279[/C][C]385359805.7144[/C][C]19630.5834[/C][/ROW]
[ROW][C]57[/C][C]0.1417[/C][C]0.2316[/C][C]0.2503[/C][C]314210109.1008[/C][C]377454283.8684[/C][C]19428.1827[/C][/ROW]
[ROW][C]58[/C][C]0.1929[/C][C]0.0047[/C][C]0.2257[/C][C]74514.1094[/C][C]339716306.8925[/C][C]18431.3946[/C][/ROW]
[ROW][C]59[/C][C]0.3478[/C][C]-0.1847[/C][C]0.222[/C][C]36325057.7554[/C][C]312135284.2437[/C][C]17667.3508[/C][/ROW]
[ROW][C]60[/C][C]0.8441[/C][C]0.057[/C][C]0.2082[/C][C]613046.2905[/C][C]286175097.7476[/C][C]16916.7106[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66310&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66310&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.4028-0.289037454733.828300
500.3210.21680.252935748114.864336601424.34636049.9111
510.16130.23820.248183168417.761885457088.81819244.3003
520.15070.36840.2781535180694.1107197887990.141314067.2666
530.10550.02080.22663701671.0523159050726.323512611.5315
540.10820.39350.25441333051129.4356354717460.175518833.9444
550.10960.20980.2481390179931.5341359783527.512418967.9606
560.12680.28450.2526564393753.1279385359805.714419630.5834
570.14170.23160.2503314210109.1008377454283.868419428.1827
580.19290.00470.225774514.1094339716306.892518431.3946
590.3478-0.18470.22236325057.7554312135284.243717667.3508
600.84410.0570.2082613046.2905286175097.747616916.7106



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')