Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 02 Apr 2024 03:59:38 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2024/Apr/02/t1712023463pr3tb85ged37ij7.htm/, Retrieved Thu, 27 Aug 2026 21:20:13 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Thu, 27 Aug 2026 21:20:13 +0200
QR Codes:

Original text written by user:
IsPrivate?This computation is private
User-defined keywordsCPI Forecast 2024 Sept
Estimated Impact0
Dataseries X:
168.8
169.8
171.2
171.3
171.5
172.4
172.8
172.8
173.7
174.0
174.1
174.0
175.1
175.8
176.2
176.9
177.7
178.0
177.5
177.5
178.3
177.7
177.4
176.7
177.1
177.8
178.8
179.8
179.8
179.9
180.1
180.7
181.0
181.3
181.3
180.9
181.7
183.1
184.2
183.8
183.5
183.7
183.9
184.6
185.2
185.0
184.5
184.3
185.2
186.2
187.4
188.0
189.1
189.7
189.4
189.5
189.9
190.9
191.0
190.3
190.7
191.8
193.3
194.6
194.4
194.5
195.4
196.4
198.8
199.2
197.6
196.8
198.3
198.7
199.8
201.5
202.5
202.9
203.5
203.9
202.9
201.8
201.5
201.8
202.416
203.499
205.352
206.686
207.949
208.352
208.299
207.917
208.490
208.936
210.177
210.036
211.080
211.693
213.528
214.823
216.632
218.815
219.964
219.086
218.783
216.573
212.425
210.228
211.143
212.193
212.709
213.240
213.856
215.693
215.351
215.834
215.969
216.177
216.330
215.949
216.687
216.741
217.631
218.009
218.178
217.965
218.011
218.312
218.439
218.711
218.803
219.179
220.223
221.309
223.467
224.906
225.964
225.722
225.922
226.545
226.889
226.421
226.230
225.672
226.665
227.663
229.392
230.085
229.815
229.478
229.104
230.379
231.407
231.317
230.221
229.601
230.280
232.166
232.773
232.531
232.945
233.504
233.596
233.877
234.149
233.546
233.069
233.049
233.916
234.781
236.293
237.072
237.900
238.343
238.250
237.852
238.031
237.433
236.151
234.812
233.707
234.722
236.119
236.599
237.805
238.638
238.654
238.316
237.945
237.838
237.336
236.525
236.916
237.111
238.132
239.261
240.229
241.018
240.628
240.849
241.428
241.729
241.353
241.432
242.839
243.603
243.801
244.524
244.733
244.955
244.786
245.519
246.819
246.663
246.669
246.524
247.867
248.991
249.554
250.546
251.588
251.989
252.006
252.146
252.439
252.885
252.038
251.233
251.712
252.776
254.202
255.548
256.092
256.143
256.571
256.558
256.759
257.346
257.208
256.974
257.971
258.678
258.115
256.389
256.394
257.797
259.101
259.918
260.280
260.388
260.229
260.474
261.582
263.014
264.877
267.054
269.195
271.696
273.003
273.567
274.310
276.589
277.948
278.802
281.148
283.716
287.504
289.109
292.296
296.311
296.276
296.171
296.808
298.012
297.711
296.797
299.170
300.840
301.836
303.363
304.127
305.109
305.691
307.026
307.789
307.671
307.051
306.746
308.417
310.326




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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[283])
271296.276-------
272296.171-------
273296.808-------
274298.012-------
275297.711-------
276296.797-------
277299.17-------
278300.84-------
279301.836-------
280303.363-------
281304.127-------
282305.109-------
283305.691-------
284307.026306.1228304.8312307.41440.08520.743810.7438
285307.789306.6174304.1651309.06960.17450.37210.7705
286307.671306.7892303.422310.15630.30390.280310.7387
287307.051306.4469302.3293310.56450.38680.2810.6405
288306.746306.0988301.339310.85850.39490.34750.99990.5667
289308.417307.068301.7408312.39510.30980.54720.99820.6938
290310.326308.1441302.3041313.9840.2320.46350.99290.7948

