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, 13 Dec 2010 19:08:32 +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/13/t12922673329zyrxa46h1mygbx.htm/, Retrieved Mon, 06 May 2024 22:36:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=109084, Retrieved Mon, 06 May 2024 22:36:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact125
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 Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
- R PD      [ARIMA Backward Selection] [Workshop 9; Coffe...] [2010-12-07 11:14:19] [8ffb4cfa64b4677df0d2c448735a40bb]
-   P         [ARIMA Backward Selection] [Workshop 9; Coffe...] [2010-12-07 19:40:38] [8ffb4cfa64b4677df0d2c448735a40bb]
- RMP             [ARIMA Forecasting] [] [2010-12-13 19:08:32] [5fd8c857995b7937a45335fd5ccccdde] [Current]
Feedback Forum

Post a new message
Dataseries X:
168.67
164.83
184.38
180.81
190.54
181.41
155.67
135.99
125.88
126.09
114.86
127.98
127.98
125.11
125.93
128.2
125.93
111.94
120.01
124.09
126.02
136.41
143.79
141.67
143.9
155
144.83
141.4
137
141.02
131.11
132.83
136.73
141.18
137.86
133.79
128.53
125.87
124.27
123.96
128.15
126.4
127.86
129.31
132.56
141.28
145.55
146.54
143.14
145.72
148.21
150.4
149.94
146.66
143.37
145.29
140.24
136.12
140.25
140.64
145.58
143.73
141.27
140.66
141.94
141.16
134.31
132.93
133.07
140.48
154.85
196.77
235.3
226.52
237.62
224.07
208.74
174.54
170.63
172.23
198.36
175.91
154.63
134.31
121.75
119.6
102.04
106.3
116.38
103.72
98.56
100.9
110
118.26
124.77
125.22
126.38
137.14
134.74
134.3
136.39
141.83
139.24
128.89
134.83
130.43
132.09
144.95
149.5
137.57
139.38
143.06
138.65
123.21
85.91
77.4
77.84
67.76
70.72
72.55
75.83
84.01
93.96
93.73
92.02
88.26
86.48
94.42
94.92
91.41
84.84
89.89
86.32
89.57
93.72
92.27
87.59
85.5
82.81
81.62
87.45
79.86
78.52
75.1
72.99
67.88
70.14
65.43
60.26
58.38
57.68
52.42
52.73
61.4
67.13
77.46
68.66
67.46
62.77
56.88
61.48
61.99
71.56
76.56
79.82
75.05
77.07
80
77.21
82.16
85.57
89.23
121.98
142.56
217.67
198.07
220.1
198.68
181.64
167.47
172.33
168.71
178.22
172.81
168.83
152.25
143.83
151.41
131.87
125.38
123.23
103.99
109.38
123.79
119.05
122.01
128.56
127.91
120.47
122.49
114.05
120.62
119.61
115.01
131.83
167.2
193.82
204.43
264.5
212.55
186.52
185.17
184.38
161.45
154.15
174.25
175.04
175.87
154.82
147.08
134.35
121.56
113.86
119.89
108.07
107.07
115.14
116.03
111.48
103.24
103.23
99.69
108.91
104.21
90.85
87.64
81.06
92.2
114.02
123.56
109.17
101.65
97.95
92.56
91.76
84.1
84.67
74.52
73.83
75.37
70.47
64.5
64.98
66.94
65.93
65.51
68.94
63.67
58.47
59.68
57.71
56.53
58.96
55.6
57.34
60.51
66.38
65.78
58.43
55.16
53.09
52.02
57.58
64.05
70.18
63.86
65.22
67.6
61.66
65.32
66.18
61.34
62.29
63.6
65.51
62.58
62.36
64.88
73.73
77.51
77.47
74.34
75.81
82.16
73.96
73.17
80.99
79.81
89.51
102.57
107.11
122.23
134.69
128.79
126.16
119.98
108.45
108.43
98.17
106.09
108.81
103.03
124.36
118.52
112.2
114.71
107.96
101.21
102.77
112.13
109.36
110.91
123.57
129.95
124.46
122.34
116.61
114.59
112.52
118.67
116.8
123.63
128.04
134.57
130.33
136.47
139.05
158.21
148.07
137.74
139.74
144.08
145.35
145.77
140.56
121.41
120.44
116.97
128.03
128.51
127.76
134.58
147.64
144.46
137.6
146.87
145.67
151.95
150.23
155.86
154.4
156.36
162.13
171.06
174.01
193.52
205.26
212.8
222.1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109084&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109084&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109084&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[357])
356146.87-------
357145.67-------
358151.95145.4238125.0868167.62570.28230.49130.49130.4913
359150.23145.3732114.3292180.99230.39460.35870.35870.4935
360155.86145.3628106.4579191.7460.32870.41850.41850.4948
361154.4145.3607100.1937200.94920.3750.35560.35560.4956
362156.36145.360294.9384209.15470.36770.39060.39060.4962
363162.13145.360190.3786216.66640.32240.38120.38120.4966
364171.06145.360186.3325223.66420.260.33730.33730.4969
365174.01145.360182.6848230.26310.25420.27650.27650.4971
366193.52145.360179.3576236.54080.15030.2690.2690.4973
367205.26145.360176.2952242.55310.11350.16570.16570.4975
368212.8145.360173.4563248.34110.09960.12710.12710.4976
369222.1145.360170.8093253.93650.0830.11170.11170.4978

