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 computationWed, 21 Dec 2016 10:25:56 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/Dec/21/t1482312379q9jkl431nsdja4d.htm/, Retrieved Mon, 06 May 2024 18:15:02 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301940, Retrieved Mon, 06 May 2024 18:15:02 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact81
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2016-12-21 09:25:56] [f20c721eaecf28dbff8d9b9768e8b0c7] [Current]
Feedback Forum

Post a new message
Dataseries X:
3904.45
4137.2
4334.5
4188.6
4304.1
4570.45
4178.85
4515.15
4740.55
4582.2
4493.6
4437
4294
4581.35
4780.15
4632
4648.2
4834.85
4465.25
4671.65
4871.3
4707.8
4580.45
4562.25
4329.7
4646.1
4844.1
4623
4707.2
4844.9
4436.75
4680.85
4873.8
4735.15
4681.9
4607
4436.4
4614.1
4619.25
4507.1
4515.85
4725.4
4250.85
4591.6
4898.15
4675.45
4568.95
4531.05
4387.35
4826.1
4954.35
4814.85
4821.55
5148.05
4810.75
4988.05
5322.65
5157
5006.65
4910.2
4764.05
5093.7
5312.2
5157.6
5192.4
5546.6
5092.05
5423.25
5647.2
5450.05
5360.3
5309.25
5181
5488.6
5668.15
5560.8
5590.45
5850.7
5252.2
5626.1
5819.8
5676.35
5525.5
5359.55
5296.85
5623.75
5899.3
5672.6
5724.75
5995.1
5475.2
6143.95
6366.95
6306.1
6077
5672.4
5458.6
5716.9
5828.1
5706.85
5888.3
6007.7
5581.85
5970.95
6190.4
6079.15
5902.2
5554.4
5320.45
5683.1
5987.9
5843.7
5917.5
6299.45
5846.75
5998.1




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301940&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=301940&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301940&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center







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[104])
926143.95-------
936366.95-------
946306.1-------
956077-------
965672.4-------
975458.6-------
985716.9-------
995828.1-------
1005706.85-------
1015888.3-------
1026007.7-------
1035581.85-------
1045970.95-------
1056190.46192.51916014.74156370.29670.49070.99270.02720.9927
1066079.156096.7185851.2086342.22790.44420.22730.04730.8423
1075902.25898.80115599.11256198.48970.49110.11910.12190.3185
1085554.45586.29945241.20685931.3920.42810.03640.31240.0145
1095320.455431.0635045.77955816.34650.28680.26520.44430.003
1105683.15715.88985294.25716137.52250.43940.9670.49810.1179
1115987.95890.70785435.61226345.80350.33780.81440.60630.3648
1125843.75728.64185242.38286214.90080.32140.1480.5350.1644
1135917.55860.04775344.5056375.59030.41350.52480.45720.3366
1146299.456037.87185494.6226581.12160.17260.6680.54330.5954
1155846.755575.62035006.00946145.23130.17540.00640.49140.0869
1165998.16072.95735478.15236667.76220.40260.7720.63160.6316

