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 computationTue, 14 Dec 2010 10:04:12 +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/14/t1292320949gzv87a8dbata05q.htm/, Retrieved Thu, 02 May 2024 15:45:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=109338, Retrieved Thu, 02 May 2024 15:45:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact138
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [Faillissementen V...] [2010-12-14 08:51:21] [13c73ac943380855a1c72833078e44d2]
-   P   [(Partial) Autocorrelation Function] [Faillissementen V...] [2010-12-14 09:09:28] [13c73ac943380855a1c72833078e44d2]
- RMP     [Spectral Analysis] [Faillissementen V...] [2010-12-14 09:27:52] [13c73ac943380855a1c72833078e44d2]
- RMP         [ARIMA Forecasting] [Faillissementen V...] [2010-12-14 10:04:12] [8e16b01a5be2b3f7f3ad6418d9d6fd5b] [Current]
Feedback Forum

Post a new message
Dataseries X:
356
386
444
387
327
448
225
182
460
411
342
361
377
331
428
340
352
461
221
198
422
329
320
375
364
351
380
319
322
386
221
187
344
342
365
313
356
337
389
326
343
357
220
218
391
425
332
298
360
336
325
393
301
426
265
210
429
440
357
431
442
442
544
420
396
482
261
211
448
468
464
425




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109338&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 time2 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[60])
48298-------
49360-------
50336-------
51325-------
52393-------
53301-------
54426-------
55265-------
56210-------
57429-------
58440-------
59357-------
60431-------
61442395.8273326.3797494.7610.18020.2430.76110.243
62442360.2029300.198443.89270.02770.02770.71460.0487
63544437.3856355.1457558.21310.04190.47020.96590.5413
64420359.9133295.3404452.79160.10241e-040.24250.0668
65396336.6842278.6252418.79780.07840.02340.80280.0122
66482435.0959347.5044568.18890.24490.71760.55330.524
67261230.6341198.5645272.62550.078200.05430
68211200.6556175.0624233.33120.26751e-040.28760
69448416.286333.7031540.82770.30890.99940.42070.4084
70468384.9676312.0335492.50550.06510.12530.15790.2007
71464347.8332285.7623436.9040.00530.00410.42010.0336
72425355.6157291.2909448.47030.07150.01110.05580.0558

