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, 04 Dec 2010 13:19:52 +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/04/t1291468674sqouq4rufc87s8f.htm/, Retrieved Sun, 05 May 2024 02:06:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105133, Retrieved Sun, 05 May 2024 02:06:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
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] [Model 1 CPI] [2010-12-04 13:19:52] [b6992a7b26e556359948e164e4227eba] [Current]
Feedback Forum

Post a new message
Dataseries X:
115.65
116.00
115.92
116.10
116.44
116.65
117.45
117.58
117.43
117.24
117.25
117.29
117.83
118.22
118.11
118.23
118.15
118.23
119.03
119.38
118.97
118.78
118.97
118.94
119.86
120.09
120.13
120.15
119.90
120.00
120.84
121.17
120.81
121.00
121.12
121.29
122.09
121.88
121.31
121.33
121.45
121.67
122.78
122.84
122.34
122.37
122.72
122.68
122.78
123.08
122.92
123.51
124.18
124.05
124.36
123.87
123.84
123.85
123.83
123.84
124.27
124.56
124.57
124.87
125.08
124.86
124.89
124.58
124.83
124.97
125.19
125.42
125.74
126.07
126.35
126.69
126.85
127.12
127.43
127.49
128.05
127.85
128.35
128.29
128.38
128.80
129.18
130.14
130.77
131.19
131.32
131.41
131.61
131.69
131.94
131.70
132.54
132.74
133.02
132.76
133.05
132.74
133.16
133.10
133.37
133.15
133.18
133.29
133.76
134.51
134.82
134.71
134.52
134.86
135.11
135.28
135.61
135.22
135.47
135.42
135.85
136.27
136.30
136.85
137.05
137.03
137.45
137.49
137.55
138.04
138.03
137.75
138.27
138.99
139.74
139.70
139.97
140.21
140.78
140.80
140.64
140.42
140.85
140.96
141.04
141.71
141.60
142.11
142.59
142.56
143.00
143.18
143.15
143.10
143.45
143.59
143.92
144.66
144.34
144.82
144.49
144.41
144.99
144.95
145.00
145.66
146.68
147.38
147.94
149.12
149.95
150.19
151.16
151.74
152.56
152.09
152.46
152.66
152.38
152.59
152.88
153.29
152.35
152.49
152.20
151.57
151.55
151.79
151.52
151.76
151.92
152.20
152.75
153.49
153.78
154.10
154.62
154.65
154.81
154.92
155.40
155.63
155.76




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105133&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105133&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105133&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'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[191])
179152.38-------
180152.59-------
181152.88-------
182153.29-------
183152.35-------
184152.49-------
185152.2-------
186151.57-------
187151.55-------
188151.79-------
189151.52-------
190151.76-------
191151.92-------
192152.2152.0587151.3441152.77670.34990.64760.07350.6476
193152.75152.4944151.402153.59470.32450.70.24610.8469
194153.49153.1521151.7582154.55870.31890.71230.42380.957
195153.78153.1761151.5335154.83650.2380.35550.83530.9309
196154.1153.4667151.6041155.35220.25520.37230.8450.9461
197154.62153.684151.6243155.77170.18980.34810.91820.9512
198154.65153.7067151.4693155.97710.20770.21520.96740.9385
199154.81154.1863151.7773156.63360.30870.35520.98260.9652
200154.92154.1824151.6196156.78850.28950.31850.9640.9556
201155.4154.2278151.5192156.98470.20230.31130.97290.9496
202155.63154.3666151.5181157.26860.19670.24260.96080.9508
203155.76154.6348151.6501157.67820.23430.26080.95980.9598

