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 computationMon, 22 Dec 2008 07:31:21 -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/22/t1229956345jamknpbyudge4mg.htm/, Retrieved Mon, 13 May 2024 08:36:02 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36088, Retrieved Mon, 13 May 2024 08:36:02 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact183
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [] [2008-12-12 12:13:32] [fad8a251ac01c156a8ae23a83577546f]
- RMPD  [(Partial) Autocorrelation Function] [Consumptiegoederen] [2008-12-12 13:39:25] [fad8a251ac01c156a8ae23a83577546f]
-   P     [(Partial) Autocorrelation Function] [auto corr cons] [2008-12-19 10:53:37] [fad8a251ac01c156a8ae23a83577546f]
-   P       [(Partial) Autocorrelation Function] [autocorr cons D] [2008-12-21 18:04:22] [fad8a251ac01c156a8ae23a83577546f]
- RMPD        [ARIMA Backward Selection] [Arima backw sel n...] [2008-12-22 10:23:57] [fad8a251ac01c156a8ae23a83577546f]
- RMPD            [ARIMA Forecasting] [forecast consumpt...] [2008-12-22 14:31:21] [fa8b44cd657c07c6ee11bb2476ca3f8d] [Current]
Feedback Forum

Post a new message
Dataseries X:
99,3
98,7
107,9
101,0
97,6
103,0
94,1
94,1
115,1
116,5
103,4
112,5
95,6
97,5
119,3
100,9
97,7
115,3
92,8
99,2
118,7
110,1
110,3
112,9
102,2
99,4
116,1
103,8
101,8
113,7
89,7
99,5
122,9
108,6
114,4
110,5
104,1
103,6
121,6
101,1
116,0
120,1
96,0
105,0
124,7
123,9
123,6
114,8
108,8
106,1
123,2
106,2
115,2
120,6
109,5
114,4
121,4
129,5
124,3
112,6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36088&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36088&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36088&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
36110.5-------
37104.1-------
38103.6-------
39121.6-------
40101.1-------
41116-------
42120.1-------
4396-------
44105-------
45124.7-------
46123.9-------
47123.6-------
48114.8-------
49108.8114.7543105.2696124.2390.10930.49620.98620.4962
50106.1109.626100.1408119.11110.23310.56780.89350.1425
51123.2126.5201116.7553136.28490.252610.83830.9907
52106.2108.407397.3485119.4660.34780.00440.90240.1286
53115.2120.4582109.3896131.52670.17590.99420.78510.8418
54120.6124.5594113.2019135.91690.24720.94690.77920.9539
55109.5101.080689.3451112.8160.07986e-040.80190.011
56114.4108.501896.7356120.2680.16290.4340.72020.1471
57121.4128.3699116.4143140.32550.12660.9890.72630.9869
58129.5127.5251115.4321139.61820.37450.83960.72160.9804
59124.3126.3951114.2632138.5270.36750.3080.67420.9695
60112.6117.6851105.4475129.92270.20770.14470.6780.678

