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 computationTue, 21 Dec 2010 17:55:25 +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/21/t12929542204xx81lhnit4d95c.htm/, Retrieved Fri, 17 May 2024 07:55:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113789, Retrieved Fri, 17 May 2024 07:55:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
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] [] [2010-12-14 16:23:21] [897115520fe7b6114489bc0eeed64548]
-             [ARIMA Forecasting] [] [2010-12-15 11:20:23] [bfba28641a1925a39268a5d6ad3b00f2]
-   PD            [ARIMA Forecasting] [] [2010-12-21 17:55:25] [d1991ab4912b5ede0ff54c26afa5d84c] [Current]
Feedback Forum

Post a new message
Dataseries X:
77.33
75.28
77.43
73.25
68.41
72.87
65.61
69.04
57.84
51.07
47.48
44.01
45.29
43.8
55.48
75.73
101.42
116.07
135.81
132.69
124.05
109.65
102.79
94.09
92.23
90.6
92.6
81.71
76.36
71.44
75.26
70.3
67.68
67.65
61.92
58.34
55.04
62.5
59.44
60.03
64.24
74.33
74.41
69.75
72.03
68.18
63.01
61.71
63.52




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113789&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[37])
2592.23-------
2690.6-------
2792.6-------
2881.71-------
2976.36-------
3071.44-------
3175.26-------
3270.3-------
3367.68-------
3467.65-------
3561.92-------
3658.34-------
3755.04-------
3862.552.24638.001166.4910.07910.350300.3503
3959.4449.072120.643377.50090.23740.17730.00130.3404
4060.0346.1835-1.17793.54390.28330.29160.07070.357
4164.2443.0806-25.0402111.20140.27130.31290.16920.3654
4274.3340.1386-51.7668132.0440.23290.30360.25220.3753
4374.4137.0758-80.4112154.56280.26670.26710.26210.3822
4469.7534.1037-111.2666179.4740.31540.29340.31280.3889
4572.0331.0635-143.8852206.01220.32310.33240.34080.3941
4668.1828.0745-178.3625234.51140.35170.33820.35360.399
4763.0125.047-214.4618264.55580.3780.36210.38140.4031
4861.7122.0484-252.1992296.29590.38840.38490.39770.4068
4963.5219.0281-291.4373329.49350.38940.39380.41010.4101