\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[104]) \tabularnewline
92 & 6143.95 & - & - & - & - & - & - & - \tabularnewline
93 & 6366.95 & - & - & - & - & - & - & - \tabularnewline
94 & 6306.1 & - & - & - & - & - & - & - \tabularnewline
95 & 6077 & - & - & - & - & - & - & - \tabularnewline
96 & 5672.4 & - & - & - & - & - & - & - \tabularnewline
97 & 5458.6 & - & - & - & - & - & - & - \tabularnewline
98 & 5716.9 & - & - & - & - & - & - & - \tabularnewline
99 & 5828.1 & - & - & - & - & - & - & - \tabularnewline
100 & 5706.85 & - & - & - & - & - & - & - \tabularnewline
101 & 5888.3 & - & - & - & - & - & - & - \tabularnewline
102 & 6007.7 & - & - & - & - & - & - & - \tabularnewline
103 & 5581.85 & - & - & - & - & - & - & - \tabularnewline
104 & 5970.95 & - & - & - & - & - & - & - \tabularnewline
105 & 6190.4 & 6192.5191 & 6014.7415 & 6370.2967 & 0.4907 & 0.9927 & 0.0272 & 0.9927 \tabularnewline
106 & 6079.15 & 6096.718 & 5851.208 & 6342.2279 & 0.4442 & 0.2273 & 0.0473 & 0.8423 \tabularnewline
107 & 5902.2 & 5898.8011 & 5599.1125 & 6198.4897 & 0.4911 & 0.1191 & 0.1219 & 0.3185 \tabularnewline
108 & 5554.4 & 5586.2994 & 5241.2068 & 5931.392 & 0.4281 & 0.0364 & 0.3124 & 0.0145 \tabularnewline
109 & 5320.45 & 5431.063 & 5045.7795 & 5816.3465 & 0.2868 & 0.2652 & 0.4443 & 0.003 \tabularnewline
110 & 5683.1 & 5715.8898 & 5294.2571 & 6137.5225 & 0.4394 & 0.967 & 0.4981 & 0.1179 \tabularnewline
111 & 5987.9 & 5890.7078 & 5435.6122 & 6345.8035 & 0.3378 & 0.8144 & 0.6063 & 0.3648 \tabularnewline
112 & 5843.7 & 5728.6418 & 5242.3828 & 6214.9008 & 0.3214 & 0.148 & 0.535 & 0.1644 \tabularnewline
113 & 5917.5 & 5860.0477 & 5344.505 & 6375.5903 & 0.4135 & 0.5248 & 0.4572 & 0.3366 \tabularnewline
114 & 6299.45 & 6037.8718 & 5494.622 & 6581.1216 & 0.1726 & 0.668 & 0.5433 & 0.5954 \tabularnewline
115 & 5846.75 & 5575.6203 & 5006.0094 & 6145.2313 & 0.1754 & 0.0064 & 0.4914 & 0.0869 \tabularnewline
116 & 5998.1 & 6072.9573 & 5478.1523 & 6667.7622 & 0.4026 & 0.772 & 0.6316 & 0.6316 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301940&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[104])[/C][/ROW]
[ROW][C]92[/C][C]6143.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]6366.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]6306.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]6077[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]5672.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]5458.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]5716.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]5828.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]5706.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]5888.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]6007.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]5581.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]5970.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]6190.4[/C][C]6192.5191[/C][C]6014.7415[/C][C]6370.2967[/C][C]0.4907[/C][C]0.9927[/C][C]0.0272[/C][C]0.9927[/C][/ROW]
[ROW][C]106[/C][C]6079.15[/C][C]6096.718[/C][C]5851.208[/C][C]6342.2279[/C][C]0.4442[/C][C]0.2273[/C][C]0.0473[/C][C]0.8423[/C][/ROW]
[ROW][C]107[/C][C]5902.2[/C][C]5898.8011[/C][C]5599.1125[/C][C]6198.4897[/C][C]0.4911[/C][C]0.1191[/C][C]0.1219[/C][C]0.3185[/C][/ROW]
[ROW][C]108[/C][C]5554.4[/C][C]5586.2994[/C][C]5241.2068[/C][C]5931.392[/C][C]0.4281[/C][C]0.0364[/C][C]0.3124[/C][C]0.0145[/C][/ROW]
[ROW][C]109[/C][C]5320.45[/C][C]5431.063[/C][C]5045.7795[/C][C]5816.3465[/C][C]0.2868[/C][C]0.2652[/C][C]0.4443[/C][C]0.003[/C][/ROW]
[ROW][C]110[/C][C]5683.1[/C][C]5715.8898[/C][C]5294.2571[/C][C]6137.5225[/C][C]0.4394[/C][C]0.967[/C][C]0.4981[/C][C]0.1179[/C][/ROW]
[ROW][C]111[/C][C]5987.9[/C][C]5890.7078[/C][C]5435.6122[/C][C]6345.8035[/C][C]0.3378[/C][C]0.8144[/C][C]0.6063[/C][C]0.3648[/C][/ROW]
[ROW][C]112[/C][C]5843.7[/C][C]5728.6418[/C][C]5242.3828[/C][C]6214.9008[/C][C]0.3214[/C][C]0.148[/C][C]0.535[/C][C]0.1644[/C][/ROW]
[ROW][C]113[/C][C]5917.5[/C][C]5860.0477[/C][C]5344.505[/C][C]6375.5903[/C][C]0.4135[/C][C]0.5248[/C][C]0.4572[/C][C]0.3366[/C][/ROW]
[ROW][C]114[/C][C]6299.45[/C][C]6037.8718[/C][C]5494.622[/C][C]6581.1216[/C][C]0.1726[/C][C]0.668[/C][C]0.5433[/C][C]0.5954[/C][/ROW]
[ROW][C]115[/C][C]5846.75[/C][C]5575.6203[/C][C]5006.0094[/C][C]6145.2313[/C][C]0.1754[/C][C]0.0064[/C][C]0.4914[/C][C]0.0869[/C][/ROW]
[ROW][C]116[/C][C]5998.1[/C][C]6072.9573[/C][C]5478.1523[/C][C]6667.7622[/C][C]0.4026[/C][C]0.772[/C][C]0.6316[/C][C]0.6316[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301940&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301940&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[104])
926143.95-------
936366.95-------
946306.1-------
956077-------
965672.4-------
975458.6-------
985716.9-------
995828.1-------
1005706.85-------
1015888.3-------
1026007.7-------
1035581.85-------
1045970.95-------
1056190.46192.51916014.74156370.29670.49070.99270.02720.9927
1066079.156096.7185851.2086342.22790.44420.22730.04730.8423
1075902.25898.80115599.11256198.48970.49110.11910.12190.3185
1085554.45586.29945241.20685931.3920.42810.03640.31240.0145
1095320.455431.0635045.77955816.34650.28680.26520.44430.003
1105683.15715.88985294.25716137.52250.43940.9670.49810.1179
1115987.95890.70785435.61226345.80350.33780.81440.60630.3648
1125843.75728.64185242.38286214.90080.32140.1480.5350.1644
1135917.55860.04775344.5056375.59030.41350.52480.45720.3366
1146299.456037.87185494.6226581.12160.17260.6680.54330.5954
1155846.755575.62035006.00946145.23130.17540.00640.49140.0869
1165998.16072.95735478.15236667.76220.40260.7720.63160.6316







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1050.0146-3e-043e-043e-044.490500-0.00850.0085
1060.0205-0.00290.00160.0016308.6333156.561912.5125-0.07050.0395
1070.02596e-040.00130.001311.5526108.225510.40310.01360.0309
1080.0315-0.00570.00240.00241017.5703335.561718.3183-0.1280.0552
1090.0362-0.02080.00610.00612235.22532715.494452.1104-0.44380.1329
1100.0376-0.00580.0060.0061075.1692442.106849.4177-0.13160.1327
1110.03940.01620.00750.00759446.31423442.707958.67460.390.1694
1120.04330.01970.0090.00913238.38564667.167668.31670.46170.206
1130.04490.00970.00910.00913300.77234515.345967.19630.23050.2087
1140.04590.04150.01230.012468423.159710906.1273104.43241.04960.2928
1150.05210.04640.01540.015673511.29616597.5063128.83131.08790.3651
1160.05-0.01250.01520.01535603.608815681.3481125.2252-0.30040.3597

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
105 & 0.0146 & -3e-04 & 3e-04 & 3e-04 & 4.4905 & 0 & 0 & -0.0085 & 0.0085 \tabularnewline
106 & 0.0205 & -0.0029 & 0.0016 & 0.0016 & 308.6333 & 156.5619 & 12.5125 & -0.0705 & 0.0395 \tabularnewline
107 & 0.0259 & 6e-04 & 0.0013 & 0.0013 & 11.5526 & 108.2255 & 10.4031 & 0.0136 & 0.0309 \tabularnewline
108 & 0.0315 & -0.0057 & 0.0024 & 0.0024 & 1017.5703 & 335.5617 & 18.3183 & -0.128 & 0.0552 \tabularnewline
109 & 0.0362 & -0.0208 & 0.0061 & 0.006 & 12235.2253 & 2715.4944 & 52.1104 & -0.4438 & 0.1329 \tabularnewline
110 & 0.0376 & -0.0058 & 0.006 & 0.006 & 1075.169 & 2442.1068 & 49.4177 & -0.1316 & 0.1327 \tabularnewline
111 & 0.0394 & 0.0162 & 0.0075 & 0.0075 & 9446.3142 & 3442.7079 & 58.6746 & 0.39 & 0.1694 \tabularnewline
112 & 0.0433 & 0.0197 & 0.009 & 0.009 & 13238.3856 & 4667.1676 & 68.3167 & 0.4617 & 0.206 \tabularnewline
113 & 0.0449 & 0.0097 & 0.0091 & 0.0091 & 3300.7723 & 4515.3459 & 67.1963 & 0.2305 & 0.2087 \tabularnewline
114 & 0.0459 & 0.0415 & 0.0123 & 0.0124 & 68423.1597 & 10906.1273 & 104.4324 & 1.0496 & 0.2928 \tabularnewline
115 & 0.0521 & 0.0464 & 0.0154 & 0.0156 & 73511.296 & 16597.5063 & 128.8313 & 1.0879 & 0.3651 \tabularnewline
116 & 0.05 & -0.0125 & 0.0152 & 0.0153 & 5603.6088 & 15681.3481 & 125.2252 & -0.3004 & 0.3597 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301940&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]105[/C][C]0.0146[/C][C]-3e-04[/C][C]3e-04[/C][C]3e-04[/C][C]4.4905[/C][C]0[/C][C]0[/C][C]-0.0085[/C][C]0.0085[/C][/ROW]
[ROW][C]106[/C][C]0.0205[/C][C]-0.0029[/C][C]0.0016[/C][C]0.0016[/C][C]308.6333[/C][C]156.5619[/C][C]12.5125[/C][C]-0.0705[/C][C]0.0395[/C][/ROW]
[ROW][C]107[/C][C]0.0259[/C][C]6e-04[/C][C]0.0013[/C][C]0.0013[/C][C]11.5526[/C][C]108.2255[/C][C]10.4031[/C][C]0.0136[/C][C]0.0309[/C][/ROW]
[ROW][C]108[/C][C]0.0315[/C][C]-0.0057[/C][C]0.0024[/C][C]0.0024[/C][C]1017.5703[/C][C]335.5617[/C][C]18.3183[/C][C]-0.128[/C][C]0.0552[/C][/ROW]
[ROW][C]109[/C][C]0.0362[/C][C]-0.0208[/C][C]0.0061[/C][C]0.006[/C][C]12235.2253[/C][C]2715.4944[/C][C]52.1104[/C][C]-0.4438[/C][C]0.1329[/C][/ROW]
[ROW][C]110[/C][C]0.0376[/C][C]-0.0058[/C][C]0.006[/C][C]0.006[/C][C]1075.169[/C][C]2442.1068[/C][C]49.4177[/C][C]-0.1316[/C][C]0.1327[/C][/ROW]
[ROW][C]111[/C][C]0.0394[/C][C]0.0162[/C][C]0.0075[/C][C]0.0075[/C][C]9446.3142[/C][C]3442.7079[/C][C]58.6746[/C][C]0.39[/C][C]0.1694[/C][/ROW]
[ROW][C]112[/C][C]0.0433[/C][C]0.0197[/C][C]0.009[/C][C]0.009[/C][C]13238.3856[/C][C]4667.1676[/C][C]68.3167[/C][C]0.4617[/C][C]0.206[/C][/ROW]
[ROW][C]113[/C][C]0.0449[/C][C]0.0097[/C][C]0.0091[/C][C]0.0091[/C][C]3300.7723[/C][C]4515.3459[/C][C]67.1963[/C][C]0.2305[/C][C]0.2087[/C][/ROW]
[ROW][C]114[/C][C]0.0459[/C][C]0.0415[/C][C]0.0123[/C][C]0.0124[/C][C]68423.1597[/C][C]10906.1273[/C][C]104.4324[/C][C]1.0496[/C][C]0.2928[/C][/ROW]
[ROW][C]115[/C][C]0.0521[/C][C]0.0464[/C][C]0.0154[/C][C]0.0156[/C][C]73511.296[/C][C]16597.5063[/C][C]128.8313[/C][C]1.0879[/C][C]0.3651[/C][/ROW]
[ROW][C]116[/C][C]0.05[/C][C]-0.0125[/C][C]0.0152[/C][C]0.0153[/C][C]5603.6088[/C][C]15681.3481[/C][C]125.2252[/C][C]-0.3004[/C][C]0.3597[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301940&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301940&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
1050.0146-3e-043e-043e-044.490500-0.00850.0085
1060.0205-0.00290.00160.0016308.6333156.561912.5125-0.07050.0395
1070.02596e-040.00130.001311.5526108.225510.40310.01360.0309
1080.0315-0.00570.00240.00241017.5703335.561718.3183-0.1280.0552
1090.0362-0.02080.00610.00612235.22532715.494452.1104-0.44380.1329
1100.0376-0.00580.0060.0061075.1692442.106849.4177-0.13160.1327
1110.03940.01620.00750.00759446.31423442.707958.67460.390.1694
1120.04330.01970.0090.00913238.38564667.167668.31670.46170.206
1130.04490.00970.00910.00913300.77234515.345967.19630.23050.2087
1140.04590.04150.01230.012468423.159710906.1273104.43241.04960.2928
1150.05210.04640.01540.015673511.29616597.5063128.83131.08790.3651
1160.05-0.01250.01520.01535603.608815681.3481125.2252-0.30040.3597



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