\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[357]) \tabularnewline
356 & 146.87 & - & - & - & - & - & - & - \tabularnewline
357 & 145.67 & - & - & - & - & - & - & - \tabularnewline
358 & 151.95 & 145.4238 & 125.0868 & 167.6257 & 0.2823 & 0.4913 & 0.4913 & 0.4913 \tabularnewline
359 & 150.23 & 145.3732 & 114.3292 & 180.9923 & 0.3946 & 0.3587 & 0.3587 & 0.4935 \tabularnewline
360 & 155.86 & 145.3628 & 106.4579 & 191.746 & 0.3287 & 0.4185 & 0.4185 & 0.4948 \tabularnewline
361 & 154.4 & 145.3607 & 100.1937 & 200.9492 & 0.375 & 0.3556 & 0.3556 & 0.4956 \tabularnewline
362 & 156.36 & 145.3602 & 94.9384 & 209.1547 & 0.3677 & 0.3906 & 0.3906 & 0.4962 \tabularnewline
363 & 162.13 & 145.3601 & 90.3786 & 216.6664 & 0.3224 & 0.3812 & 0.3812 & 0.4966 \tabularnewline
364 & 171.06 & 145.3601 & 86.3325 & 223.6642 & 0.26 & 0.3373 & 0.3373 & 0.4969 \tabularnewline
365 & 174.01 & 145.3601 & 82.6848 & 230.2631 & 0.2542 & 0.2765 & 0.2765 & 0.4971 \tabularnewline
366 & 193.52 & 145.3601 & 79.3576 & 236.5408 & 0.1503 & 0.269 & 0.269 & 0.4973 \tabularnewline
367 & 205.26 & 145.3601 & 76.2952 & 242.5531 & 0.1135 & 0.1657 & 0.1657 & 0.4975 \tabularnewline
368 & 212.8 & 145.3601 & 73.4563 & 248.3411 & 0.0996 & 0.1271 & 0.1271 & 0.4976 \tabularnewline
369 & 222.1 & 145.3601 & 70.8093 & 253.9365 & 0.083 & 0.1117 & 0.1117 & 0.4978 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109084&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[357])[/C][/ROW]
[ROW][C]356[/C][C]146.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]357[/C][C]145.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]358[/C][C]151.95[/C][C]145.4238[/C][C]125.0868[/C][C]167.6257[/C][C]0.2823[/C][C]0.4913[/C][C]0.4913[/C][C]0.4913[/C][/ROW]
[ROW][C]359[/C][C]150.23[/C][C]145.3732[/C][C]114.3292[/C][C]180.9923[/C][C]0.3946[/C][C]0.3587[/C][C]0.3587[/C][C]0.4935[/C][/ROW]
[ROW][C]360[/C][C]155.86[/C][C]145.3628[/C][C]106.4579[/C][C]191.746[/C][C]0.3287[/C][C]0.4185[/C][C]0.4185[/C][C]0.4948[/C][/ROW]
[ROW][C]361[/C][C]154.4[/C][C]145.3607[/C][C]100.1937[/C][C]200.9492[/C][C]0.375[/C][C]0.3556[/C][C]0.3556[/C][C]0.4956[/C][/ROW]
[ROW][C]362[/C][C]156.36[/C][C]145.3602[/C][C]94.9384[/C][C]209.1547[/C][C]0.3677[/C][C]0.3906[/C][C]0.3906[/C][C]0.4962[/C][/ROW]
[ROW][C]363[/C][C]162.13[/C][C]145.3601[/C][C]90.3786[/C][C]216.6664[/C][C]0.3224[/C][C]0.3812[/C][C]0.3812[/C][C]0.4966[/C][/ROW]
[ROW][C]364[/C][C]171.06[/C][C]145.3601[/C][C]86.3325[/C][C]223.6642[/C][C]0.26[/C][C]0.3373[/C][C]0.3373[/C][C]0.4969[/C][/ROW]
[ROW][C]365[/C][C]174.01[/C][C]145.3601[/C][C]82.6848[/C][C]230.2631[/C][C]0.2542[/C][C]0.2765[/C][C]0.2765[/C][C]0.4971[/C][/ROW]
[ROW][C]366[/C][C]193.52[/C][C]145.3601[/C][C]79.3576[/C][C]236.5408[/C][C]0.1503[/C][C]0.269[/C][C]0.269[/C][C]0.4973[/C][/ROW]
[ROW][C]367[/C][C]205.26[/C][C]145.3601[/C][C]76.2952[/C][C]242.5531[/C][C]0.1135[/C][C]0.1657[/C][C]0.1657[/C][C]0.4975[/C][/ROW]
[ROW][C]368[/C][C]212.8[/C][C]145.3601[/C][C]73.4563[/C][C]248.3411[/C][C]0.0996[/C][C]0.1271[/C][C]0.1271[/C][C]0.4976[/C][/ROW]
[ROW][C]369[/C][C]222.1[/C][C]145.3601[/C][C]70.8093[/C][C]253.9365[/C][C]0.083[/C][C]0.1117[/C][C]0.1117[/C][C]0.4978[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109084&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109084&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[357])
356146.87-------
357145.67-------
358151.95145.4238125.0868167.62570.28230.49130.49130.4913
359150.23145.3732114.3292180.99230.39460.35870.35870.4935
360155.86145.3628106.4579191.7460.32870.41850.41850.4948
361154.4145.3607100.1937200.94920.3750.35560.35560.4956
362156.36145.360294.9384209.15470.36770.39060.39060.4962
363162.13145.360190.3786216.66640.32240.38120.38120.4966
364171.06145.360186.3325223.66420.260.33730.33730.4969
365174.01145.360182.6848230.26310.25420.27650.27650.4971
366193.52145.360179.3576236.54080.15030.2690.2690.4973
367205.26145.360176.2952242.55310.11350.16570.16570.4975
368212.8145.360173.4563248.34110.09960.12710.12710.4976
369222.1145.360170.8093253.93650.0830.11170.11170.4978







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
3580.07790.0449042.590700
3590.1250.03340.039123.588233.08945.7523
3600.16280.07220.0502110.190758.78997.6675
3610.19510.06220.053281.709364.51978.0324
3620.22390.07570.0577120.994775.81478.7072
3630.25030.11540.0673281.2279110.050210.4905
3640.27480.17680.0829660.4833188.683513.7362
3650.2980.19710.0972820.8152267.716.3615
3660.320.33130.12322319.3734495.663722.2635
3670.34110.41210.15213587.9949804.896828.3707
3680.36150.4640.18054548.13661145.191333.8407
3690.38110.52790.20945889.00821540.509439.2493

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
358 & 0.0779 & 0.0449 & 0 & 42.5907 & 0 & 0 \tabularnewline
359 & 0.125 & 0.0334 & 0.0391 & 23.5882 & 33.0894 & 5.7523 \tabularnewline
360 & 0.1628 & 0.0722 & 0.0502 & 110.1907 & 58.7899 & 7.6675 \tabularnewline
361 & 0.1951 & 0.0622 & 0.0532 & 81.7093 & 64.5197 & 8.0324 \tabularnewline
362 & 0.2239 & 0.0757 & 0.0577 & 120.9947 & 75.8147 & 8.7072 \tabularnewline
363 & 0.2503 & 0.1154 & 0.0673 & 281.2279 & 110.0502 & 10.4905 \tabularnewline
364 & 0.2748 & 0.1768 & 0.0829 & 660.4833 & 188.6835 & 13.7362 \tabularnewline
365 & 0.298 & 0.1971 & 0.0972 & 820.8152 & 267.7 & 16.3615 \tabularnewline
366 & 0.32 & 0.3313 & 0.1232 & 2319.3734 & 495.6637 & 22.2635 \tabularnewline
367 & 0.3411 & 0.4121 & 0.1521 & 3587.9949 & 804.8968 & 28.3707 \tabularnewline
368 & 0.3615 & 0.464 & 0.1805 & 4548.1366 & 1145.1913 & 33.8407 \tabularnewline
369 & 0.3811 & 0.5279 & 0.2094 & 5889.0082 & 1540.5094 & 39.2493 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109084&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]358[/C][C]0.0779[/C][C]0.0449[/C][C]0[/C][C]42.5907[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]359[/C][C]0.125[/C][C]0.0334[/C][C]0.0391[/C][C]23.5882[/C][C]33.0894[/C][C]5.7523[/C][/ROW]
[ROW][C]360[/C][C]0.1628[/C][C]0.0722[/C][C]0.0502[/C][C]110.1907[/C][C]58.7899[/C][C]7.6675[/C][/ROW]
[ROW][C]361[/C][C]0.1951[/C][C]0.0622[/C][C]0.0532[/C][C]81.7093[/C][C]64.5197[/C][C]8.0324[/C][/ROW]
[ROW][C]362[/C][C]0.2239[/C][C]0.0757[/C][C]0.0577[/C][C]120.9947[/C][C]75.8147[/C][C]8.7072[/C][/ROW]
[ROW][C]363[/C][C]0.2503[/C][C]0.1154[/C][C]0.0673[/C][C]281.2279[/C][C]110.0502[/C][C]10.4905[/C][/ROW]
[ROW][C]364[/C][C]0.2748[/C][C]0.1768[/C][C]0.0829[/C][C]660.4833[/C][C]188.6835[/C][C]13.7362[/C][/ROW]
[ROW][C]365[/C][C]0.298[/C][C]0.1971[/C][C]0.0972[/C][C]820.8152[/C][C]267.7[/C][C]16.3615[/C][/ROW]
[ROW][C]366[/C][C]0.32[/C][C]0.3313[/C][C]0.1232[/C][C]2319.3734[/C][C]495.6637[/C][C]22.2635[/C][/ROW]
[ROW][C]367[/C][C]0.3411[/C][C]0.4121[/C][C]0.1521[/C][C]3587.9949[/C][C]804.8968[/C][C]28.3707[/C][/ROW]
[ROW][C]368[/C][C]0.3615[/C][C]0.464[/C][C]0.1805[/C][C]4548.1366[/C][C]1145.1913[/C][C]33.8407[/C][/ROW]
[ROW][C]369[/C][C]0.3811[/C][C]0.5279[/C][C]0.2094[/C][C]5889.0082[/C][C]1540.5094[/C][C]39.2493[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109084&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109084&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
3580.07790.0449042.590700
3590.1250.03340.039123.588233.08945.7523
3600.16280.07220.0502110.190758.78997.6675
3610.19510.06220.053281.709364.51978.0324
3620.22390.07570.0577120.994775.81478.7072
3630.25030.11540.0673281.2279110.050210.4905
3640.27480.17680.0829660.4833188.683513.7362
3650.2980.19710.0972820.8152267.716.3615
3660.320.33130.12322319.3734495.663722.2635
3670.34110.41210.15213587.9949804.896828.3707
3680.36150.4640.18054548.13661145.191333.8407
3690.38110.52790.20945889.00821540.509439.2493



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