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 computationSat, 12 Dec 2009 04:53:20 -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/12/t1260618934wysr2wet0o00b7w.htm/, Retrieved Mon, 29 Apr 2024 15:18:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66912, Retrieved Mon, 29 Apr 2024 15:18:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-    D        [ARIMA Forecasting] [WS 10 ] [2009-12-12 11:53:20] [17416e80e7873ecccac25c455c5f767e] [Current]
-   PD          [ARIMA Forecasting] [] [2009-12-19 16:24:22] [3425351e86519d261a643e224a0c8ee1]
-   P             [ARIMA Forecasting] [] [2009-12-20 10:24:37] [3425351e86519d261a643e224a0c8ee1]
-   PD              [ARIMA Forecasting] [ARIMA forecasting] [2009-12-21 15:59:35] [76ab39dc7a55316678260825bd5ad46c]
Feedback Forum

Post a new message
Dataseries X:
153,4
145
137,7
148,3
152,2
169,4
168,6
161,1
174,1
179
190,6
190
181,6
174,8
180,5
196,8
193,8
197
216,3
221,4
217,9
229,7
227,4
204,2
196,6
198,8
207,5
190,7
201,6
210,5
223,5
223,8
231,2
244
234,7
250,2
265,7
287,6
283,3
295,4
312,3
333,8
347,7
383,2
407,1
413,6
362,7
321,9
239,4
191
159,7
163,4
157,6
166,2
176,7
198,3
226,2
216,2
235,9
226,9




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66912&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])
36250.2-------
37265.7-------
38287.6-------
39283.3-------
40295.4-------
41312.3-------
42333.8-------
43347.7-------
44383.2-------
45407.1-------
46413.6-------
47362.7-------
48321.9-------
49239.4281.1249.0465313.15350.00540.00630.82680.0063
50191240.3168.6261311.97390.08880.50980.09790.0128
51159.7199.579.5666319.43340.25770.55520.08540.0227
52163.4158.7-16.8645334.26450.47910.49550.06350.0342
53157.6117.9-119.8154355.61540.37170.35380.05450.0463
54166.277.1-228.6713382.87130.2840.30290.04990.0583
55176.736.3-342.9626415.56260.2340.2510.05380.07
56198.3-4.5-462.3161453.31610.19260.21890.04850.0811
57226.2-45.3-586.426495.8260.16270.18880.05060.0918
58216.2-86.1-715.0358542.83580.17310.16520.05970.1018
59235.9-126.9-847.9265594.12650.1620.17550.09160.1112
60226.9-167.7-984.9081649.50810.1720.16650.12010.1201

