Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 09 Dec 2007 04:30:00 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/09/t1197201298qjkl39x2ig9pr17.htm/, Retrieved Wed, 08 May 2024 05:38:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2959, Retrieved Wed, 08 May 2024 05:38:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact288
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Werkloosheid] [2007-12-09 11:30:00] [89d26cd0a44959d9c8b169f34617598a] [Current]
Feedback Forum

Post a new message
Dataseries X:
7,6
7,7
7,6
8,2
8
8,1
8,3
8,2
8,1
7,7
7,6
7,7
8,2
8,4
8,4
8,6
8,4
8,5
8,7
8,7
8,6
7,4
7,3
7,4
9
9,2
9,2
8,5
8,3
8,3
8,6
8,6
8,5
8,1
8,1
8
8,6
8,7
8,7
8,6
8,4
8,4
8,7
8,7
8,5
8,3
8,3
8,3
8,1
8,2
8,1
8,1
7,9
7,7
8,1
8
7,7
7,8
7,6
7,4
7,7




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2959&T=0

[TABLE]
[ROW][C]Summary of compuational 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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2959&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2959&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[49])
378.6-------
388.7-------
398.7-------
408.6-------
418.4-------
428.4-------
438.7-------
448.7-------
458.5-------
468.3-------
478.3-------
488.3-------
498.1-------
508.28.20117.62758.77470.49850.63510.04410.6351
518.18.16967.35758.98170.43330.47070.10020.5667
528.18.62237.63339.61120.15030.84970.51760.8497
537.98.4337.42859.43740.14920.74210.52560.7421
547.78.44267.42329.46210.07670.85160.53270.745
558.18.31147.27469.34820.34470.87610.23130.6553
5688.3037.17219.4340.29970.63750.24570.6375
577.78.11836.99.33670.25050.57550.26960.5118
587.88.18266.88779.47740.28130.76740.42950.5497
597.68.18896.86819.50960.19110.7180.43450.5525
607.48.16866.82269.51460.13150.79620.42410.5398
617.77.88256.50929.25580.39730.75450.37810.3781

