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 computationThu, 18 Dec 2014 16:58: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/2014/Dec/18/t1418921939fpztobq1btzb2sv.htm/, Retrieved Fri, 17 May 2024 18:43:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=271142, Retrieved Fri, 17 May 2024 18:43:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact98
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [ARIMA Backward Selection] [] [2011-12-06 19:59:13] [b98453cac15ba1066b407e146608df68]
- RM      [ARIMA Backward Selection] [arima] [2014-11-26 14:36:02] [2ba32e9656c7c3fdddad3ba3f1588288]
- RMPD        [ARIMA Forecasting] [] [2014-12-18 16:58:42] [d043def4c969c6fe6dac6c6c71a7875a] [Current]
Feedback Forum

Post a new message
Dataseries X:
19.25
11.6
15.15
10.95
15.2
12.6
13.2
9.95
19.9
8.1
12.9
14.85
14.05
10.95
7.65
12.65
11.35
14.5
13.6
14.9
16.1
12.4
18.1
18.25
12.15
17.35
12.6
7.6
13.4
14.1
19.9
18.1
11.85
16.65
15.6
15.25
16.1
15.4
13.35
15.4
16.1
16.2
7.7
11.15
13.15
14.75
15.85
15.4
14.1
18.2
16.15
11.2
18.4
17.65
18.45
9.9
16.6
17.6
17.65
18.4
12.6
19.3
11.2
14.6
18.45
4.5
19.1
13.4
4.35
12.75
15.6
11.85
10.95
15.25
11.9
18.55
11.95
15.1
15.6
15.1
17.85
19.05
16.65
12.4
12.6
13.35
16.1
18.25
12.35
14.85
13.85
14.6
7.85
16
13.9
18.95
11.4
14.6
15.25
12.45
19.1
14.6
12.7
13.2
17.75
16.35
18.4
12.85
15.35
17.75
13.1
15.7
15.95
14.7
15.65
13.35
14.75
14.6
15.9
19.1
14.9
12.2
7.85
12.35
19.2
8.6
11.75
9.85
16.85
10.35
14.9
10.6
15.35
9.6
11.9
14.75
14.8
16.35
16.85
15.2
17.35
18.15
13.6
13.6
15
16.85
17.1
17.1
13.35
17.75
18.9
13.6
13.95
15.65
14.35
14.75
11.7
14.35
19.1
16.6
9.5
16.25
17.6
17.1
16.1
17.75
13.6
15.6
12.65
13.6
11.7




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' @ fisher.wessa.net

\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' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=271142&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' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=271142&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=271142&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' @ fisher.wessa.net







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[159])
14717.1-------
14817.1-------
14913.35-------
15017.75-------
15118.9-------
15213.6-------
15313.95-------
15415.65-------
15514.35-------
15614.75-------
15711.7-------
15814.35-------
15919.1-------
16016.613.96547.694920.23590.20510.05430.16360.0543
1619.515.35389.083321.62440.03360.34840.73450.1208
16216.2513.96157.69120.2320.23720.91840.11820.0541
16317.615.17318.902621.44360.2240.36820.1220.1098
16417.113.25386.983319.52440.11460.08720.45690.0338
16516.114.48468.214120.75510.30680.20680.56640.0746
16617.7514.88.529521.07050.17820.34220.39520.0895
16713.615.64629.375621.91670.26120.25540.65730.1402
16815.615.09628.825621.36670.43740.680.54310.1054
16912.6513.96437.709820.21880.34020.30410.7610.0538
17013.614.76798.513421.02240.35720.74660.55210.0873
17111.713.45717.202619.71160.29090.48210.03850.0385