\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[191]) \tabularnewline
179 & 152.38 & - & - & - & - & - & - & - \tabularnewline
180 & 152.59 & - & - & - & - & - & - & - \tabularnewline
181 & 152.88 & - & - & - & - & - & - & - \tabularnewline
182 & 153.29 & - & - & - & - & - & - & - \tabularnewline
183 & 152.35 & - & - & - & - & - & - & - \tabularnewline
184 & 152.49 & - & - & - & - & - & - & - \tabularnewline
185 & 152.2 & - & - & - & - & - & - & - \tabularnewline
186 & 151.57 & - & - & - & - & - & - & - \tabularnewline
187 & 151.55 & - & - & - & - & - & - & - \tabularnewline
188 & 151.79 & - & - & - & - & - & - & - \tabularnewline
189 & 151.52 & - & - & - & - & - & - & - \tabularnewline
190 & 151.76 & - & - & - & - & - & - & - \tabularnewline
191 & 151.92 & - & - & - & - & - & - & - \tabularnewline
192 & 152.2 & 152.0587 & 151.3441 & 152.7767 & 0.3499 & 0.6476 & 0.0735 & 0.6476 \tabularnewline
193 & 152.75 & 152.4944 & 151.402 & 153.5947 & 0.3245 & 0.7 & 0.2461 & 0.8469 \tabularnewline
194 & 153.49 & 153.1521 & 151.7582 & 154.5587 & 0.3189 & 0.7123 & 0.4238 & 0.957 \tabularnewline
195 & 153.78 & 153.1761 & 151.5335 & 154.8365 & 0.238 & 0.3555 & 0.8353 & 0.9309 \tabularnewline
196 & 154.1 & 153.4667 & 151.6041 & 155.3522 & 0.2552 & 0.3723 & 0.845 & 0.9461 \tabularnewline
197 & 154.62 & 153.684 & 151.6243 & 155.7717 & 0.1898 & 0.3481 & 0.9182 & 0.9512 \tabularnewline
198 & 154.65 & 153.7067 & 151.4693 & 155.9771 & 0.2077 & 0.2152 & 0.9674 & 0.9385 \tabularnewline
199 & 154.81 & 154.1863 & 151.7773 & 156.6336 & 0.3087 & 0.3552 & 0.9826 & 0.9652 \tabularnewline
200 & 154.92 & 154.1824 & 151.6196 & 156.7885 & 0.2895 & 0.3185 & 0.964 & 0.9556 \tabularnewline
201 & 155.4 & 154.2278 & 151.5192 & 156.9847 & 0.2023 & 0.3113 & 0.9729 & 0.9496 \tabularnewline
202 & 155.63 & 154.3666 & 151.5181 & 157.2686 & 0.1967 & 0.2426 & 0.9608 & 0.9508 \tabularnewline
203 & 155.76 & 154.6348 & 151.6501 & 157.6782 & 0.2343 & 0.2608 & 0.9598 & 0.9598 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105133&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[191])[/C][/ROW]
[ROW][C]179[/C][C]152.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]180[/C][C]152.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]181[/C][C]152.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]182[/C][C]153.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]183[/C][C]152.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]184[/C][C]152.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]185[/C][C]152.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]186[/C][C]151.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]187[/C][C]151.55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]188[/C][C]151.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]151.52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]151.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]151.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]152.2[/C][C]152.0587[/C][C]151.3441[/C][C]152.7767[/C][C]0.3499[/C][C]0.6476[/C][C]0.0735[/C][C]0.6476[/C][/ROW]
[ROW][C]193[/C][C]152.75[/C][C]152.4944[/C][C]151.402[/C][C]153.5947[/C][C]0.3245[/C][C]0.7[/C][C]0.2461[/C][C]0.8469[/C][/ROW]
[ROW][C]194[/C][C]153.49[/C][C]153.1521[/C][C]151.7582[/C][C]154.5587[/C][C]0.3189[/C][C]0.7123[/C][C]0.4238[/C][C]0.957[/C][/ROW]
[ROW][C]195[/C][C]153.78[/C][C]153.1761[/C][C]151.5335[/C][C]154.8365[/C][C]0.238[/C][C]0.3555[/C][C]0.8353[/C][C]0.9309[/C][/ROW]
[ROW][C]196[/C][C]154.1[/C][C]153.4667[/C][C]151.6041[/C][C]155.3522[/C][C]0.2552[/C][C]0.3723[/C][C]0.845[/C][C]0.9461[/C][/ROW]
[ROW][C]197[/C][C]154.62[/C][C]153.684[/C][C]151.6243[/C][C]155.7717[/C][C]0.1898[/C][C]0.3481[/C][C]0.9182[/C][C]0.9512[/C][/ROW]
[ROW][C]198[/C][C]154.65[/C][C]153.7067[/C][C]151.4693[/C][C]155.9771[/C][C]0.2077[/C][C]0.2152[/C][C]0.9674[/C][C]0.9385[/C][/ROW]
[ROW][C]199[/C][C]154.81[/C][C]154.1863[/C][C]151.7773[/C][C]156.6336[/C][C]0.3087[/C][C]0.3552[/C][C]0.9826[/C][C]0.9652[/C][/ROW]
[ROW][C]200[/C][C]154.92[/C][C]154.1824[/C][C]151.6196[/C][C]156.7885[/C][C]0.2895[/C][C]0.3185[/C][C]0.964[/C][C]0.9556[/C][/ROW]
[ROW][C]201[/C][C]155.4[/C][C]154.2278[/C][C]151.5192[/C][C]156.9847[/C][C]0.2023[/C][C]0.3113[/C][C]0.9729[/C][C]0.9496[/C][/ROW]
[ROW][C]202[/C][C]155.63[/C][C]154.3666[/C][C]151.5181[/C][C]157.2686[/C][C]0.1967[/C][C]0.2426[/C][C]0.9608[/C][C]0.9508[/C][/ROW]
[ROW][C]203[/C][C]155.76[/C][C]154.6348[/C][C]151.6501[/C][C]157.6782[/C][C]0.2343[/C][C]0.2608[/C][C]0.9598[/C][C]0.9598[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105133&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105133&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[191])
179152.38-------
180152.59-------
181152.88-------
182153.29-------
183152.35-------
184152.49-------
185152.2-------
186151.57-------
187151.55-------
188151.79-------
189151.52-------
190151.76-------
191151.92-------
192152.2152.0587151.3441152.77670.34990.64760.07350.6476
193152.75152.4944151.402153.59470.32450.70.24610.8469
194153.49153.1521151.7582154.55870.31890.71230.42380.957
195153.78153.1761151.5335154.83650.2380.35550.83530.9309
196154.1153.4667151.6041155.35220.25520.37230.8450.9461
197154.62153.684151.6243155.77170.18980.34810.91820.9512
198154.65153.7067151.4693155.97710.20770.21520.96740.9385
199154.81154.1863151.7773156.63360.30870.35520.98260.9652
200154.92154.1824151.6196156.78850.28950.31850.9640.9556
201155.4154.2278151.5192156.98470.20230.31130.97290.9496
202155.63154.3666151.5181157.26860.19670.24260.96080.9508
203155.76154.6348151.6501157.67820.23430.26080.95980.9598







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1920.00249e-0400.0200
1930.00370.00170.00130.06530.04260.2065
1940.00470.00220.00160.11420.06650.2579
1950.00550.00390.00220.36470.14110.3756
1960.00630.00410.00260.40110.19310.4394
1970.00690.00610.00320.87610.30690.554
1980.00750.00610.00360.88990.39020.6246
1990.00810.0040.00360.3890.390.6245
2000.00860.00480.00380.5440.40710.6381
2010.00910.00760.00421.37420.50380.7098
2020.00960.00820.00451.59620.60310.7766
2030.010.00730.00471.26620.65840.8114

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
192 & 0.0024 & 9e-04 & 0 & 0.02 & 0 & 0 \tabularnewline
193 & 0.0037 & 0.0017 & 0.0013 & 0.0653 & 0.0426 & 0.2065 \tabularnewline
194 & 0.0047 & 0.0022 & 0.0016 & 0.1142 & 0.0665 & 0.2579 \tabularnewline
195 & 0.0055 & 0.0039 & 0.0022 & 0.3647 & 0.1411 & 0.3756 \tabularnewline
196 & 0.0063 & 0.0041 & 0.0026 & 0.4011 & 0.1931 & 0.4394 \tabularnewline
197 & 0.0069 & 0.0061 & 0.0032 & 0.8761 & 0.3069 & 0.554 \tabularnewline
198 & 0.0075 & 0.0061 & 0.0036 & 0.8899 & 0.3902 & 0.6246 \tabularnewline
199 & 0.0081 & 0.004 & 0.0036 & 0.389 & 0.39 & 0.6245 \tabularnewline
200 & 0.0086 & 0.0048 & 0.0038 & 0.544 & 0.4071 & 0.6381 \tabularnewline
201 & 0.0091 & 0.0076 & 0.0042 & 1.3742 & 0.5038 & 0.7098 \tabularnewline
202 & 0.0096 & 0.0082 & 0.0045 & 1.5962 & 0.6031 & 0.7766 \tabularnewline
203 & 0.01 & 0.0073 & 0.0047 & 1.2662 & 0.6584 & 0.8114 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105133&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]192[/C][C]0.0024[/C][C]9e-04[/C][C]0[/C][C]0.02[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]193[/C][C]0.0037[/C][C]0.0017[/C][C]0.0013[/C][C]0.0653[/C][C]0.0426[/C][C]0.2065[/C][/ROW]
[ROW][C]194[/C][C]0.0047[/C][C]0.0022[/C][C]0.0016[/C][C]0.1142[/C][C]0.0665[/C][C]0.2579[/C][/ROW]
[ROW][C]195[/C][C]0.0055[/C][C]0.0039[/C][C]0.0022[/C][C]0.3647[/C][C]0.1411[/C][C]0.3756[/C][/ROW]
[ROW][C]196[/C][C]0.0063[/C][C]0.0041[/C][C]0.0026[/C][C]0.4011[/C][C]0.1931[/C][C]0.4394[/C][/ROW]
[ROW][C]197[/C][C]0.0069[/C][C]0.0061[/C][C]0.0032[/C][C]0.8761[/C][C]0.3069[/C][C]0.554[/C][/ROW]
[ROW][C]198[/C][C]0.0075[/C][C]0.0061[/C][C]0.0036[/C][C]0.8899[/C][C]0.3902[/C][C]0.6246[/C][/ROW]
[ROW][C]199[/C][C]0.0081[/C][C]0.004[/C][C]0.0036[/C][C]0.389[/C][C]0.39[/C][C]0.6245[/C][/ROW]
[ROW][C]200[/C][C]0.0086[/C][C]0.0048[/C][C]0.0038[/C][C]0.544[/C][C]0.4071[/C][C]0.6381[/C][/ROW]
[ROW][C]201[/C][C]0.0091[/C][C]0.0076[/C][C]0.0042[/C][C]1.3742[/C][C]0.5038[/C][C]0.7098[/C][/ROW]
[ROW][C]202[/C][C]0.0096[/C][C]0.0082[/C][C]0.0045[/C][C]1.5962[/C][C]0.6031[/C][C]0.7766[/C][/ROW]
[ROW][C]203[/C][C]0.01[/C][C]0.0073[/C][C]0.0047[/C][C]1.2662[/C][C]0.6584[/C][C]0.8114[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105133&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105133&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
1920.00249e-0400.0200
1930.00370.00170.00130.06530.04260.2065
1940.00470.00220.00160.11420.06650.2579
1950.00550.00390.00220.36470.14110.3756
1960.00630.00410.00260.40110.19310.4394
1970.00690.00610.00320.87610.30690.554
1980.00750.00610.00360.88990.39020.6246
1990.00810.0040.00360.3890.390.6245
2000.00860.00480.00380.5440.40710.6381
2010.00910.00760.00421.37420.50380.7098
2020.00960.00820.00451.59620.60310.7766
2030.010.00730.00471.26620.65840.8114



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