\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[283]) \tabularnewline
271 & 296.276 & - & - & - & - & - & - & - \tabularnewline
272 & 296.171 & - & - & - & - & - & - & - \tabularnewline
273 & 296.808 & - & - & - & - & - & - & - \tabularnewline
274 & 298.012 & - & - & - & - & - & - & - \tabularnewline
275 & 297.711 & - & - & - & - & - & - & - \tabularnewline
276 & 296.797 & - & - & - & - & - & - & - \tabularnewline
277 & 299.17 & - & - & - & - & - & - & - \tabularnewline
278 & 300.84 & - & - & - & - & - & - & - \tabularnewline
279 & 301.836 & - & - & - & - & - & - & - \tabularnewline
280 & 303.363 & - & - & - & - & - & - & - \tabularnewline
281 & 304.127 & - & - & - & - & - & - & - \tabularnewline
282 & 305.109 & - & - & - & - & - & - & - \tabularnewline
283 & 305.691 & - & - & - & - & - & - & - \tabularnewline
284 & 307.026 & 306.1228 & 304.8312 & 307.4144 & 0.0852 & 0.7438 & 1 & 0.7438 \tabularnewline
285 & 307.789 & 306.6174 & 304.1651 & 309.0696 & 0.1745 & 0.372 & 1 & 0.7705 \tabularnewline
286 & 307.671 & 306.7892 & 303.422 & 310.1563 & 0.3039 & 0.2803 & 1 & 0.7387 \tabularnewline
287 & 307.051 & 306.4469 & 302.3293 & 310.5645 & 0.3868 & 0.28 & 1 & 0.6405 \tabularnewline
288 & 306.746 & 306.0988 & 301.339 & 310.8585 & 0.3949 & 0.3475 & 0.9999 & 0.5667 \tabularnewline
289 & 308.417 & 307.068 & 301.7408 & 312.3951 & 0.3098 & 0.5472 & 0.9982 & 0.6938 \tabularnewline
290 & 310.326 & 308.1441 & 302.3041 & 313.984 & 0.232 & 0.4635 & 0.9929 & 0.7948 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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[283])[/C][/ROW]
[ROW][C]271[/C][C]296.276[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]272[/C][C]296.171[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]273[/C][C]296.808[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]274[/C][C]298.012[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]275[/C][C]297.711[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]276[/C][C]296.797[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]277[/C][C]299.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]278[/C][C]300.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]279[/C][C]301.836[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]280[/C][C]303.363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]281[/C][C]304.127[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]282[/C][C]305.109[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]283[/C][C]305.691[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]284[/C][C]307.026[/C][C]306.1228[/C][C]304.8312[/C][C]307.4144[/C][C]0.0852[/C][C]0.7438[/C][C]1[/C][C]0.7438[/C][/ROW]
[ROW][C]285[/C][C]307.789[/C][C]306.6174[/C][C]304.1651[/C][C]309.0696[/C][C]0.1745[/C][C]0.372[/C][C]1[/C][C]0.7705[/C][/ROW]
[ROW][C]286[/C][C]307.671[/C][C]306.7892[/C][C]303.422[/C][C]310.1563[/C][C]0.3039[/C][C]0.2803[/C][C]1[/C][C]0.7387[/C][/ROW]
[ROW][C]287[/C][C]307.051[/C][C]306.4469[/C][C]302.3293[/C][C]310.5645[/C][C]0.3868[/C][C]0.28[/C][C]1[/C][C]0.6405[/C][/ROW]
[ROW][C]288[/C][C]306.746[/C][C]306.0988[/C][C]301.339[/C][C]310.8585[/C][C]0.3949[/C][C]0.3475[/C][C]0.9999[/C][C]0.5667[/C][/ROW]
[ROW][C]289[/C][C]308.417[/C][C]307.068[/C][C]301.7408[/C][C]312.3951[/C][C]0.3098[/C][C]0.5472[/C][C]0.9982[/C][C]0.6938[/C][/ROW]
[ROW][C]290[/C][C]310.326[/C][C]308.1441[/C][C]302.3041[/C][C]313.984[/C][C]0.232[/C][C]0.4635[/C][C]0.9929[/C][C]0.7948[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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[283])
271296.276-------
272296.171-------
273296.808-------
274298.012-------
275297.711-------
276296.797-------
277299.17-------
278300.84-------
279301.836-------
280303.363-------
281304.127-------
282305.109-------
283305.691-------
284307.026306.1228304.8312307.41440.08520.743810.7438
285307.789306.6174304.1651309.06960.17450.37210.7705
286307.671306.7892303.422310.15630.30390.280310.7387
287307.051306.4469302.3293310.56450.38680.2810.6405
288306.746306.0988301.339310.85850.39490.34750.99990.5667
289308.417307.068301.7408312.39510.30980.54720.99820.6938
290310.326308.1441302.3041313.9840.2320.46350.99290.7948







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2840.00220.00290.00290.00290.8158001.00621.0062
2850.00410.00380.00340.00341.37271.09431.04611.30521.1557
2860.00560.00290.00320.00320.77760.98870.99430.98231.0979
2870.00690.0020.00290.00290.3650.83280.91260.6730.9917
2880.00790.00210.00270.00270.41890.750.8660.7210.9376
2890.00890.00440.0030.0031.81980.92830.96351.50281.0318
2900.00970.0070.00360.00364.76081.47581.21482.43071.2316

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
284 & 0.0022 & 0.0029 & 0.0029 & 0.0029 & 0.8158 & 0 & 0 & 1.0062 & 1.0062 \tabularnewline
285 & 0.0041 & 0.0038 & 0.0034 & 0.0034 & 1.3727 & 1.0943 & 1.0461 & 1.3052 & 1.1557 \tabularnewline
286 & 0.0056 & 0.0029 & 0.0032 & 0.0032 & 0.7776 & 0.9887 & 0.9943 & 0.9823 & 1.0979 \tabularnewline
287 & 0.0069 & 0.002 & 0.0029 & 0.0029 & 0.365 & 0.8328 & 0.9126 & 0.673 & 0.9917 \tabularnewline
288 & 0.0079 & 0.0021 & 0.0027 & 0.0027 & 0.4189 & 0.75 & 0.866 & 0.721 & 0.9376 \tabularnewline
289 & 0.0089 & 0.0044 & 0.003 & 0.003 & 1.8198 & 0.9283 & 0.9635 & 1.5028 & 1.0318 \tabularnewline
290 & 0.0097 & 0.007 & 0.0036 & 0.0036 & 4.7608 & 1.4758 & 1.2148 & 2.4307 & 1.2316 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]284[/C][C]0.0022[/C][C]0.0029[/C][C]0.0029[/C][C]0.0029[/C][C]0.8158[/C][C]0[/C][C]0[/C][C]1.0062[/C][C]1.0062[/C][/ROW]
[ROW][C]285[/C][C]0.0041[/C][C]0.0038[/C][C]0.0034[/C][C]0.0034[/C][C]1.3727[/C][C]1.0943[/C][C]1.0461[/C][C]1.3052[/C][C]1.1557[/C][/ROW]
[ROW][C]286[/C][C]0.0056[/C][C]0.0029[/C][C]0.0032[/C][C]0.0032[/C][C]0.7776[/C][C]0.9887[/C][C]0.9943[/C][C]0.9823[/C][C]1.0979[/C][/ROW]
[ROW][C]287[/C][C]0.0069[/C][C]0.002[/C][C]0.0029[/C][C]0.0029[/C][C]0.365[/C][C]0.8328[/C][C]0.9126[/C][C]0.673[/C][C]0.9917[/C][/ROW]
[ROW][C]288[/C][C]0.0079[/C][C]0.0021[/C][C]0.0027[/C][C]0.0027[/C][C]0.4189[/C][C]0.75[/C][C]0.866[/C][C]0.721[/C][C]0.9376[/C][/ROW]
[ROW][C]289[/C][C]0.0089[/C][C]0.0044[/C][C]0.003[/C][C]0.003[/C][C]1.8198[/C][C]0.9283[/C][C]0.9635[/C][C]1.5028[/C][C]1.0318[/C][/ROW]
[ROW][C]290[/C][C]0.0097[/C][C]0.007[/C][C]0.0036[/C][C]0.0036[/C][C]4.7608[/C][C]1.4758[/C][C]1.2148[/C][C]2.4307[/C][C]1.2316[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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
2840.00220.00290.00290.00290.8158001.00621.0062
2850.00410.00380.00340.00341.37271.09431.04611.30521.1557
2860.00560.00290.00320.00320.77760.98870.99430.98231.0979
2870.00690.0020.00290.00290.3650.83280.91260.6730.9917
2880.00790.00210.00270.00270.41890.750.8660.7210.9376
2890.00890.00440.0030.0031.81980.92830.96351.50281.0318
2900.00970.0070.00360.00364.76081.47581.21482.43071.2316



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