\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 & 110.5 & - & - & - & - & - & - & - \tabularnewline
37 & 104.1 & - & - & - & - & - & - & - \tabularnewline
38 & 103.6 & - & - & - & - & - & - & - \tabularnewline
39 & 121.6 & - & - & - & - & - & - & - \tabularnewline
40 & 101.1 & - & - & - & - & - & - & - \tabularnewline
41 & 116 & - & - & - & - & - & - & - \tabularnewline
42 & 120.1 & - & - & - & - & - & - & - \tabularnewline
43 & 96 & - & - & - & - & - & - & - \tabularnewline
44 & 105 & - & - & - & - & - & - & - \tabularnewline
45 & 124.7 & - & - & - & - & - & - & - \tabularnewline
46 & 123.9 & - & - & - & - & - & - & - \tabularnewline
47 & 123.6 & - & - & - & - & - & - & - \tabularnewline
48 & 114.8 & - & - & - & - & - & - & - \tabularnewline
49 & 108.8 & 114.7543 & 105.2696 & 124.239 & 0.1093 & 0.4962 & 0.9862 & 0.4962 \tabularnewline
50 & 106.1 & 109.626 & 100.1408 & 119.1111 & 0.2331 & 0.5678 & 0.8935 & 0.1425 \tabularnewline
51 & 123.2 & 126.5201 & 116.7553 & 136.2849 & 0.2526 & 1 & 0.8383 & 0.9907 \tabularnewline
52 & 106.2 & 108.4073 & 97.3485 & 119.466 & 0.3478 & 0.0044 & 0.9024 & 0.1286 \tabularnewline
53 & 115.2 & 120.4582 & 109.3896 & 131.5267 & 0.1759 & 0.9942 & 0.7851 & 0.8418 \tabularnewline
54 & 120.6 & 124.5594 & 113.2019 & 135.9169 & 0.2472 & 0.9469 & 0.7792 & 0.9539 \tabularnewline
55 & 109.5 & 101.0806 & 89.3451 & 112.816 & 0.0798 & 6e-04 & 0.8019 & 0.011 \tabularnewline
56 & 114.4 & 108.5018 & 96.7356 & 120.268 & 0.1629 & 0.434 & 0.7202 & 0.1471 \tabularnewline
57 & 121.4 & 128.3699 & 116.4143 & 140.3255 & 0.1266 & 0.989 & 0.7263 & 0.9869 \tabularnewline
58 & 129.5 & 127.5251 & 115.4321 & 139.6182 & 0.3745 & 0.8396 & 0.7216 & 0.9804 \tabularnewline
59 & 124.3 & 126.3951 & 114.2632 & 138.527 & 0.3675 & 0.308 & 0.6742 & 0.9695 \tabularnewline
60 & 112.6 & 117.6851 & 105.4475 & 129.9227 & 0.2077 & 0.1447 & 0.678 & 0.678 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36088&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]110.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]104.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]103.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]121.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]116[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]120.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]124.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]123.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]114.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]108.8[/C][C]114.7543[/C][C]105.2696[/C][C]124.239[/C][C]0.1093[/C][C]0.4962[/C][C]0.9862[/C][C]0.4962[/C][/ROW]
[ROW][C]50[/C][C]106.1[/C][C]109.626[/C][C]100.1408[/C][C]119.1111[/C][C]0.2331[/C][C]0.5678[/C][C]0.8935[/C][C]0.1425[/C][/ROW]
[ROW][C]51[/C][C]123.2[/C][C]126.5201[/C][C]116.7553[/C][C]136.2849[/C][C]0.2526[/C][C]1[/C][C]0.8383[/C][C]0.9907[/C][/ROW]
[ROW][C]52[/C][C]106.2[/C][C]108.4073[/C][C]97.3485[/C][C]119.466[/C][C]0.3478[/C][C]0.0044[/C][C]0.9024[/C][C]0.1286[/C][/ROW]
[ROW][C]53[/C][C]115.2[/C][C]120.4582[/C][C]109.3896[/C][C]131.5267[/C][C]0.1759[/C][C]0.9942[/C][C]0.7851[/C][C]0.8418[/C][/ROW]
[ROW][C]54[/C][C]120.6[/C][C]124.5594[/C][C]113.2019[/C][C]135.9169[/C][C]0.2472[/C][C]0.9469[/C][C]0.7792[/C][C]0.9539[/C][/ROW]
[ROW][C]55[/C][C]109.5[/C][C]101.0806[/C][C]89.3451[/C][C]112.816[/C][C]0.0798[/C][C]6e-04[/C][C]0.8019[/C][C]0.011[/C][/ROW]
[ROW][C]56[/C][C]114.4[/C][C]108.5018[/C][C]96.7356[/C][C]120.268[/C][C]0.1629[/C][C]0.434[/C][C]0.7202[/C][C]0.1471[/C][/ROW]
[ROW][C]57[/C][C]121.4[/C][C]128.3699[/C][C]116.4143[/C][C]140.3255[/C][C]0.1266[/C][C]0.989[/C][C]0.7263[/C][C]0.9869[/C][/ROW]
[ROW][C]58[/C][C]129.5[/C][C]127.5251[/C][C]115.4321[/C][C]139.6182[/C][C]0.3745[/C][C]0.8396[/C][C]0.7216[/C][C]0.9804[/C][/ROW]
[ROW][C]59[/C][C]124.3[/C][C]126.3951[/C][C]114.2632[/C][C]138.527[/C][C]0.3675[/C][C]0.308[/C][C]0.6742[/C][C]0.9695[/C][/ROW]
[ROW][C]60[/C][C]112.6[/C][C]117.6851[/C][C]105.4475[/C][C]129.9227[/C][C]0.2077[/C][C]0.1447[/C][C]0.678[/C][C]0.678[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36088&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36088&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])
36110.5-------
37104.1-------
38103.6-------
39121.6-------
40101.1-------
41116-------
42120.1-------
4396-------
44105-------
45124.7-------
46123.9-------
47123.6-------
48114.8-------
49108.8114.7543105.2696124.2390.10930.49620.98620.4962
50106.1109.626100.1408119.11110.23310.56780.89350.1425
51123.2126.5201116.7553136.28490.252610.83830.9907
52106.2108.407397.3485119.4660.34780.00440.90240.1286
53115.2120.4582109.3896131.52670.17590.99420.78510.8418
54120.6124.5594113.2019135.91690.24720.94690.77920.9539
55109.5101.080689.3451112.8160.07986e-040.80190.011
56114.4108.501896.7356120.2680.16290.4340.72020.1471
57121.4128.3699116.4143140.32550.12660.9890.72630.9869
58129.5127.5251115.4321139.61820.37450.83960.72160.9804
59124.3126.3951114.2632138.5270.36750.3080.67420.9695
60112.6117.6851105.4475129.92270.20770.14470.6780.678







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0422-0.05190.004335.4542.95451.7189
500.0441-0.03220.002712.43241.0361.0179
510.0394-0.02620.002211.0230.91860.9584
520.052-0.02040.00174.87210.4060.6372
530.0469-0.04370.003627.64822.3041.5179
540.0465-0.03180.002615.67661.30641.143
550.05920.08330.006970.88685.90722.4305
560.05530.05440.004534.78862.8991.7027
570.0475-0.05430.004548.57964.04832.012
580.04840.01550.00133.90.3250.5701
590.049-0.01660.00144.38940.36580.6048
600.0531-0.04320.003625.85822.15491.4679

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0422 & -0.0519 & 0.0043 & 35.454 & 2.9545 & 1.7189 \tabularnewline
50 & 0.0441 & -0.0322 & 0.0027 & 12.4324 & 1.036 & 1.0179 \tabularnewline
51 & 0.0394 & -0.0262 & 0.0022 & 11.023 & 0.9186 & 0.9584 \tabularnewline
52 & 0.052 & -0.0204 & 0.0017 & 4.8721 & 0.406 & 0.6372 \tabularnewline
53 & 0.0469 & -0.0437 & 0.0036 & 27.6482 & 2.304 & 1.5179 \tabularnewline
54 & 0.0465 & -0.0318 & 0.0026 & 15.6766 & 1.3064 & 1.143 \tabularnewline
55 & 0.0592 & 0.0833 & 0.0069 & 70.8868 & 5.9072 & 2.4305 \tabularnewline
56 & 0.0553 & 0.0544 & 0.0045 & 34.7886 & 2.899 & 1.7027 \tabularnewline
57 & 0.0475 & -0.0543 & 0.0045 & 48.5796 & 4.0483 & 2.012 \tabularnewline
58 & 0.0484 & 0.0155 & 0.0013 & 3.9 & 0.325 & 0.5701 \tabularnewline
59 & 0.049 & -0.0166 & 0.0014 & 4.3894 & 0.3658 & 0.6048 \tabularnewline
60 & 0.0531 & -0.0432 & 0.0036 & 25.8582 & 2.1549 & 1.4679 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36088&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.0422[/C][C]-0.0519[/C][C]0.0043[/C][C]35.454[/C][C]2.9545[/C][C]1.7189[/C][/ROW]
[ROW][C]50[/C][C]0.0441[/C][C]-0.0322[/C][C]0.0027[/C][C]12.4324[/C][C]1.036[/C][C]1.0179[/C][/ROW]
[ROW][C]51[/C][C]0.0394[/C][C]-0.0262[/C][C]0.0022[/C][C]11.023[/C][C]0.9186[/C][C]0.9584[/C][/ROW]
[ROW][C]52[/C][C]0.052[/C][C]-0.0204[/C][C]0.0017[/C][C]4.8721[/C][C]0.406[/C][C]0.6372[/C][/ROW]
[ROW][C]53[/C][C]0.0469[/C][C]-0.0437[/C][C]0.0036[/C][C]27.6482[/C][C]2.304[/C][C]1.5179[/C][/ROW]
[ROW][C]54[/C][C]0.0465[/C][C]-0.0318[/C][C]0.0026[/C][C]15.6766[/C][C]1.3064[/C][C]1.143[/C][/ROW]
[ROW][C]55[/C][C]0.0592[/C][C]0.0833[/C][C]0.0069[/C][C]70.8868[/C][C]5.9072[/C][C]2.4305[/C][/ROW]
[ROW][C]56[/C][C]0.0553[/C][C]0.0544[/C][C]0.0045[/C][C]34.7886[/C][C]2.899[/C][C]1.7027[/C][/ROW]
[ROW][C]57[/C][C]0.0475[/C][C]-0.0543[/C][C]0.0045[/C][C]48.5796[/C][C]4.0483[/C][C]2.012[/C][/ROW]
[ROW][C]58[/C][C]0.0484[/C][C]0.0155[/C][C]0.0013[/C][C]3.9[/C][C]0.325[/C][C]0.5701[/C][/ROW]
[ROW][C]59[/C][C]0.049[/C][C]-0.0166[/C][C]0.0014[/C][C]4.3894[/C][C]0.3658[/C][C]0.6048[/C][/ROW]
[ROW][C]60[/C][C]0.0531[/C][C]-0.0432[/C][C]0.0036[/C][C]25.8582[/C][C]2.1549[/C][C]1.4679[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36088&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36088&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.0422-0.05190.004335.4542.95451.7189
500.0441-0.03220.002712.43241.0361.0179
510.0394-0.02620.002211.0230.91860.9584
520.052-0.02040.00174.87210.4060.6372
530.0469-0.04370.003627.64822.3041.5179
540.0465-0.03180.002615.67661.30641.143
550.05920.08330.006970.88685.90722.4305
560.05530.05440.004534.78862.8991.7027
570.0475-0.05430.004548.57964.04832.012
580.04840.01550.00133.90.3250.5701
590.049-0.01660.00144.38940.36580.6048
600.0531-0.04320.003625.85822.15491.4679



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