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, 06 Dec 2010 13:47:42 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/06/t1291643310qbqlshp10r91lpn.htm/, Retrieved Sun, 28 Apr 2024 22:19:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105600, Retrieved Sun, 28 Apr 2024 22:19:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact116
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   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [Ws 9 - ARIMA] [2010-12-06 13:47:42] [0829c729852d8a4b1b0c41cf0848af95] [Current]
-   PD          [ARIMA Forecasting] [PAPER - ARIMA model] [2010-12-19 13:37:50] [603e2f5305d3a2a4e062624458fa1155]
Feedback Forum

Post a new message
Dataseries X:
167.16
179.84
174.44
180.35
193.17
195.16
202.43
189.91
195.98
212.09
205.81
204.31
196.07
199.98
199.10
198.31
195.72
223.04
238.41
259.73
326.54
335.15
321.81
368.62
369.59
425.00
439.72
362.23
328.76
348.55
328.18
329.34
295.55
237.38
226.85
220.14
239.36
224.69
230.98
233.47
256.70
253.41
224.95
210.37
191.09
198.85
211.04
206.25
201.51
194.54
191.07
192.82
181.88
157.67
195.82
246.25
271.69
270.29




Summary of computational 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 computational 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=105600&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]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=105600&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105600&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 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[46])
34237.38-------
35226.85-------
36220.14-------
37239.36-------
38224.69-------
39230.98-------
40233.47-------
41256.7-------
42253.41-------
43224.95-------
44210.37-------
45191.09-------
46198.85-------
47211.04201.9446165.1406242.44780.32990.55950.11410.5595
48206.25201.9446144.7332268.66260.44970.39470.29650.5362
49201.51201.9446130.9559288.24730.49610.46110.19770.528
50194.54201.9446120.1436304.86690.44390.50330.33250.5235
51191.07201.9446111.1199319.69790.42820.5490.31440.5205
52192.82201.9446103.3269333.29830.44590.56450.3190.5184
53181.88201.944696.4475345.9850.39240.54940.22810.5168
54157.67201.944690.2813357.95850.2890.59950.2590.5155
55195.82201.944684.692369.35520.47140.69790.39380.5145
56246.25201.944679.5816380.27290.31310.52680.46310.5136
57271.69201.944674.8774390.78450.23460.32280.54490.5128
58270.29201.944670.5231400.94620.25040.24610.51220.5122