\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[37]) \tabularnewline
25 & 92.23 & - & - & - & - & - & - & - \tabularnewline
26 & 90.6 & - & - & - & - & - & - & - \tabularnewline
27 & 92.6 & - & - & - & - & - & - & - \tabularnewline
28 & 81.71 & - & - & - & - & - & - & - \tabularnewline
29 & 76.36 & - & - & - & - & - & - & - \tabularnewline
30 & 71.44 & - & - & - & - & - & - & - \tabularnewline
31 & 75.26 & - & - & - & - & - & - & - \tabularnewline
32 & 70.3 & - & - & - & - & - & - & - \tabularnewline
33 & 67.68 & - & - & - & - & - & - & - \tabularnewline
34 & 67.65 & - & - & - & - & - & - & - \tabularnewline
35 & 61.92 & - & - & - & - & - & - & - \tabularnewline
36 & 58.34 & - & - & - & - & - & - & - \tabularnewline
37 & 55.04 & - & - & - & - & - & - & - \tabularnewline
38 & 62.5 & 52.246 & 38.0011 & 66.491 & 0.0791 & 0.3503 & 0 & 0.3503 \tabularnewline
39 & 59.44 & 49.0721 & 20.6433 & 77.5009 & 0.2374 & 0.1773 & 0.0013 & 0.3404 \tabularnewline
40 & 60.03 & 46.1835 & -1.177 & 93.5439 & 0.2833 & 0.2916 & 0.0707 & 0.357 \tabularnewline
41 & 64.24 & 43.0806 & -25.0402 & 111.2014 & 0.2713 & 0.3129 & 0.1692 & 0.3654 \tabularnewline
42 & 74.33 & 40.1386 & -51.7668 & 132.044 & 0.2329 & 0.3036 & 0.2522 & 0.3753 \tabularnewline
43 & 74.41 & 37.0758 & -80.4112 & 154.5628 & 0.2667 & 0.2671 & 0.2621 & 0.3822 \tabularnewline
44 & 69.75 & 34.1037 & -111.2666 & 179.474 & 0.3154 & 0.2934 & 0.3128 & 0.3889 \tabularnewline
45 & 72.03 & 31.0635 & -143.8852 & 206.0122 & 0.3231 & 0.3324 & 0.3408 & 0.3941 \tabularnewline
46 & 68.18 & 28.0745 & -178.3625 & 234.5114 & 0.3517 & 0.3382 & 0.3536 & 0.399 \tabularnewline
47 & 63.01 & 25.047 & -214.4618 & 264.5558 & 0.378 & 0.3621 & 0.3814 & 0.4031 \tabularnewline
48 & 61.71 & 22.0484 & -252.1992 & 296.2959 & 0.3884 & 0.3849 & 0.3977 & 0.4068 \tabularnewline
49 & 63.52 & 19.0281 & -291.4373 & 329.4935 & 0.3894 & 0.3938 & 0.4101 & 0.4101 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113789&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[37])[/C][/ROW]
[ROW][C]25[/C][C]92.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]90.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]92.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]81.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]76.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]71.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]75.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]70.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]67.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]67.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]61.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]58.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]55.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]62.5[/C][C]52.246[/C][C]38.0011[/C][C]66.491[/C][C]0.0791[/C][C]0.3503[/C][C]0[/C][C]0.3503[/C][/ROW]
[ROW][C]39[/C][C]59.44[/C][C]49.0721[/C][C]20.6433[/C][C]77.5009[/C][C]0.2374[/C][C]0.1773[/C][C]0.0013[/C][C]0.3404[/C][/ROW]
[ROW][C]40[/C][C]60.03[/C][C]46.1835[/C][C]-1.177[/C][C]93.5439[/C][C]0.2833[/C][C]0.2916[/C][C]0.0707[/C][C]0.357[/C][/ROW]
[ROW][C]41[/C][C]64.24[/C][C]43.0806[/C][C]-25.0402[/C][C]111.2014[/C][C]0.2713[/C][C]0.3129[/C][C]0.1692[/C][C]0.3654[/C][/ROW]
[ROW][C]42[/C][C]74.33[/C][C]40.1386[/C][C]-51.7668[/C][C]132.044[/C][C]0.2329[/C][C]0.3036[/C][C]0.2522[/C][C]0.3753[/C][/ROW]
[ROW][C]43[/C][C]74.41[/C][C]37.0758[/C][C]-80.4112[/C][C]154.5628[/C][C]0.2667[/C][C]0.2671[/C][C]0.2621[/C][C]0.3822[/C][/ROW]
[ROW][C]44[/C][C]69.75[/C][C]34.1037[/C][C]-111.2666[/C][C]179.474[/C][C]0.3154[/C][C]0.2934[/C][C]0.3128[/C][C]0.3889[/C][/ROW]
[ROW][C]45[/C][C]72.03[/C][C]31.0635[/C][C]-143.8852[/C][C]206.0122[/C][C]0.3231[/C][C]0.3324[/C][C]0.3408[/C][C]0.3941[/C][/ROW]
[ROW][C]46[/C][C]68.18[/C][C]28.0745[/C][C]-178.3625[/C][C]234.5114[/C][C]0.3517[/C][C]0.3382[/C][C]0.3536[/C][C]0.399[/C][/ROW]
[ROW][C]47[/C][C]63.01[/C][C]25.047[/C][C]-214.4618[/C][C]264.5558[/C][C]0.378[/C][C]0.3621[/C][C]0.3814[/C][C]0.4031[/C][/ROW]
[ROW][C]48[/C][C]61.71[/C][C]22.0484[/C][C]-252.1992[/C][C]296.2959[/C][C]0.3884[/C][C]0.3849[/C][C]0.3977[/C][C]0.4068[/C][/ROW]
[ROW][C]49[/C][C]63.52[/C][C]19.0281[/C][C]-291.4373[/C][C]329.4935[/C][C]0.3894[/C][C]0.3938[/C][C]0.4101[/C][C]0.4101[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113789&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113789&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[37])
2592.23-------
2690.6-------
2792.6-------
2881.71-------
2976.36-------
3071.44-------
3175.26-------
3270.3-------
3367.68-------
3467.65-------
3561.92-------
3658.34-------
3755.04-------
3862.552.24638.001166.4910.07910.350300.3503
3959.4449.072120.643377.50090.23740.17730.00130.3404
4060.0346.1835-1.17793.54390.28330.29160.07070.357
4164.2443.0806-25.0402111.20140.27130.31290.16920.3654
4274.3340.1386-51.7668132.0440.23290.30360.25220.3753
4374.4137.0758-80.4112154.56280.26670.26710.26210.3822
4469.7534.1037-111.2666179.4740.31540.29340.31280.3889
4572.0331.0635-143.8852206.01220.32310.33240.34080.3941
4668.1828.0745-178.3625234.51140.35170.33820.35360.399
4763.0125.047-214.4618264.55580.3780.36210.38140.4031
4861.7122.0484-252.1992296.29590.38840.38490.39770.4068
4963.5219.0281-291.4373329.49350.38940.39380.41010.4101







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
380.13910.19630105.14400
390.29560.21130.2038107.4937106.318810.3111
400.52320.29980.2358191.7268134.788111.6098
410.80680.49120.2996447.7207213.021314.5952
421.16820.85180.41011169.0524404.227520.1054
431.61681.0070.50961393.8427569.163423.8571
442.17481.04520.58611270.658669.376925.8723
452.87351.31880.67771678.2532795.486428.2044
463.75161.42850.76111608.4547885.816229.7627
474.87881.51570.83661441.1895941.353630.6815
486.34611.79880.9241573.0444998.7831.6035
498.32462.33821.04191979.5291080.509132.8711

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
38 & 0.1391 & 0.1963 & 0 & 105.144 & 0 & 0 \tabularnewline
39 & 0.2956 & 0.2113 & 0.2038 & 107.4937 & 106.3188 & 10.3111 \tabularnewline
40 & 0.5232 & 0.2998 & 0.2358 & 191.7268 & 134.7881 & 11.6098 \tabularnewline
41 & 0.8068 & 0.4912 & 0.2996 & 447.7207 & 213.0213 & 14.5952 \tabularnewline
42 & 1.1682 & 0.8518 & 0.4101 & 1169.0524 & 404.2275 & 20.1054 \tabularnewline
43 & 1.6168 & 1.007 & 0.5096 & 1393.8427 & 569.1634 & 23.8571 \tabularnewline
44 & 2.1748 & 1.0452 & 0.5861 & 1270.658 & 669.3769 & 25.8723 \tabularnewline
45 & 2.8735 & 1.3188 & 0.6777 & 1678.2532 & 795.4864 & 28.2044 \tabularnewline
46 & 3.7516 & 1.4285 & 0.7611 & 1608.4547 & 885.8162 & 29.7627 \tabularnewline
47 & 4.8788 & 1.5157 & 0.8366 & 1441.1895 & 941.3536 & 30.6815 \tabularnewline
48 & 6.3461 & 1.7988 & 0.924 & 1573.0444 & 998.78 & 31.6035 \tabularnewline
49 & 8.3246 & 2.3382 & 1.0419 & 1979.529 & 1080.5091 & 32.8711 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113789&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]38[/C][C]0.1391[/C][C]0.1963[/C][C]0[/C][C]105.144[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]39[/C][C]0.2956[/C][C]0.2113[/C][C]0.2038[/C][C]107.4937[/C][C]106.3188[/C][C]10.3111[/C][/ROW]
[ROW][C]40[/C][C]0.5232[/C][C]0.2998[/C][C]0.2358[/C][C]191.7268[/C][C]134.7881[/C][C]11.6098[/C][/ROW]
[ROW][C]41[/C][C]0.8068[/C][C]0.4912[/C][C]0.2996[/C][C]447.7207[/C][C]213.0213[/C][C]14.5952[/C][/ROW]
[ROW][C]42[/C][C]1.1682[/C][C]0.8518[/C][C]0.4101[/C][C]1169.0524[/C][C]404.2275[/C][C]20.1054[/C][/ROW]
[ROW][C]43[/C][C]1.6168[/C][C]1.007[/C][C]0.5096[/C][C]1393.8427[/C][C]569.1634[/C][C]23.8571[/C][/ROW]
[ROW][C]44[/C][C]2.1748[/C][C]1.0452[/C][C]0.5861[/C][C]1270.658[/C][C]669.3769[/C][C]25.8723[/C][/ROW]
[ROW][C]45[/C][C]2.8735[/C][C]1.3188[/C][C]0.6777[/C][C]1678.2532[/C][C]795.4864[/C][C]28.2044[/C][/ROW]
[ROW][C]46[/C][C]3.7516[/C][C]1.4285[/C][C]0.7611[/C][C]1608.4547[/C][C]885.8162[/C][C]29.7627[/C][/ROW]
[ROW][C]47[/C][C]4.8788[/C][C]1.5157[/C][C]0.8366[/C][C]1441.1895[/C][C]941.3536[/C][C]30.6815[/C][/ROW]
[ROW][C]48[/C][C]6.3461[/C][C]1.7988[/C][C]0.924[/C][C]1573.0444[/C][C]998.78[/C][C]31.6035[/C][/ROW]
[ROW][C]49[/C][C]8.3246[/C][C]2.3382[/C][C]1.0419[/C][C]1979.529[/C][C]1080.5091[/C][C]32.8711[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113789&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113789&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
380.13910.19630105.14400
390.29560.21130.2038107.4937106.318810.3111
400.52320.29980.2358191.7268134.788111.6098
410.80680.49120.2996447.7207213.021314.5952
421.16820.85180.41011169.0524404.227520.1054
431.61681.0070.50961393.8427569.163423.8571
442.17481.04520.58611270.658669.376925.8723
452.87351.31880.67771678.2532795.486428.2044
463.75161.42850.76111608.4547885.816229.7627
474.87881.51570.83661441.1895941.353630.6815
486.34611.79880.9241573.0444998.7831.6035
498.32462.33821.04191979.5291080.509132.8711



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