\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[159]) \tabularnewline
147 & 17.1 & - & - & - & - & - & - & - \tabularnewline
148 & 17.1 & - & - & - & - & - & - & - \tabularnewline
149 & 13.35 & - & - & - & - & - & - & - \tabularnewline
150 & 17.75 & - & - & - & - & - & - & - \tabularnewline
151 & 18.9 & - & - & - & - & - & - & - \tabularnewline
152 & 13.6 & - & - & - & - & - & - & - \tabularnewline
153 & 13.95 & - & - & - & - & - & - & - \tabularnewline
154 & 15.65 & - & - & - & - & - & - & - \tabularnewline
155 & 14.35 & - & - & - & - & - & - & - \tabularnewline
156 & 14.75 & - & - & - & - & - & - & - \tabularnewline
157 & 11.7 & - & - & - & - & - & - & - \tabularnewline
158 & 14.35 & - & - & - & - & - & - & - \tabularnewline
159 & 19.1 & - & - & - & - & - & - & - \tabularnewline
160 & 16.6 & 13.9654 & 7.6949 & 20.2359 & 0.2051 & 0.0543 & 0.1636 & 0.0543 \tabularnewline
161 & 9.5 & 15.3538 & 9.0833 & 21.6244 & 0.0336 & 0.3484 & 0.7345 & 0.1208 \tabularnewline
162 & 16.25 & 13.9615 & 7.691 & 20.232 & 0.2372 & 0.9184 & 0.1182 & 0.0541 \tabularnewline
163 & 17.6 & 15.1731 & 8.9026 & 21.4436 & 0.224 & 0.3682 & 0.122 & 0.1098 \tabularnewline
164 & 17.1 & 13.2538 & 6.9833 & 19.5244 & 0.1146 & 0.0872 & 0.4569 & 0.0338 \tabularnewline
165 & 16.1 & 14.4846 & 8.2141 & 20.7551 & 0.3068 & 0.2068 & 0.5664 & 0.0746 \tabularnewline
166 & 17.75 & 14.8 & 8.5295 & 21.0705 & 0.1782 & 0.3422 & 0.3952 & 0.0895 \tabularnewline
167 & 13.6 & 15.6462 & 9.3756 & 21.9167 & 0.2612 & 0.2554 & 0.6573 & 0.1402 \tabularnewline
168 & 15.6 & 15.0962 & 8.8256 & 21.3667 & 0.4374 & 0.68 & 0.5431 & 0.1054 \tabularnewline
169 & 12.65 & 13.9643 & 7.7098 & 20.2188 & 0.3402 & 0.3041 & 0.761 & 0.0538 \tabularnewline
170 & 13.6 & 14.7679 & 8.5134 & 21.0224 & 0.3572 & 0.7466 & 0.5521 & 0.0873 \tabularnewline
171 & 11.7 & 13.4571 & 7.2026 & 19.7116 & 0.2909 & 0.4821 & 0.0385 & 0.0385 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=271142&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[159])[/C][/ROW]
[ROW][C]147[/C][C]17.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]148[/C][C]17.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]149[/C][C]13.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]150[/C][C]17.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]151[/C][C]18.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]152[/C][C]13.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]153[/C][C]13.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]154[/C][C]15.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]155[/C][C]14.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]156[/C][C]14.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]157[/C][C]11.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]158[/C][C]14.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]159[/C][C]19.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]160[/C][C]16.6[/C][C]13.9654[/C][C]7.6949[/C][C]20.2359[/C][C]0.2051[/C][C]0.0543[/C][C]0.1636[/C][C]0.0543[/C][/ROW]
[ROW][C]161[/C][C]9.5[/C][C]15.3538[/C][C]9.0833[/C][C]21.6244[/C][C]0.0336[/C][C]0.3484[/C][C]0.7345[/C][C]0.1208[/C][/ROW]
[ROW][C]162[/C][C]16.25[/C][C]13.9615[/C][C]7.691[/C][C]20.232[/C][C]0.2372[/C][C]0.9184[/C][C]0.1182[/C][C]0.0541[/C][/ROW]
[ROW][C]163[/C][C]17.6[/C][C]15.1731[/C][C]8.9026[/C][C]21.4436[/C][C]0.224[/C][C]0.3682[/C][C]0.122[/C][C]0.1098[/C][/ROW]
[ROW][C]164[/C][C]17.1[/C][C]13.2538[/C][C]6.9833[/C][C]19.5244[/C][C]0.1146[/C][C]0.0872[/C][C]0.4569[/C][C]0.0338[/C][/ROW]
[ROW][C]165[/C][C]16.1[/C][C]14.4846[/C][C]8.2141[/C][C]20.7551[/C][C]0.3068[/C][C]0.2068[/C][C]0.5664[/C][C]0.0746[/C][/ROW]
[ROW][C]166[/C][C]17.75[/C][C]14.8[/C][C]8.5295[/C][C]21.0705[/C][C]0.1782[/C][C]0.3422[/C][C]0.3952[/C][C]0.0895[/C][/ROW]
[ROW][C]167[/C][C]13.6[/C][C]15.6462[/C][C]9.3756[/C][C]21.9167[/C][C]0.2612[/C][C]0.2554[/C][C]0.6573[/C][C]0.1402[/C][/ROW]
[ROW][C]168[/C][C]15.6[/C][C]15.0962[/C][C]8.8256[/C][C]21.3667[/C][C]0.4374[/C][C]0.68[/C][C]0.5431[/C][C]0.1054[/C][/ROW]
[ROW][C]169[/C][C]12.65[/C][C]13.9643[/C][C]7.7098[/C][C]20.2188[/C][C]0.3402[/C][C]0.3041[/C][C]0.761[/C][C]0.0538[/C][/ROW]
[ROW][C]170[/C][C]13.6[/C][C]14.7679[/C][C]8.5134[/C][C]21.0224[/C][C]0.3572[/C][C]0.7466[/C][C]0.5521[/C][C]0.0873[/C][/ROW]
[ROW][C]171[/C][C]11.7[/C][C]13.4571[/C][C]7.2026[/C][C]19.7116[/C][C]0.2909[/C][C]0.4821[/C][C]0.0385[/C][C]0.0385[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=271142&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=271142&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[159])
14717.1-------
14817.1-------
14913.35-------
15017.75-------
15118.9-------
15213.6-------
15313.95-------
15415.65-------
15514.35-------
15614.75-------
15711.7-------
15814.35-------
15919.1-------
16016.613.96547.694920.23590.20510.05430.16360.0543
1619.515.35389.083321.62440.03360.34840.73450.1208
16216.2513.96157.69120.2320.23720.91840.11820.0541
16317.615.17318.902621.44360.2240.36820.1220.1098
16417.113.25386.983319.52440.11460.08720.45690.0338
16516.114.48468.214120.75510.30680.20680.56640.0746
16617.7514.88.529521.07050.17820.34220.39520.0895
16713.615.64629.375621.91670.26120.25540.65730.1402
16815.615.09628.825621.36670.43740.680.54310.1054
16912.6513.96437.709820.21880.34020.30410.7610.0538
17013.614.76798.513421.02240.35720.74660.55210.0873
17111.713.45717.202619.71160.29090.48210.03850.0385







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1600.22910.15870.15870.17246.9412000.95650.9565
1610.2084-0.61620.38750.321734.267520.60444.5392-2.12521.5408
1620.22910.14080.30520.2655.237115.48193.93470.83081.3041
1630.21080.13790.26340.23585.8913.08393.61720.88111.1984
1640.24140.22490.25570.239314.792913.42573.66411.39631.238
1650.22090.10030.22980.2172.609511.6233.40930.58641.1294
1660.21620.16620.22070.21198.702511.20583.34751.0711.121
1670.2045-0.15050.21190.20294.186710.32843.2138-0.74281.0737
1680.21190.03230.1920.1840.25399.2093.03460.18290.9748
1690.2285-0.10390.18320.17551.72738.46092.9088-0.47710.925
1700.2161-0.08590.17430.1671.36397.81572.7957-0.4240.8795
1710.2371-0.15020.17230.16473.08757.42172.7243-0.63790.8593

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
160 & 0.2291 & 0.1587 & 0.1587 & 0.1724 & 6.9412 & 0 & 0 & 0.9565 & 0.9565 \tabularnewline
161 & 0.2084 & -0.6162 & 0.3875 & 0.3217 & 34.2675 & 20.6044 & 4.5392 & -2.1252 & 1.5408 \tabularnewline
162 & 0.2291 & 0.1408 & 0.3052 & 0.265 & 5.2371 & 15.4819 & 3.9347 & 0.8308 & 1.3041 \tabularnewline
163 & 0.2108 & 0.1379 & 0.2634 & 0.2358 & 5.89 & 13.0839 & 3.6172 & 0.8811 & 1.1984 \tabularnewline
164 & 0.2414 & 0.2249 & 0.2557 & 0.2393 & 14.7929 & 13.4257 & 3.6641 & 1.3963 & 1.238 \tabularnewline
165 & 0.2209 & 0.1003 & 0.2298 & 0.217 & 2.6095 & 11.623 & 3.4093 & 0.5864 & 1.1294 \tabularnewline
166 & 0.2162 & 0.1662 & 0.2207 & 0.2119 & 8.7025 & 11.2058 & 3.3475 & 1.071 & 1.121 \tabularnewline
167 & 0.2045 & -0.1505 & 0.2119 & 0.2029 & 4.1867 & 10.3284 & 3.2138 & -0.7428 & 1.0737 \tabularnewline
168 & 0.2119 & 0.0323 & 0.192 & 0.184 & 0.2539 & 9.209 & 3.0346 & 0.1829 & 0.9748 \tabularnewline
169 & 0.2285 & -0.1039 & 0.1832 & 0.1755 & 1.7273 & 8.4609 & 2.9088 & -0.4771 & 0.925 \tabularnewline
170 & 0.2161 & -0.0859 & 0.1743 & 0.167 & 1.3639 & 7.8157 & 2.7957 & -0.424 & 0.8795 \tabularnewline
171 & 0.2371 & -0.1502 & 0.1723 & 0.1647 & 3.0875 & 7.4217 & 2.7243 & -0.6379 & 0.8593 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=271142&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]160[/C][C]0.2291[/C][C]0.1587[/C][C]0.1587[/C][C]0.1724[/C][C]6.9412[/C][C]0[/C][C]0[/C][C]0.9565[/C][C]0.9565[/C][/ROW]
[ROW][C]161[/C][C]0.2084[/C][C]-0.6162[/C][C]0.3875[/C][C]0.3217[/C][C]34.2675[/C][C]20.6044[/C][C]4.5392[/C][C]-2.1252[/C][C]1.5408[/C][/ROW]
[ROW][C]162[/C][C]0.2291[/C][C]0.1408[/C][C]0.3052[/C][C]0.265[/C][C]5.2371[/C][C]15.4819[/C][C]3.9347[/C][C]0.8308[/C][C]1.3041[/C][/ROW]
[ROW][C]163[/C][C]0.2108[/C][C]0.1379[/C][C]0.2634[/C][C]0.2358[/C][C]5.89[/C][C]13.0839[/C][C]3.6172[/C][C]0.8811[/C][C]1.1984[/C][/ROW]
[ROW][C]164[/C][C]0.2414[/C][C]0.2249[/C][C]0.2557[/C][C]0.2393[/C][C]14.7929[/C][C]13.4257[/C][C]3.6641[/C][C]1.3963[/C][C]1.238[/C][/ROW]
[ROW][C]165[/C][C]0.2209[/C][C]0.1003[/C][C]0.2298[/C][C]0.217[/C][C]2.6095[/C][C]11.623[/C][C]3.4093[/C][C]0.5864[/C][C]1.1294[/C][/ROW]
[ROW][C]166[/C][C]0.2162[/C][C]0.1662[/C][C]0.2207[/C][C]0.2119[/C][C]8.7025[/C][C]11.2058[/C][C]3.3475[/C][C]1.071[/C][C]1.121[/C][/ROW]
[ROW][C]167[/C][C]0.2045[/C][C]-0.1505[/C][C]0.2119[/C][C]0.2029[/C][C]4.1867[/C][C]10.3284[/C][C]3.2138[/C][C]-0.7428[/C][C]1.0737[/C][/ROW]
[ROW][C]168[/C][C]0.2119[/C][C]0.0323[/C][C]0.192[/C][C]0.184[/C][C]0.2539[/C][C]9.209[/C][C]3.0346[/C][C]0.1829[/C][C]0.9748[/C][/ROW]
[ROW][C]169[/C][C]0.2285[/C][C]-0.1039[/C][C]0.1832[/C][C]0.1755[/C][C]1.7273[/C][C]8.4609[/C][C]2.9088[/C][C]-0.4771[/C][C]0.925[/C][/ROW]
[ROW][C]170[/C][C]0.2161[/C][C]-0.0859[/C][C]0.1743[/C][C]0.167[/C][C]1.3639[/C][C]7.8157[/C][C]2.7957[/C][C]-0.424[/C][C]0.8795[/C][/ROW]
[ROW][C]171[/C][C]0.2371[/C][C]-0.1502[/C][C]0.1723[/C][C]0.1647[/C][C]3.0875[/C][C]7.4217[/C][C]2.7243[/C][C]-0.6379[/C][C]0.8593[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=271142&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=271142&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1600.22910.15870.15870.17246.9412000.95650.9565
1610.2084-0.61620.38750.321734.267520.60444.5392-2.12521.5408
1620.22910.14080.30520.2655.237115.48193.93470.83081.3041
1630.21080.13790.26340.23585.8913.08393.61720.88111.1984
1640.24140.22490.25570.239314.792913.42573.66411.39631.238
1650.22090.10030.22980.2172.609511.6233.40930.58641.1294
1660.21620.16620.22070.21198.702511.20583.34751.0711.121
1670.2045-0.15050.21190.20294.186710.32843.2138-0.74281.0737
1680.21190.03230.1920.1840.25399.2093.03460.18290.9748
1690.2285-0.10390.18320.17551.72738.46092.9088-0.47710.925
1700.2161-0.08590.17430.1671.36397.81572.7957-0.4240.8795
1710.2371-0.15020.17230.16473.08757.42172.7243-0.63790.8593



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; 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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')