\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[46]) \tabularnewline
34 & 237.38 & - & - & - & - & - & - & - \tabularnewline
35 & 226.85 & - & - & - & - & - & - & - \tabularnewline
36 & 220.14 & - & - & - & - & - & - & - \tabularnewline
37 & 239.36 & - & - & - & - & - & - & - \tabularnewline
38 & 224.69 & - & - & - & - & - & - & - \tabularnewline
39 & 230.98 & - & - & - & - & - & - & - \tabularnewline
40 & 233.47 & - & - & - & - & - & - & - \tabularnewline
41 & 256.7 & - & - & - & - & - & - & - \tabularnewline
42 & 253.41 & - & - & - & - & - & - & - \tabularnewline
43 & 224.95 & - & - & - & - & - & - & - \tabularnewline
44 & 210.37 & - & - & - & - & - & - & - \tabularnewline
45 & 191.09 & - & - & - & - & - & - & - \tabularnewline
46 & 198.85 & - & - & - & - & - & - & - \tabularnewline
47 & 211.04 & 201.9446 & 165.1406 & 242.4478 & 0.3299 & 0.5595 & 0.1141 & 0.5595 \tabularnewline
48 & 206.25 & 201.9446 & 144.7332 & 268.6626 & 0.4497 & 0.3947 & 0.2965 & 0.5362 \tabularnewline
49 & 201.51 & 201.9446 & 130.9559 & 288.2473 & 0.4961 & 0.4611 & 0.1977 & 0.528 \tabularnewline
50 & 194.54 & 201.9446 & 120.1436 & 304.8669 & 0.4439 & 0.5033 & 0.3325 & 0.5235 \tabularnewline
51 & 191.07 & 201.9446 & 111.1199 & 319.6979 & 0.4282 & 0.549 & 0.3144 & 0.5205 \tabularnewline
52 & 192.82 & 201.9446 & 103.3269 & 333.2983 & 0.4459 & 0.5645 & 0.319 & 0.5184 \tabularnewline
53 & 181.88 & 201.9446 & 96.4475 & 345.985 & 0.3924 & 0.5494 & 0.2281 & 0.5168 \tabularnewline
54 & 157.67 & 201.9446 & 90.2813 & 357.9585 & 0.289 & 0.5995 & 0.259 & 0.5155 \tabularnewline
55 & 195.82 & 201.9446 & 84.692 & 369.3552 & 0.4714 & 0.6979 & 0.3938 & 0.5145 \tabularnewline
56 & 246.25 & 201.9446 & 79.5816 & 380.2729 & 0.3131 & 0.5268 & 0.4631 & 0.5136 \tabularnewline
57 & 271.69 & 201.9446 & 74.8774 & 390.7845 & 0.2346 & 0.3228 & 0.5449 & 0.5128 \tabularnewline
58 & 270.29 & 201.9446 & 70.5231 & 400.9462 & 0.2504 & 0.2461 & 0.5122 & 0.5122 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105600&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[46])[/C][/ROW]
[ROW][C]34[/C][C]237.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]226.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]220.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]239.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]224.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]230.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]233.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]256.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]253.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]224.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]210.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]191.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]198.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]211.04[/C][C]201.9446[/C][C]165.1406[/C][C]242.4478[/C][C]0.3299[/C][C]0.5595[/C][C]0.1141[/C][C]0.5595[/C][/ROW]
[ROW][C]48[/C][C]206.25[/C][C]201.9446[/C][C]144.7332[/C][C]268.6626[/C][C]0.4497[/C][C]0.3947[/C][C]0.2965[/C][C]0.5362[/C][/ROW]
[ROW][C]49[/C][C]201.51[/C][C]201.9446[/C][C]130.9559[/C][C]288.2473[/C][C]0.4961[/C][C]0.4611[/C][C]0.1977[/C][C]0.528[/C][/ROW]
[ROW][C]50[/C][C]194.54[/C][C]201.9446[/C][C]120.1436[/C][C]304.8669[/C][C]0.4439[/C][C]0.5033[/C][C]0.3325[/C][C]0.5235[/C][/ROW]
[ROW][C]51[/C][C]191.07[/C][C]201.9446[/C][C]111.1199[/C][C]319.6979[/C][C]0.4282[/C][C]0.549[/C][C]0.3144[/C][C]0.5205[/C][/ROW]
[ROW][C]52[/C][C]192.82[/C][C]201.9446[/C][C]103.3269[/C][C]333.2983[/C][C]0.4459[/C][C]0.5645[/C][C]0.319[/C][C]0.5184[/C][/ROW]
[ROW][C]53[/C][C]181.88[/C][C]201.9446[/C][C]96.4475[/C][C]345.985[/C][C]0.3924[/C][C]0.5494[/C][C]0.2281[/C][C]0.5168[/C][/ROW]
[ROW][C]54[/C][C]157.67[/C][C]201.9446[/C][C]90.2813[/C][C]357.9585[/C][C]0.289[/C][C]0.5995[/C][C]0.259[/C][C]0.5155[/C][/ROW]
[ROW][C]55[/C][C]195.82[/C][C]201.9446[/C][C]84.692[/C][C]369.3552[/C][C]0.4714[/C][C]0.6979[/C][C]0.3938[/C][C]0.5145[/C][/ROW]
[ROW][C]56[/C][C]246.25[/C][C]201.9446[/C][C]79.5816[/C][C]380.2729[/C][C]0.3131[/C][C]0.5268[/C][C]0.4631[/C][C]0.5136[/C][/ROW]
[ROW][C]57[/C][C]271.69[/C][C]201.9446[/C][C]74.8774[/C][C]390.7845[/C][C]0.2346[/C][C]0.3228[/C][C]0.5449[/C][C]0.5128[/C][/ROW]
[ROW][C]58[/C][C]270.29[/C][C]201.9446[/C][C]70.5231[/C][C]400.9462[/C][C]0.2504[/C][C]0.2461[/C][C]0.5122[/C][C]0.5122[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105600&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105600&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[46])
34237.38-------
35226.85-------
36220.14-------
37239.36-------
38224.69-------
39230.98-------
40233.47-------
41256.7-------
42253.41-------
43224.95-------
44210.37-------
45191.09-------
46198.85-------
47211.04201.9446165.1406242.44780.32990.55950.11410.5595
48206.25201.9446144.7332268.66260.44970.39470.29650.5362
49201.51201.9446130.9559288.24730.49610.46110.19770.528
50194.54201.9446120.1436304.86690.44390.50330.33250.5235
51191.07201.9446111.1199319.69790.42820.5490.31440.5205
52192.82201.9446103.3269333.29830.44590.56450.3190.5184
53181.88201.944696.4475345.9850.39240.54940.22810.5168
54157.67201.944690.2813357.95850.2890.59950.2590.5155
55195.82201.944684.692369.35520.47140.69790.39380.5145
56246.25201.944679.5816380.27290.31310.52680.46310.5136
57271.69201.944674.8774390.78450.23460.32280.54490.5128
58270.29201.944670.5231400.94620.25040.24610.51220.5122







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.10230.045082.726800
480.16860.02130.033218.536750.63177.1156
490.218-0.00220.02280.188933.81745.8153
500.26-0.03670.026354.827739.076.2506
510.2975-0.05380.0318118.256454.90737.4099
520.3319-0.04520.03483.257859.63247.7222
530.3639-0.09940.0434402.5871108.625910.4224
540.3942-0.21920.06541960.2379340.077418.4412
550.423-0.03030.061537.5104306.458817.506
560.45050.21940.07731962.9708472.1121.7281
570.47710.34540.10164864.4245871.411429.5197
580.50280.33840.12144671.09731188.051934.4681

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
47 & 0.1023 & 0.045 & 0 & 82.7268 & 0 & 0 \tabularnewline
48 & 0.1686 & 0.0213 & 0.0332 & 18.5367 & 50.6317 & 7.1156 \tabularnewline
49 & 0.218 & -0.0022 & 0.0228 & 0.1889 & 33.8174 & 5.8153 \tabularnewline
50 & 0.26 & -0.0367 & 0.0263 & 54.8277 & 39.07 & 6.2506 \tabularnewline
51 & 0.2975 & -0.0538 & 0.0318 & 118.2564 & 54.9073 & 7.4099 \tabularnewline
52 & 0.3319 & -0.0452 & 0.034 & 83.2578 & 59.6324 & 7.7222 \tabularnewline
53 & 0.3639 & -0.0994 & 0.0434 & 402.5871 & 108.6259 & 10.4224 \tabularnewline
54 & 0.3942 & -0.2192 & 0.0654 & 1960.2379 & 340.0774 & 18.4412 \tabularnewline
55 & 0.423 & -0.0303 & 0.0615 & 37.5104 & 306.4588 & 17.506 \tabularnewline
56 & 0.4505 & 0.2194 & 0.0773 & 1962.9708 & 472.11 & 21.7281 \tabularnewline
57 & 0.4771 & 0.3454 & 0.1016 & 4864.4245 & 871.4114 & 29.5197 \tabularnewline
58 & 0.5028 & 0.3384 & 0.1214 & 4671.0973 & 1188.0519 & 34.4681 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105600&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]47[/C][C]0.1023[/C][C]0.045[/C][C]0[/C][C]82.7268[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]0.1686[/C][C]0.0213[/C][C]0.0332[/C][C]18.5367[/C][C]50.6317[/C][C]7.1156[/C][/ROW]
[ROW][C]49[/C][C]0.218[/C][C]-0.0022[/C][C]0.0228[/C][C]0.1889[/C][C]33.8174[/C][C]5.8153[/C][/ROW]
[ROW][C]50[/C][C]0.26[/C][C]-0.0367[/C][C]0.0263[/C][C]54.8277[/C][C]39.07[/C][C]6.2506[/C][/ROW]
[ROW][C]51[/C][C]0.2975[/C][C]-0.0538[/C][C]0.0318[/C][C]118.2564[/C][C]54.9073[/C][C]7.4099[/C][/ROW]
[ROW][C]52[/C][C]0.3319[/C][C]-0.0452[/C][C]0.034[/C][C]83.2578[/C][C]59.6324[/C][C]7.7222[/C][/ROW]
[ROW][C]53[/C][C]0.3639[/C][C]-0.0994[/C][C]0.0434[/C][C]402.5871[/C][C]108.6259[/C][C]10.4224[/C][/ROW]
[ROW][C]54[/C][C]0.3942[/C][C]-0.2192[/C][C]0.0654[/C][C]1960.2379[/C][C]340.0774[/C][C]18.4412[/C][/ROW]
[ROW][C]55[/C][C]0.423[/C][C]-0.0303[/C][C]0.0615[/C][C]37.5104[/C][C]306.4588[/C][C]17.506[/C][/ROW]
[ROW][C]56[/C][C]0.4505[/C][C]0.2194[/C][C]0.0773[/C][C]1962.9708[/C][C]472.11[/C][C]21.7281[/C][/ROW]
[ROW][C]57[/C][C]0.4771[/C][C]0.3454[/C][C]0.1016[/C][C]4864.4245[/C][C]871.4114[/C][C]29.5197[/C][/ROW]
[ROW][C]58[/C][C]0.5028[/C][C]0.3384[/C][C]0.1214[/C][C]4671.0973[/C][C]1188.0519[/C][C]34.4681[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105600&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105600&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
470.10230.045082.726800
480.16860.02130.033218.536750.63177.1156
490.218-0.00220.02280.188933.81745.8153
500.26-0.03670.026354.827739.076.2506
510.2975-0.05380.0318118.256454.90737.4099
520.3319-0.04520.03483.257859.63247.7222
530.3639-0.09940.0434402.5871108.625910.4224
540.3942-0.21920.06541960.2379340.077418.4412
550.423-0.03030.061537.5104306.458817.506
560.45050.21940.07731962.9708472.1121.7281
570.47710.34540.10164864.4245871.411429.5197
580.50280.33840.12144671.09731188.051934.4681



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