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, 22 Dec 2010 15:59:33 +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/22/t1293033535rupfctp637nws5k.htm/, Retrieved Sun, 05 May 2024 21:30:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114338, Retrieved Sun, 05 May 2024 21:30:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact166
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [s 0650692 paper] [2008-01-15 17:46:23] [d530bc48164a192180949b2df4f47d02]
-  MPD    [ARIMA Forecasting] [Arima forecasting] [2010-12-22 15:59:33] [7cc6e89f95359dcad314da35cb7f084f] [Current]
Feedback Forum

Post a new message
Dataseries X:
300
302
400
392
373
379
303
324
353
392
327
376
329
359
413
338
422
390
370
367
406
418
346
350
330
318
382
337
372
422
428
426
396
458
315
337
386
352
383
439
397
453
363
365
474
373
403
384
364
361
419
352
363
410
361
383
342
369
361
317
386
318
407
393
404
498
438




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 5 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114338&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114338&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114338&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 time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383373.4301300.3905446.46960.39870.63060.58950.6306
57342397.5502324.0174471.08290.06930.65090.02080.835
58369391.889318.3563465.42170.27090.90820.69270.7948
59361365.081291.5482438.61370.45670.45840.15610.5433
60317368.7248295.1938442.25590.0840.58160.34190.5816
61386362.4628289.0584435.86710.26480.88760.48360.5156
62318358.6774285.2731432.08170.13870.23280.47530.4753
63407388.9383315.534462.34260.31480.97090.21110.7722
64393373.9457300.5413447.350.30550.18870.72110.6352
65404378.827305.4227452.23130.25070.35260.66370.683
66498397.3078323.9035470.71220.00360.42910.36730.8338
67438371.4848298.0805444.88910.03794e-040.61020.6102