\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[60]) \tabularnewline
48 & 298 & - & - & - & - & - & - & - \tabularnewline
49 & 360 & - & - & - & - & - & - & - \tabularnewline
50 & 336 & - & - & - & - & - & - & - \tabularnewline
51 & 325 & - & - & - & - & - & - & - \tabularnewline
52 & 393 & - & - & - & - & - & - & - \tabularnewline
53 & 301 & - & - & - & - & - & - & - \tabularnewline
54 & 426 & - & - & - & - & - & - & - \tabularnewline
55 & 265 & - & - & - & - & - & - & - \tabularnewline
56 & 210 & - & - & - & - & - & - & - \tabularnewline
57 & 429 & - & - & - & - & - & - & - \tabularnewline
58 & 440 & - & - & - & - & - & - & - \tabularnewline
59 & 357 & - & - & - & - & - & - & - \tabularnewline
60 & 431 & - & - & - & - & - & - & - \tabularnewline
61 & 442 & 395.8273 & 326.3797 & 494.761 & 0.1802 & 0.243 & 0.7611 & 0.243 \tabularnewline
62 & 442 & 360.2029 & 300.198 & 443.8927 & 0.0277 & 0.0277 & 0.7146 & 0.0487 \tabularnewline
63 & 544 & 437.3856 & 355.1457 & 558.2131 & 0.0419 & 0.4702 & 0.9659 & 0.5413 \tabularnewline
64 & 420 & 359.9133 & 295.3404 & 452.7916 & 0.1024 & 1e-04 & 0.2425 & 0.0668 \tabularnewline
65 & 396 & 336.6842 & 278.6252 & 418.7978 & 0.0784 & 0.0234 & 0.8028 & 0.0122 \tabularnewline
66 & 482 & 435.0959 & 347.5044 & 568.1889 & 0.2449 & 0.7176 & 0.5533 & 0.524 \tabularnewline
67 & 261 & 230.6341 & 198.5645 & 272.6255 & 0.0782 & 0 & 0.0543 & 0 \tabularnewline
68 & 211 & 200.6556 & 175.0624 & 233.3312 & 0.2675 & 1e-04 & 0.2876 & 0 \tabularnewline
69 & 448 & 416.286 & 333.7031 & 540.8277 & 0.3089 & 0.9994 & 0.4207 & 0.4084 \tabularnewline
70 & 468 & 384.9676 & 312.0335 & 492.5055 & 0.0651 & 0.1253 & 0.1579 & 0.2007 \tabularnewline
71 & 464 & 347.8332 & 285.7623 & 436.904 & 0.0053 & 0.0041 & 0.4201 & 0.0336 \tabularnewline
72 & 425 & 355.6157 & 291.2909 & 448.4703 & 0.0715 & 0.0111 & 0.0558 & 0.0558 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109338&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[60])[/C][/ROW]
[ROW][C]48[/C][C]298[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]336[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]325[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]393[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]301[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]426[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]265[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]210[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]429[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]440[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]431[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]442[/C][C]395.8273[/C][C]326.3797[/C][C]494.761[/C][C]0.1802[/C][C]0.243[/C][C]0.7611[/C][C]0.243[/C][/ROW]
[ROW][C]62[/C][C]442[/C][C]360.2029[/C][C]300.198[/C][C]443.8927[/C][C]0.0277[/C][C]0.0277[/C][C]0.7146[/C][C]0.0487[/C][/ROW]
[ROW][C]63[/C][C]544[/C][C]437.3856[/C][C]355.1457[/C][C]558.2131[/C][C]0.0419[/C][C]0.4702[/C][C]0.9659[/C][C]0.5413[/C][/ROW]
[ROW][C]64[/C][C]420[/C][C]359.9133[/C][C]295.3404[/C][C]452.7916[/C][C]0.1024[/C][C]1e-04[/C][C]0.2425[/C][C]0.0668[/C][/ROW]
[ROW][C]65[/C][C]396[/C][C]336.6842[/C][C]278.6252[/C][C]418.7978[/C][C]0.0784[/C][C]0.0234[/C][C]0.8028[/C][C]0.0122[/C][/ROW]
[ROW][C]66[/C][C]482[/C][C]435.0959[/C][C]347.5044[/C][C]568.1889[/C][C]0.2449[/C][C]0.7176[/C][C]0.5533[/C][C]0.524[/C][/ROW]
[ROW][C]67[/C][C]261[/C][C]230.6341[/C][C]198.5645[/C][C]272.6255[/C][C]0.0782[/C][C]0[/C][C]0.0543[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]211[/C][C]200.6556[/C][C]175.0624[/C][C]233.3312[/C][C]0.2675[/C][C]1e-04[/C][C]0.2876[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]448[/C][C]416.286[/C][C]333.7031[/C][C]540.8277[/C][C]0.3089[/C][C]0.9994[/C][C]0.4207[/C][C]0.4084[/C][/ROW]
[ROW][C]70[/C][C]468[/C][C]384.9676[/C][C]312.0335[/C][C]492.5055[/C][C]0.0651[/C][C]0.1253[/C][C]0.1579[/C][C]0.2007[/C][/ROW]
[ROW][C]71[/C][C]464[/C][C]347.8332[/C][C]285.7623[/C][C]436.904[/C][C]0.0053[/C][C]0.0041[/C][C]0.4201[/C][C]0.0336[/C][/ROW]
[ROW][C]72[/C][C]425[/C][C]355.6157[/C][C]291.2909[/C][C]448.4703[/C][C]0.0715[/C][C]0.0111[/C][C]0.0558[/C][C]0.0558[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109338&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109338&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[60])
48298-------
49360-------
50336-------
51325-------
52393-------
53301-------
54426-------
55265-------
56210-------
57429-------
58440-------
59357-------
60431-------
61442395.8273326.3797494.7610.18020.2430.76110.243
62442360.2029300.198443.89270.02770.02770.71460.0487
63544437.3856355.1457558.21310.04190.47020.96590.5413
64420359.9133295.3404452.79160.10241e-040.24250.0668
65396336.6842278.6252418.79780.07840.02340.80280.0122
66482435.0959347.5044568.18890.24490.71760.55330.524
67261230.6341198.5645272.62550.078200.05430
68211200.6556175.0624233.33120.26751e-040.28760
69448416.286333.7031540.82770.30890.99940.42070.4084
70468384.9676312.0335492.50550.06510.12530.15790.2007
71464347.8332285.7623436.9040.00530.00410.42010.0336
72425355.6157291.2909448.47030.07150.01110.05580.0558







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.12750.116602131.919900
620.11850.22710.17196690.77114411.345566.418
630.14090.24380.195811366.63156729.774282.0352
640.13170.16690.18863610.4135949.933977.1358
650.12440.17620.18613518.36135463.619473.9163
660.15610.10780.17312199.99144919.681470.1404
670.09290.13170.1672922.0864348.596365.9439
680.08310.05160.1527107.00733818.397761.7932
690.15260.07620.14421005.77633505.884259.2105
700.14250.21570.15146894.38153844.733962.0059
710.13060.3340.16813494.71634722.005168.7168
720.13320.19510.17024814.17714729.686168.7727

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1275 & 0.1166 & 0 & 2131.9199 & 0 & 0 \tabularnewline
62 & 0.1185 & 0.2271 & 0.1719 & 6690.7711 & 4411.3455 & 66.418 \tabularnewline
63 & 0.1409 & 0.2438 & 0.1958 & 11366.6315 & 6729.7742 & 82.0352 \tabularnewline
64 & 0.1317 & 0.1669 & 0.1886 & 3610.413 & 5949.9339 & 77.1358 \tabularnewline
65 & 0.1244 & 0.1762 & 0.1861 & 3518.3613 & 5463.6194 & 73.9163 \tabularnewline
66 & 0.1561 & 0.1078 & 0.1731 & 2199.9914 & 4919.6814 & 70.1404 \tabularnewline
67 & 0.0929 & 0.1317 & 0.1672 & 922.086 & 4348.5963 & 65.9439 \tabularnewline
68 & 0.0831 & 0.0516 & 0.1527 & 107.0073 & 3818.3977 & 61.7932 \tabularnewline
69 & 0.1526 & 0.0762 & 0.1442 & 1005.7763 & 3505.8842 & 59.2105 \tabularnewline
70 & 0.1425 & 0.2157 & 0.1514 & 6894.3815 & 3844.7339 & 62.0059 \tabularnewline
71 & 0.1306 & 0.334 & 0.168 & 13494.7163 & 4722.0051 & 68.7168 \tabularnewline
72 & 0.1332 & 0.1951 & 0.1702 & 4814.1771 & 4729.6861 & 68.7727 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109338&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]61[/C][C]0.1275[/C][C]0.1166[/C][C]0[/C][C]2131.9199[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1185[/C][C]0.2271[/C][C]0.1719[/C][C]6690.7711[/C][C]4411.3455[/C][C]66.418[/C][/ROW]
[ROW][C]63[/C][C]0.1409[/C][C]0.2438[/C][C]0.1958[/C][C]11366.6315[/C][C]6729.7742[/C][C]82.0352[/C][/ROW]
[ROW][C]64[/C][C]0.1317[/C][C]0.1669[/C][C]0.1886[/C][C]3610.413[/C][C]5949.9339[/C][C]77.1358[/C][/ROW]
[ROW][C]65[/C][C]0.1244[/C][C]0.1762[/C][C]0.1861[/C][C]3518.3613[/C][C]5463.6194[/C][C]73.9163[/C][/ROW]
[ROW][C]66[/C][C]0.1561[/C][C]0.1078[/C][C]0.1731[/C][C]2199.9914[/C][C]4919.6814[/C][C]70.1404[/C][/ROW]
[ROW][C]67[/C][C]0.0929[/C][C]0.1317[/C][C]0.1672[/C][C]922.086[/C][C]4348.5963[/C][C]65.9439[/C][/ROW]
[ROW][C]68[/C][C]0.0831[/C][C]0.0516[/C][C]0.1527[/C][C]107.0073[/C][C]3818.3977[/C][C]61.7932[/C][/ROW]
[ROW][C]69[/C][C]0.1526[/C][C]0.0762[/C][C]0.1442[/C][C]1005.7763[/C][C]3505.8842[/C][C]59.2105[/C][/ROW]
[ROW][C]70[/C][C]0.1425[/C][C]0.2157[/C][C]0.1514[/C][C]6894.3815[/C][C]3844.7339[/C][C]62.0059[/C][/ROW]
[ROW][C]71[/C][C]0.1306[/C][C]0.334[/C][C]0.168[/C][C]13494.7163[/C][C]4722.0051[/C][C]68.7168[/C][/ROW]
[ROW][C]72[/C][C]0.1332[/C][C]0.1951[/C][C]0.1702[/C][C]4814.1771[/C][C]4729.6861[/C][C]68.7727[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109338&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109338&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
610.12750.116602131.919900
620.11850.22710.17196690.77114411.345566.418
630.14090.24380.195811366.63156729.774282.0352
640.13170.16690.18863610.4135949.933977.1358
650.12440.17620.18613518.36135463.619473.9163
660.15610.10780.17312199.99144919.681470.1404
670.09290.13170.1672922.0864348.596365.9439
680.08310.05160.1527107.00733818.397761.7932
690.15260.07620.14421005.77633505.884259.2105
700.14250.21570.15146894.38153844.733962.0059
710.13060.3340.16813494.71634722.005168.7168
720.13320.19510.17024814.17714729.686168.7727



Parameters (Session):
par1 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = -0.7 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; 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.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')