\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[49]) \tabularnewline
37 & 8.6 & - & - & - & - & - & - & - \tabularnewline
38 & 8.7 & - & - & - & - & - & - & - \tabularnewline
39 & 8.7 & - & - & - & - & - & - & - \tabularnewline
40 & 8.6 & - & - & - & - & - & - & - \tabularnewline
41 & 8.4 & - & - & - & - & - & - & - \tabularnewline
42 & 8.4 & - & - & - & - & - & - & - \tabularnewline
43 & 8.7 & - & - & - & - & - & - & - \tabularnewline
44 & 8.7 & - & - & - & - & - & - & - \tabularnewline
45 & 8.5 & - & - & - & - & - & - & - \tabularnewline
46 & 8.3 & - & - & - & - & - & - & - \tabularnewline
47 & 8.3 & - & - & - & - & - & - & - \tabularnewline
48 & 8.3 & - & - & - & - & - & - & - \tabularnewline
49 & 8.1 & - & - & - & - & - & - & - \tabularnewline
50 & 8.2 & 8.2011 & 7.6275 & 8.7747 & 0.4985 & 0.6351 & 0.0441 & 0.6351 \tabularnewline
51 & 8.1 & 8.1696 & 7.3575 & 8.9817 & 0.4333 & 0.4707 & 0.1002 & 0.5667 \tabularnewline
52 & 8.1 & 8.6223 & 7.6333 & 9.6112 & 0.1503 & 0.8497 & 0.5176 & 0.8497 \tabularnewline
53 & 7.9 & 8.433 & 7.4285 & 9.4374 & 0.1492 & 0.7421 & 0.5256 & 0.7421 \tabularnewline
54 & 7.7 & 8.4426 & 7.4232 & 9.4621 & 0.0767 & 0.8516 & 0.5327 & 0.745 \tabularnewline
55 & 8.1 & 8.3114 & 7.2746 & 9.3482 & 0.3447 & 0.8761 & 0.2313 & 0.6553 \tabularnewline
56 & 8 & 8.303 & 7.1721 & 9.434 & 0.2997 & 0.6375 & 0.2457 & 0.6375 \tabularnewline
57 & 7.7 & 8.1183 & 6.9 & 9.3367 & 0.2505 & 0.5755 & 0.2696 & 0.5118 \tabularnewline
58 & 7.8 & 8.1826 & 6.8877 & 9.4774 & 0.2813 & 0.7674 & 0.4295 & 0.5497 \tabularnewline
59 & 7.6 & 8.1889 & 6.8681 & 9.5096 & 0.1911 & 0.718 & 0.4345 & 0.5525 \tabularnewline
60 & 7.4 & 8.1686 & 6.8226 & 9.5146 & 0.1315 & 0.7962 & 0.4241 & 0.5398 \tabularnewline
61 & 7.7 & 7.8825 & 6.5092 & 9.2558 & 0.3973 & 0.7545 & 0.3781 & 0.3781 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2959&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[49])[/C][/ROW]
[ROW][C]37[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]8.2[/C][C]8.2011[/C][C]7.6275[/C][C]8.7747[/C][C]0.4985[/C][C]0.6351[/C][C]0.0441[/C][C]0.6351[/C][/ROW]
[ROW][C]51[/C][C]8.1[/C][C]8.1696[/C][C]7.3575[/C][C]8.9817[/C][C]0.4333[/C][C]0.4707[/C][C]0.1002[/C][C]0.5667[/C][/ROW]
[ROW][C]52[/C][C]8.1[/C][C]8.6223[/C][C]7.6333[/C][C]9.6112[/C][C]0.1503[/C][C]0.8497[/C][C]0.5176[/C][C]0.8497[/C][/ROW]
[ROW][C]53[/C][C]7.9[/C][C]8.433[/C][C]7.4285[/C][C]9.4374[/C][C]0.1492[/C][C]0.7421[/C][C]0.5256[/C][C]0.7421[/C][/ROW]
[ROW][C]54[/C][C]7.7[/C][C]8.4426[/C][C]7.4232[/C][C]9.4621[/C][C]0.0767[/C][C]0.8516[/C][C]0.5327[/C][C]0.745[/C][/ROW]
[ROW][C]55[/C][C]8.1[/C][C]8.3114[/C][C]7.2746[/C][C]9.3482[/C][C]0.3447[/C][C]0.8761[/C][C]0.2313[/C][C]0.6553[/C][/ROW]
[ROW][C]56[/C][C]8[/C][C]8.303[/C][C]7.1721[/C][C]9.434[/C][C]0.2997[/C][C]0.6375[/C][C]0.2457[/C][C]0.6375[/C][/ROW]
[ROW][C]57[/C][C]7.7[/C][C]8.1183[/C][C]6.9[/C][C]9.3367[/C][C]0.2505[/C][C]0.5755[/C][C]0.2696[/C][C]0.5118[/C][/ROW]
[ROW][C]58[/C][C]7.8[/C][C]8.1826[/C][C]6.8877[/C][C]9.4774[/C][C]0.2813[/C][C]0.7674[/C][C]0.4295[/C][C]0.5497[/C][/ROW]
[ROW][C]59[/C][C]7.6[/C][C]8.1889[/C][C]6.8681[/C][C]9.5096[/C][C]0.1911[/C][C]0.718[/C][C]0.4345[/C][C]0.5525[/C][/ROW]
[ROW][C]60[/C][C]7.4[/C][C]8.1686[/C][C]6.8226[/C][C]9.5146[/C][C]0.1315[/C][C]0.7962[/C][C]0.4241[/C][C]0.5398[/C][/ROW]
[ROW][C]61[/C][C]7.7[/C][C]7.8825[/C][C]6.5092[/C][C]9.2558[/C][C]0.3973[/C][C]0.7545[/C][C]0.3781[/C][C]0.3781[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2959&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2959&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[49])
378.6-------
388.7-------
398.7-------
408.6-------
418.4-------
428.4-------
438.7-------
448.7-------
458.5-------
468.3-------
478.3-------
488.3-------
498.1-------
508.28.20117.62758.77470.49850.63510.04410.6351
518.18.16967.35758.98170.43330.47070.10020.5667
528.18.62237.63339.61120.15030.84970.51760.8497
537.98.4337.42859.43740.14920.74210.52560.7421
547.78.44267.42329.46210.07670.85160.53270.745
558.18.31147.27469.34820.34470.87610.23130.6553
5688.3037.17219.4340.29970.63750.24570.6375
577.78.11836.99.33670.25050.57550.26960.5118
587.88.18266.88779.47740.28130.76740.42950.5497
597.68.18896.86819.50960.19110.7180.43450.5525
607.48.16866.82269.51460.13150.79620.42410.5398
617.77.88256.50929.25580.39730.75450.37810.3781







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0357-1e-040003e-04
510.0507-0.00857e-040.00484e-040.0201
520.0585-0.06060.0050.27270.02270.1508
530.0608-0.06320.00530.2840.02370.1539
540.0616-0.0880.00730.55150.0460.2144
550.0636-0.02540.00210.04470.00370.061
560.0695-0.03650.0030.09180.00770.0875
570.0766-0.05150.00430.1750.01460.1208
580.0807-0.04680.00390.14640.01220.1104
590.0823-0.07190.0060.34680.02890.17
600.0841-0.09410.00780.59080.04920.2219
610.0889-0.02320.00190.03330.00280.0527

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0357 & -1e-04 & 0 & 0 & 0 & 3e-04 \tabularnewline
51 & 0.0507 & -0.0085 & 7e-04 & 0.0048 & 4e-04 & 0.0201 \tabularnewline
52 & 0.0585 & -0.0606 & 0.005 & 0.2727 & 0.0227 & 0.1508 \tabularnewline
53 & 0.0608 & -0.0632 & 0.0053 & 0.284 & 0.0237 & 0.1539 \tabularnewline
54 & 0.0616 & -0.088 & 0.0073 & 0.5515 & 0.046 & 0.2144 \tabularnewline
55 & 0.0636 & -0.0254 & 0.0021 & 0.0447 & 0.0037 & 0.061 \tabularnewline
56 & 0.0695 & -0.0365 & 0.003 & 0.0918 & 0.0077 & 0.0875 \tabularnewline
57 & 0.0766 & -0.0515 & 0.0043 & 0.175 & 0.0146 & 0.1208 \tabularnewline
58 & 0.0807 & -0.0468 & 0.0039 & 0.1464 & 0.0122 & 0.1104 \tabularnewline
59 & 0.0823 & -0.0719 & 0.006 & 0.3468 & 0.0289 & 0.17 \tabularnewline
60 & 0.0841 & -0.0941 & 0.0078 & 0.5908 & 0.0492 & 0.2219 \tabularnewline
61 & 0.0889 & -0.0232 & 0.0019 & 0.0333 & 0.0028 & 0.0527 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2959&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]50[/C][C]0.0357[/C][C]-1e-04[/C][C]0[/C][C]0[/C][C]0[/C][C]3e-04[/C][/ROW]
[ROW][C]51[/C][C]0.0507[/C][C]-0.0085[/C][C]7e-04[/C][C]0.0048[/C][C]4e-04[/C][C]0.0201[/C][/ROW]
[ROW][C]52[/C][C]0.0585[/C][C]-0.0606[/C][C]0.005[/C][C]0.2727[/C][C]0.0227[/C][C]0.1508[/C][/ROW]
[ROW][C]53[/C][C]0.0608[/C][C]-0.0632[/C][C]0.0053[/C][C]0.284[/C][C]0.0237[/C][C]0.1539[/C][/ROW]
[ROW][C]54[/C][C]0.0616[/C][C]-0.088[/C][C]0.0073[/C][C]0.5515[/C][C]0.046[/C][C]0.2144[/C][/ROW]
[ROW][C]55[/C][C]0.0636[/C][C]-0.0254[/C][C]0.0021[/C][C]0.0447[/C][C]0.0037[/C][C]0.061[/C][/ROW]
[ROW][C]56[/C][C]0.0695[/C][C]-0.0365[/C][C]0.003[/C][C]0.0918[/C][C]0.0077[/C][C]0.0875[/C][/ROW]
[ROW][C]57[/C][C]0.0766[/C][C]-0.0515[/C][C]0.0043[/C][C]0.175[/C][C]0.0146[/C][C]0.1208[/C][/ROW]
[ROW][C]58[/C][C]0.0807[/C][C]-0.0468[/C][C]0.0039[/C][C]0.1464[/C][C]0.0122[/C][C]0.1104[/C][/ROW]
[ROW][C]59[/C][C]0.0823[/C][C]-0.0719[/C][C]0.006[/C][C]0.3468[/C][C]0.0289[/C][C]0.17[/C][/ROW]
[ROW][C]60[/C][C]0.0841[/C][C]-0.0941[/C][C]0.0078[/C][C]0.5908[/C][C]0.0492[/C][C]0.2219[/C][/ROW]
[ROW][C]61[/C][C]0.0889[/C][C]-0.0232[/C][C]0.0019[/C][C]0.0333[/C][C]0.0028[/C][C]0.0527[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2959&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2959&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
500.0357-1e-040003e-04
510.0507-0.00857e-040.00484e-040.0201
520.0585-0.06060.0050.27270.02270.1508
530.0608-0.06320.00530.2840.02370.1539
540.0616-0.0880.00730.55150.0460.2144
550.0636-0.02540.00210.04470.00370.061
560.0695-0.03650.0030.09180.00770.0875
570.0766-0.05150.00430.1750.01460.1208
580.0807-0.04680.00390.14640.01220.1104
590.0823-0.07190.0060.34680.02890.17
600.0841-0.09410.00780.59080.04920.2219
610.0889-0.02320.00190.03330.00280.0527



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