\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[55]) \tabularnewline
43 & 363 & - & - & - & - & - & - & - \tabularnewline
44 & 365 & - & - & - & - & - & - & - \tabularnewline
45 & 474 & - & - & - & - & - & - & - \tabularnewline
46 & 373 & - & - & - & - & - & - & - \tabularnewline
47 & 403 & - & - & - & - & - & - & - \tabularnewline
48 & 384 & - & - & - & - & - & - & - \tabularnewline
49 & 364 & - & - & - & - & - & - & - \tabularnewline
50 & 361 & - & - & - & - & - & - & - \tabularnewline
51 & 419 & - & - & - & - & - & - & - \tabularnewline
52 & 352 & - & - & - & - & - & - & - \tabularnewline
53 & 363 & - & - & - & - & - & - & - \tabularnewline
54 & 410 & - & - & - & - & - & - & - \tabularnewline
55 & 361 & - & - & - & - & - & - & - \tabularnewline
56 & 383 & 373.4301 & 300.3905 & 446.4696 & 0.3987 & 0.6306 & 0.5895 & 0.6306 \tabularnewline
57 & 342 & 397.5502 & 324.0174 & 471.0829 & 0.0693 & 0.6509 & 0.0208 & 0.835 \tabularnewline
58 & 369 & 391.889 & 318.3563 & 465.4217 & 0.2709 & 0.9082 & 0.6927 & 0.7948 \tabularnewline
59 & 361 & 365.081 & 291.5482 & 438.6137 & 0.4567 & 0.4584 & 0.1561 & 0.5433 \tabularnewline
60 & 317 & 368.7248 & 295.1938 & 442.2559 & 0.084 & 0.5816 & 0.3419 & 0.5816 \tabularnewline
61 & 386 & 362.4628 & 289.0584 & 435.8671 & 0.2648 & 0.8876 & 0.4836 & 0.5156 \tabularnewline
62 & 318 & 358.6774 & 285.2731 & 432.0817 & 0.1387 & 0.2328 & 0.4753 & 0.4753 \tabularnewline
63 & 407 & 388.9383 & 315.534 & 462.3426 & 0.3148 & 0.9709 & 0.2111 & 0.7722 \tabularnewline
64 & 393 & 373.9457 & 300.5413 & 447.35 & 0.3055 & 0.1887 & 0.7211 & 0.6352 \tabularnewline
65 & 404 & 378.827 & 305.4227 & 452.2313 & 0.2507 & 0.3526 & 0.6637 & 0.683 \tabularnewline
66 & 498 & 397.3078 & 323.9035 & 470.7122 & 0.0036 & 0.4291 & 0.3673 & 0.8338 \tabularnewline
67 & 438 & 371.4848 & 298.0805 & 444.8891 & 0.0379 & 4e-04 & 0.6102 & 0.6102 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114338&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[55])[/C][/ROW]
[ROW][C]43[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]365[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]373[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]403[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]364[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]419[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]352[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]410[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]383[/C][C]373.4301[/C][C]300.3905[/C][C]446.4696[/C][C]0.3987[/C][C]0.6306[/C][C]0.5895[/C][C]0.6306[/C][/ROW]
[ROW][C]57[/C][C]342[/C][C]397.5502[/C][C]324.0174[/C][C]471.0829[/C][C]0.0693[/C][C]0.6509[/C][C]0.0208[/C][C]0.835[/C][/ROW]
[ROW][C]58[/C][C]369[/C][C]391.889[/C][C]318.3563[/C][C]465.4217[/C][C]0.2709[/C][C]0.9082[/C][C]0.6927[/C][C]0.7948[/C][/ROW]
[ROW][C]59[/C][C]361[/C][C]365.081[/C][C]291.5482[/C][C]438.6137[/C][C]0.4567[/C][C]0.4584[/C][C]0.1561[/C][C]0.5433[/C][/ROW]
[ROW][C]60[/C][C]317[/C][C]368.7248[/C][C]295.1938[/C][C]442.2559[/C][C]0.084[/C][C]0.5816[/C][C]0.3419[/C][C]0.5816[/C][/ROW]
[ROW][C]61[/C][C]386[/C][C]362.4628[/C][C]289.0584[/C][C]435.8671[/C][C]0.2648[/C][C]0.8876[/C][C]0.4836[/C][C]0.5156[/C][/ROW]
[ROW][C]62[/C][C]318[/C][C]358.6774[/C][C]285.2731[/C][C]432.0817[/C][C]0.1387[/C][C]0.2328[/C][C]0.4753[/C][C]0.4753[/C][/ROW]
[ROW][C]63[/C][C]407[/C][C]388.9383[/C][C]315.534[/C][C]462.3426[/C][C]0.3148[/C][C]0.9709[/C][C]0.2111[/C][C]0.7722[/C][/ROW]
[ROW][C]64[/C][C]393[/C][C]373.9457[/C][C]300.5413[/C][C]447.35[/C][C]0.3055[/C][C]0.1887[/C][C]0.7211[/C][C]0.6352[/C][/ROW]
[ROW][C]65[/C][C]404[/C][C]378.827[/C][C]305.4227[/C][C]452.2313[/C][C]0.2507[/C][C]0.3526[/C][C]0.6637[/C][C]0.683[/C][/ROW]
[ROW][C]66[/C][C]498[/C][C]397.3078[/C][C]323.9035[/C][C]470.7122[/C][C]0.0036[/C][C]0.4291[/C][C]0.3673[/C][C]0.8338[/C][/ROW]
[ROW][C]67[/C][C]438[/C][C]371.4848[/C][C]298.0805[/C][C]444.8891[/C][C]0.0379[/C][C]4e-04[/C][C]0.6102[/C][C]0.6102[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114338&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114338&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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383373.4301300.3905446.46960.39870.63060.58950.6306
57342397.5502324.0174471.08290.06930.65090.02080.835
58369391.889318.3563465.42170.27090.90820.69270.7948
59361365.081291.5482438.61370.45670.45840.15610.5433
60317368.7248295.1938442.25590.0840.58160.34190.5816
61386362.4628289.0584435.86710.26480.88760.48360.5156
62318358.6774285.2731432.08170.13870.23280.47530.4753
63407388.9383315.534462.34260.31480.97090.21110.7722
64393373.9457300.5413447.350.30550.18870.72110.6352
65404378.827305.4227452.23130.25070.35260.66370.683
66498397.3078323.9035470.71220.00360.42910.36730.8338
67438371.4848298.0805444.88910.03794e-040.61020.6102







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.09980.02560.002191.58367.6322.7626
570.0944-0.13970.01163085.8197257.151616.0359
580.0957-0.05840.0049523.907543.6596.6075
590.1028-0.01129e-0416.65421.38781.1781
600.1017-0.14030.01172675.4601222.95514.9317
610.10330.06490.0054554.001446.16686.7946
620.1044-0.11340.00951654.6525137.887711.7426
630.09630.04640.0039326.225527.18555.214
640.10020.0510.0042363.068130.25575.5005
650.09890.06640.0055633.678652.80667.2668
660.09430.25340.021110138.912844.909329.0673
670.10080.17910.01494424.2738368.689519.2013

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.0998 & 0.0256 & 0.0021 & 91.5836 & 7.632 & 2.7626 \tabularnewline
57 & 0.0944 & -0.1397 & 0.0116 & 3085.8197 & 257.1516 & 16.0359 \tabularnewline
58 & 0.0957 & -0.0584 & 0.0049 & 523.9075 & 43.659 & 6.6075 \tabularnewline
59 & 0.1028 & -0.0112 & 9e-04 & 16.6542 & 1.3878 & 1.1781 \tabularnewline
60 & 0.1017 & -0.1403 & 0.0117 & 2675.4601 & 222.955 & 14.9317 \tabularnewline
61 & 0.1033 & 0.0649 & 0.0054 & 554.0014 & 46.1668 & 6.7946 \tabularnewline
62 & 0.1044 & -0.1134 & 0.0095 & 1654.6525 & 137.8877 & 11.7426 \tabularnewline
63 & 0.0963 & 0.0464 & 0.0039 & 326.2255 & 27.1855 & 5.214 \tabularnewline
64 & 0.1002 & 0.051 & 0.0042 & 363.0681 & 30.2557 & 5.5005 \tabularnewline
65 & 0.0989 & 0.0664 & 0.0055 & 633.6786 & 52.8066 & 7.2668 \tabularnewline
66 & 0.0943 & 0.2534 & 0.0211 & 10138.912 & 844.9093 & 29.0673 \tabularnewline
67 & 0.1008 & 0.1791 & 0.0149 & 4424.2738 & 368.6895 & 19.2013 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114338&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]56[/C][C]0.0998[/C][C]0.0256[/C][C]0.0021[/C][C]91.5836[/C][C]7.632[/C][C]2.7626[/C][/ROW]
[ROW][C]57[/C][C]0.0944[/C][C]-0.1397[/C][C]0.0116[/C][C]3085.8197[/C][C]257.1516[/C][C]16.0359[/C][/ROW]
[ROW][C]58[/C][C]0.0957[/C][C]-0.0584[/C][C]0.0049[/C][C]523.9075[/C][C]43.659[/C][C]6.6075[/C][/ROW]
[ROW][C]59[/C][C]0.1028[/C][C]-0.0112[/C][C]9e-04[/C][C]16.6542[/C][C]1.3878[/C][C]1.1781[/C][/ROW]
[ROW][C]60[/C][C]0.1017[/C][C]-0.1403[/C][C]0.0117[/C][C]2675.4601[/C][C]222.955[/C][C]14.9317[/C][/ROW]
[ROW][C]61[/C][C]0.1033[/C][C]0.0649[/C][C]0.0054[/C][C]554.0014[/C][C]46.1668[/C][C]6.7946[/C][/ROW]
[ROW][C]62[/C][C]0.1044[/C][C]-0.1134[/C][C]0.0095[/C][C]1654.6525[/C][C]137.8877[/C][C]11.7426[/C][/ROW]
[ROW][C]63[/C][C]0.0963[/C][C]0.0464[/C][C]0.0039[/C][C]326.2255[/C][C]27.1855[/C][C]5.214[/C][/ROW]
[ROW][C]64[/C][C]0.1002[/C][C]0.051[/C][C]0.0042[/C][C]363.0681[/C][C]30.2557[/C][C]5.5005[/C][/ROW]
[ROW][C]65[/C][C]0.0989[/C][C]0.0664[/C][C]0.0055[/C][C]633.6786[/C][C]52.8066[/C][C]7.2668[/C][/ROW]
[ROW][C]66[/C][C]0.0943[/C][C]0.2534[/C][C]0.0211[/C][C]10138.912[/C][C]844.9093[/C][C]29.0673[/C][/ROW]
[ROW][C]67[/C][C]0.1008[/C][C]0.1791[/C][C]0.0149[/C][C]4424.2738[/C][C]368.6895[/C][C]19.2013[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114338&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114338&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
560.09980.02560.002191.58367.6322.7626
570.0944-0.13970.01163085.8197257.151616.0359
580.0957-0.05840.0049523.907543.6596.6075
590.1028-0.01129e-0416.65421.38781.1781
600.1017-0.14030.01172675.4601222.95514.9317
610.10330.06490.0054554.001446.16686.7946
620.1044-0.11340.00951654.6525137.887711.7426
630.09630.04640.0039326.225527.18555.214
640.10020.0510.0042363.068130.25575.5005
650.09890.06640.0055633.678652.80667.2668
660.09430.25340.021110138.912844.909329.0673
670.10080.17910.01494424.2738368.689519.2013



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 1 ; par9 = 1 ; par10 = TRUE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; 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
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.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')