\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 & 250.2 & - & - & - & - & - & - & - \tabularnewline
37 & 265.7 & - & - & - & - & - & - & - \tabularnewline
38 & 287.6 & - & - & - & - & - & - & - \tabularnewline
39 & 283.3 & - & - & - & - & - & - & - \tabularnewline
40 & 295.4 & - & - & - & - & - & - & - \tabularnewline
41 & 312.3 & - & - & - & - & - & - & - \tabularnewline
42 & 333.8 & - & - & - & - & - & - & - \tabularnewline
43 & 347.7 & - & - & - & - & - & - & - \tabularnewline
44 & 383.2 & - & - & - & - & - & - & - \tabularnewline
45 & 407.1 & - & - & - & - & - & - & - \tabularnewline
46 & 413.6 & - & - & - & - & - & - & - \tabularnewline
47 & 362.7 & - & - & - & - & - & - & - \tabularnewline
48 & 321.9 & - & - & - & - & - & - & - \tabularnewline
49 & 239.4 & 281.1 & 249.0465 & 313.1535 & 0.0054 & 0.0063 & 0.8268 & 0.0063 \tabularnewline
50 & 191 & 240.3 & 168.6261 & 311.9739 & 0.0888 & 0.5098 & 0.0979 & 0.0128 \tabularnewline
51 & 159.7 & 199.5 & 79.5666 & 319.4334 & 0.2577 & 0.5552 & 0.0854 & 0.0227 \tabularnewline
52 & 163.4 & 158.7 & -16.8645 & 334.2645 & 0.4791 & 0.4955 & 0.0635 & 0.0342 \tabularnewline
53 & 157.6 & 117.9 & -119.8154 & 355.6154 & 0.3717 & 0.3538 & 0.0545 & 0.0463 \tabularnewline
54 & 166.2 & 77.1 & -228.6713 & 382.8713 & 0.284 & 0.3029 & 0.0499 & 0.0583 \tabularnewline
55 & 176.7 & 36.3 & -342.9626 & 415.5626 & 0.234 & 0.251 & 0.0538 & 0.07 \tabularnewline
56 & 198.3 & -4.5 & -462.3161 & 453.3161 & 0.1926 & 0.2189 & 0.0485 & 0.0811 \tabularnewline
57 & 226.2 & -45.3 & -586.426 & 495.826 & 0.1627 & 0.1888 & 0.0506 & 0.0918 \tabularnewline
58 & 216.2 & -86.1 & -715.0358 & 542.8358 & 0.1731 & 0.1652 & 0.0597 & 0.1018 \tabularnewline
59 & 235.9 & -126.9 & -847.9265 & 594.1265 & 0.162 & 0.1755 & 0.0916 & 0.1112 \tabularnewline
60 & 226.9 & -167.7 & -984.9081 & 649.5081 & 0.172 & 0.1665 & 0.1201 & 0.1201 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66912&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]250.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]265.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]287.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]283.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]295.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]312.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]333.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]347.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]383.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]407.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]413.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]362.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]321.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]239.4[/C][C]281.1[/C][C]249.0465[/C][C]313.1535[/C][C]0.0054[/C][C]0.0063[/C][C]0.8268[/C][C]0.0063[/C][/ROW]
[ROW][C]50[/C][C]191[/C][C]240.3[/C][C]168.6261[/C][C]311.9739[/C][C]0.0888[/C][C]0.5098[/C][C]0.0979[/C][C]0.0128[/C][/ROW]
[ROW][C]51[/C][C]159.7[/C][C]199.5[/C][C]79.5666[/C][C]319.4334[/C][C]0.2577[/C][C]0.5552[/C][C]0.0854[/C][C]0.0227[/C][/ROW]
[ROW][C]52[/C][C]163.4[/C][C]158.7[/C][C]-16.8645[/C][C]334.2645[/C][C]0.4791[/C][C]0.4955[/C][C]0.0635[/C][C]0.0342[/C][/ROW]
[ROW][C]53[/C][C]157.6[/C][C]117.9[/C][C]-119.8154[/C][C]355.6154[/C][C]0.3717[/C][C]0.3538[/C][C]0.0545[/C][C]0.0463[/C][/ROW]
[ROW][C]54[/C][C]166.2[/C][C]77.1[/C][C]-228.6713[/C][C]382.8713[/C][C]0.284[/C][C]0.3029[/C][C]0.0499[/C][C]0.0583[/C][/ROW]
[ROW][C]55[/C][C]176.7[/C][C]36.3[/C][C]-342.9626[/C][C]415.5626[/C][C]0.234[/C][C]0.251[/C][C]0.0538[/C][C]0.07[/C][/ROW]
[ROW][C]56[/C][C]198.3[/C][C]-4.5[/C][C]-462.3161[/C][C]453.3161[/C][C]0.1926[/C][C]0.2189[/C][C]0.0485[/C][C]0.0811[/C][/ROW]
[ROW][C]57[/C][C]226.2[/C][C]-45.3[/C][C]-586.426[/C][C]495.826[/C][C]0.1627[/C][C]0.1888[/C][C]0.0506[/C][C]0.0918[/C][/ROW]
[ROW][C]58[/C][C]216.2[/C][C]-86.1[/C][C]-715.0358[/C][C]542.8358[/C][C]0.1731[/C][C]0.1652[/C][C]0.0597[/C][C]0.1018[/C][/ROW]
[ROW][C]59[/C][C]235.9[/C][C]-126.9[/C][C]-847.9265[/C][C]594.1265[/C][C]0.162[/C][C]0.1755[/C][C]0.0916[/C][C]0.1112[/C][/ROW]
[ROW][C]60[/C][C]226.9[/C][C]-167.7[/C][C]-984.9081[/C][C]649.5081[/C][C]0.172[/C][C]0.1665[/C][C]0.1201[/C][C]0.1201[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66912&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66912&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])
36250.2-------
37265.7-------
38287.6-------
39283.3-------
40295.4-------
41312.3-------
42333.8-------
43347.7-------
44383.2-------
45407.1-------
46413.6-------
47362.7-------
48321.9-------
49239.4281.1249.0465313.15350.00540.00630.82680.0063
50191240.3168.6261311.97390.08880.50980.09790.0128
51159.7199.579.5666319.43340.25770.55520.08540.0227
52163.4158.7-16.8645334.26450.47910.49550.06350.0342
53157.6117.9-119.8154355.61540.37170.35380.05450.0463
54166.277.1-228.6713382.87130.2840.30290.04990.0583
55176.736.3-342.9626415.56260.2340.2510.05380.07
56198.3-4.5-462.3161453.31610.19260.21890.04850.0811
57226.2-45.3-586.426495.8260.16270.18880.05060.0918
58216.2-86.1-715.0358542.83580.17310.16520.05970.1018
59235.9-126.9-847.9265594.12650.1620.17550.09160.1112
60226.9-167.7-984.9081649.50810.1720.16650.12010.1201







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0582-0.14830.01241738.89144.907512.0378
500.1522-0.20520.01712430.49202.540814.2317
510.3067-0.19950.01661584.04132.003311.4893
520.56440.02960.002522.091.84081.3568
531.02870.33670.02811576.09131.340811.4604
542.02341.15560.09637938.81661.567525.721
555.33063.86780.322319712.161642.6840.53
56-51.9066-45.06673.755641127.843427.3258.5433
57-6.0946-5.99340.499473712.256142.687578.3753
58-3.7269-3.5110.292691385.297615.440887.2665
59-2.8989-2.85890.2382131623.8410968.6533104.7313
60-2.4862-2.3530.1961155709.1612975.7633113.9112

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0582 & -0.1483 & 0.0124 & 1738.89 & 144.9075 & 12.0378 \tabularnewline
50 & 0.1522 & -0.2052 & 0.0171 & 2430.49 & 202.5408 & 14.2317 \tabularnewline
51 & 0.3067 & -0.1995 & 0.0166 & 1584.04 & 132.0033 & 11.4893 \tabularnewline
52 & 0.5644 & 0.0296 & 0.0025 & 22.09 & 1.8408 & 1.3568 \tabularnewline
53 & 1.0287 & 0.3367 & 0.0281 & 1576.09 & 131.3408 & 11.4604 \tabularnewline
54 & 2.0234 & 1.1556 & 0.0963 & 7938.81 & 661.5675 & 25.721 \tabularnewline
55 & 5.3306 & 3.8678 & 0.3223 & 19712.16 & 1642.68 & 40.53 \tabularnewline
56 & -51.9066 & -45.0667 & 3.7556 & 41127.84 & 3427.32 & 58.5433 \tabularnewline
57 & -6.0946 & -5.9934 & 0.4994 & 73712.25 & 6142.6875 & 78.3753 \tabularnewline
58 & -3.7269 & -3.511 & 0.2926 & 91385.29 & 7615.4408 & 87.2665 \tabularnewline
59 & -2.8989 & -2.8589 & 0.2382 & 131623.84 & 10968.6533 & 104.7313 \tabularnewline
60 & -2.4862 & -2.353 & 0.1961 & 155709.16 & 12975.7633 & 113.9112 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66912&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.0582[/C][C]-0.1483[/C][C]0.0124[/C][C]1738.89[/C][C]144.9075[/C][C]12.0378[/C][/ROW]
[ROW][C]50[/C][C]0.1522[/C][C]-0.2052[/C][C]0.0171[/C][C]2430.49[/C][C]202.5408[/C][C]14.2317[/C][/ROW]
[ROW][C]51[/C][C]0.3067[/C][C]-0.1995[/C][C]0.0166[/C][C]1584.04[/C][C]132.0033[/C][C]11.4893[/C][/ROW]
[ROW][C]52[/C][C]0.5644[/C][C]0.0296[/C][C]0.0025[/C][C]22.09[/C][C]1.8408[/C][C]1.3568[/C][/ROW]
[ROW][C]53[/C][C]1.0287[/C][C]0.3367[/C][C]0.0281[/C][C]1576.09[/C][C]131.3408[/C][C]11.4604[/C][/ROW]
[ROW][C]54[/C][C]2.0234[/C][C]1.1556[/C][C]0.0963[/C][C]7938.81[/C][C]661.5675[/C][C]25.721[/C][/ROW]
[ROW][C]55[/C][C]5.3306[/C][C]3.8678[/C][C]0.3223[/C][C]19712.16[/C][C]1642.68[/C][C]40.53[/C][/ROW]
[ROW][C]56[/C][C]-51.9066[/C][C]-45.0667[/C][C]3.7556[/C][C]41127.84[/C][C]3427.32[/C][C]58.5433[/C][/ROW]
[ROW][C]57[/C][C]-6.0946[/C][C]-5.9934[/C][C]0.4994[/C][C]73712.25[/C][C]6142.6875[/C][C]78.3753[/C][/ROW]
[ROW][C]58[/C][C]-3.7269[/C][C]-3.511[/C][C]0.2926[/C][C]91385.29[/C][C]7615.4408[/C][C]87.2665[/C][/ROW]
[ROW][C]59[/C][C]-2.8989[/C][C]-2.8589[/C][C]0.2382[/C][C]131623.84[/C][C]10968.6533[/C][C]104.7313[/C][/ROW]
[ROW][C]60[/C][C]-2.4862[/C][C]-2.353[/C][C]0.1961[/C][C]155709.16[/C][C]12975.7633[/C][C]113.9112[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66912&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66912&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.0582-0.14830.01241738.89144.907512.0378
500.1522-0.20520.01712430.49202.540814.2317
510.3067-0.19950.01661584.04132.003311.4893
520.56440.02960.002522.091.84081.3568
531.02870.33670.02811576.09131.340811.4604
542.02341.15560.09637938.81661.567525.721
555.33063.86780.322319712.161642.6840.53
56-51.9066-45.06673.755641127.843427.3258.5433
57-6.0946-5.99340.499473712.256142.687578.3753
58-3.7269-3.5110.292691385.297615.440887.2665
59-2.8989-2.85890.2382131623.8410968.6533104.7313
60-2.4862-2.3530.1961155709.1612975.7633113.9112



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