Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 10 Dec 2008 09:44:41 -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/2008/Dec/10/t1228927588mv45k4w5ld8djns.htm/, Retrieved Sun, 19 May 2024 06:31:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32028, Retrieved Sun, 19 May 2024 06:31:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact173
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMPD  [ARIMA Backward Selection] [T8 19] [2008-12-03 20:28:21] [8eb83367d7ce233bbf617141d324189b]
- RMP       [ARIMA Forecasting] [T9 2] [2008-12-10 16:44:41] [fb0ffb935e9c1a725d69519be28b148f] [Current]
Feedback Forum

Post a new message
Dataseries X:
33
34
44
38
37
30
35
32
32
37
27
28
27
38
32
38
33
36
40
36
38
33
30
34
33
31
39
41
34
41
37
37
39
37
32
44
48
39
52
39
40
55
39
37
41
46
39
43
41
44
52
49
57
55
41
49
52
47
44
57
57
50
60
49
53
55
46
47
50
52
41
46
47
42
51
41
40
50
41
45
37
55
42
37




Summary of computational 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 computational 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=32028&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]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=32028&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32028&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 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[72])
6057-------
6157-------
6250-------
6360-------
6449-------
6553-------
6655-------
6746-------
6847-------
6950-------
7052-------
7141-------
7246-------
734747.722635.768962.67790.46230.58930.1120.5893
744244.973832.065161.74090.36410.40640.27840.4523
755154.928739.167875.39820.35340.89210.31360.8037
764147.000432.994765.40340.26140.33510.41570.5424
774051.11536.049970.8420.13470.84250.42570.6943
785053.775938.04774.32350.35940.90560.45350.7709
794143.559530.341561.02850.3870.2350.39210.3921
804545.785432.00963.94290.46620.69730.44780.4908
813748.837134.304667.92380.11210.65320.45250.6146
825549.251734.61768.46380.27880.89430.38960.63
834240.881728.337957.51990.44760.04810.49440.2733
843747.723533.465466.47350.13120.72520.57150.5715

\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[72]) \tabularnewline
60 & 57 & - & - & - & - & - & - & - \tabularnewline
61 & 57 & - & - & - & - & - & - & - \tabularnewline
62 & 50 & - & - & - & - & - & - & - \tabularnewline
63 & 60 & - & - & - & - & - & - & - \tabularnewline
64 & 49 & - & - & - & - & - & - & - \tabularnewline
65 & 53 & - & - & - & - & - & - & - \tabularnewline
66 & 55 & - & - & - & - & - & - & - \tabularnewline
67 & 46 & - & - & - & - & - & - & - \tabularnewline
68 & 47 & - & - & - & - & - & - & - \tabularnewline
69 & 50 & - & - & - & - & - & - & - \tabularnewline
70 & 52 & - & - & - & - & - & - & - \tabularnewline
71 & 41 & - & - & - & - & - & - & - \tabularnewline
72 & 46 & - & - & - & - & - & - & - \tabularnewline
73 & 47 & 47.7226 & 35.7689 & 62.6779 & 0.4623 & 0.5893 & 0.112 & 0.5893 \tabularnewline
74 & 42 & 44.9738 & 32.0651 & 61.7409 & 0.3641 & 0.4064 & 0.2784 & 0.4523 \tabularnewline
75 & 51 & 54.9287 & 39.1678 & 75.3982 & 0.3534 & 0.8921 & 0.3136 & 0.8037 \tabularnewline
76 & 41 & 47.0004 & 32.9947 & 65.4034 & 0.2614 & 0.3351 & 0.4157 & 0.5424 \tabularnewline
77 & 40 & 51.115 & 36.0499 & 70.842 & 0.1347 & 0.8425 & 0.4257 & 0.6943 \tabularnewline
78 & 50 & 53.7759 & 38.047 & 74.3235 & 0.3594 & 0.9056 & 0.4535 & 0.7709 \tabularnewline
79 & 41 & 43.5595 & 30.3415 & 61.0285 & 0.387 & 0.235 & 0.3921 & 0.3921 \tabularnewline
80 & 45 & 45.7854 & 32.009 & 63.9429 & 0.4662 & 0.6973 & 0.4478 & 0.4908 \tabularnewline
81 & 37 & 48.8371 & 34.3046 & 67.9238 & 0.1121 & 0.6532 & 0.4525 & 0.6146 \tabularnewline
82 & 55 & 49.2517 & 34.617 & 68.4638 & 0.2788 & 0.8943 & 0.3896 & 0.63 \tabularnewline
83 & 42 & 40.8817 & 28.3379 & 57.5199 & 0.4476 & 0.0481 & 0.4944 & 0.2733 \tabularnewline
84 & 37 & 47.7235 & 33.4654 & 66.4735 & 0.1312 & 0.7252 & 0.5715 & 0.5715 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32028&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[72])[/C][/ROW]
[ROW][C]60[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]50[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]60[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]50[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]47[/C][C]47.7226[/C][C]35.7689[/C][C]62.6779[/C][C]0.4623[/C][C]0.5893[/C][C]0.112[/C][C]0.5893[/C][/ROW]
[ROW][C]74[/C][C]42[/C][C]44.9738[/C][C]32.0651[/C][C]61.7409[/C][C]0.3641[/C][C]0.4064[/C][C]0.2784[/C][C]0.4523[/C][/ROW]
[ROW][C]75[/C][C]51[/C][C]54.9287[/C][C]39.1678[/C][C]75.3982[/C][C]0.3534[/C][C]0.8921[/C][C]0.3136[/C][C]0.8037[/C][/ROW]
[ROW][C]76[/C][C]41[/C][C]47.0004[/C][C]32.9947[/C][C]65.4034[/C][C]0.2614[/C][C]0.3351[/C][C]0.4157[/C][C]0.5424[/C][/ROW]
[ROW][C]77[/C][C]40[/C][C]51.115[/C][C]36.0499[/C][C]70.842[/C][C]0.1347[/C][C]0.8425[/C][C]0.4257[/C][C]0.6943[/C][/ROW]
[ROW][C]78[/C][C]50[/C][C]53.7759[/C][C]38.047[/C][C]74.3235[/C][C]0.3594[/C][C]0.9056[/C][C]0.4535[/C][C]0.7709[/C][/ROW]
[ROW][C]79[/C][C]41[/C][C]43.5595[/C][C]30.3415[/C][C]61.0285[/C][C]0.387[/C][C]0.235[/C][C]0.3921[/C][C]0.3921[/C][/ROW]
[ROW][C]80[/C][C]45[/C][C]45.7854[/C][C]32.009[/C][C]63.9429[/C][C]0.4662[/C][C]0.6973[/C][C]0.4478[/C][C]0.4908[/C][/ROW]
[ROW][C]81[/C][C]37[/C][C]48.8371[/C][C]34.3046[/C][C]67.9238[/C][C]0.1121[/C][C]0.6532[/C][C]0.4525[/C][C]0.6146[/C][/ROW]
[ROW][C]82[/C][C]55[/C][C]49.2517[/C][C]34.617[/C][C]68.4638[/C][C]0.2788[/C][C]0.8943[/C][C]0.3896[/C][C]0.63[/C][/ROW]
[ROW][C]83[/C][C]42[/C][C]40.8817[/C][C]28.3379[/C][C]57.5199[/C][C]0.4476[/C][C]0.0481[/C][C]0.4944[/C][C]0.2733[/C][/ROW]
[ROW][C]84[/C][C]37[/C][C]47.7235[/C][C]33.4654[/C][C]66.4735[/C][C]0.1312[/C][C]0.7252[/C][C]0.5715[/C][C]0.5715[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32028&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32028&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[72])
6057-------
6157-------
6250-------
6360-------
6449-------
6553-------
6655-------
6746-------
6847-------
6950-------
7052-------
7141-------
7246-------
734747.722635.768962.67790.46230.58930.1120.5893
744244.973832.065161.74090.36410.40640.27840.4523
755154.928739.167875.39820.35340.89210.31360.8037
764147.000432.994765.40340.26140.33510.41570.5424
774051.11536.049970.8420.13470.84250.42570.6943
785053.775938.04774.32350.35940.90560.45350.7709
794143.559530.341561.02850.3870.2350.39210.3921
804545.785432.00963.94290.46620.69730.44780.4908
813748.837134.304667.92380.11210.65320.45250.6146
825549.251734.61768.46380.27880.89430.38960.63
834240.881728.337957.51990.44760.04810.49440.2733
843747.723533.465466.47350.13120.72520.57150.5715







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.1599-0.01510.00130.52220.04350.2086
740.1902-0.06610.00558.84380.7370.8585
750.1901-0.07150.00615.43431.28621.1341
760.1998-0.12770.010636.00493.00041.7322
770.1969-0.21750.0181123.542910.29523.2086
780.1949-0.07020.005914.25761.18811.09
790.2046-0.05880.00496.55080.54590.7389
800.2023-0.01720.00140.61690.05140.2267
810.1994-0.24240.0202140.116611.67643.4171
820.1990.11670.009733.04322.75361.6594
830.20760.02740.00231.25050.10420.3228
840.2005-0.22470.0187114.99389.58283.0956

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.1599 & -0.0151 & 0.0013 & 0.5222 & 0.0435 & 0.2086 \tabularnewline
74 & 0.1902 & -0.0661 & 0.0055 & 8.8438 & 0.737 & 0.8585 \tabularnewline
75 & 0.1901 & -0.0715 & 0.006 & 15.4343 & 1.2862 & 1.1341 \tabularnewline
76 & 0.1998 & -0.1277 & 0.0106 & 36.0049 & 3.0004 & 1.7322 \tabularnewline
77 & 0.1969 & -0.2175 & 0.0181 & 123.5429 & 10.2952 & 3.2086 \tabularnewline
78 & 0.1949 & -0.0702 & 0.0059 & 14.2576 & 1.1881 & 1.09 \tabularnewline
79 & 0.2046 & -0.0588 & 0.0049 & 6.5508 & 0.5459 & 0.7389 \tabularnewline
80 & 0.2023 & -0.0172 & 0.0014 & 0.6169 & 0.0514 & 0.2267 \tabularnewline
81 & 0.1994 & -0.2424 & 0.0202 & 140.1166 & 11.6764 & 3.4171 \tabularnewline
82 & 0.199 & 0.1167 & 0.0097 & 33.0432 & 2.7536 & 1.6594 \tabularnewline
83 & 0.2076 & 0.0274 & 0.0023 & 1.2505 & 0.1042 & 0.3228 \tabularnewline
84 & 0.2005 & -0.2247 & 0.0187 & 114.9938 & 9.5828 & 3.0956 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32028&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]73[/C][C]0.1599[/C][C]-0.0151[/C][C]0.0013[/C][C]0.5222[/C][C]0.0435[/C][C]0.2086[/C][/ROW]
[ROW][C]74[/C][C]0.1902[/C][C]-0.0661[/C][C]0.0055[/C][C]8.8438[/C][C]0.737[/C][C]0.8585[/C][/ROW]
[ROW][C]75[/C][C]0.1901[/C][C]-0.0715[/C][C]0.006[/C][C]15.4343[/C][C]1.2862[/C][C]1.1341[/C][/ROW]
[ROW][C]76[/C][C]0.1998[/C][C]-0.1277[/C][C]0.0106[/C][C]36.0049[/C][C]3.0004[/C][C]1.7322[/C][/ROW]
[ROW][C]77[/C][C]0.1969[/C][C]-0.2175[/C][C]0.0181[/C][C]123.5429[/C][C]10.2952[/C][C]3.2086[/C][/ROW]
[ROW][C]78[/C][C]0.1949[/C][C]-0.0702[/C][C]0.0059[/C][C]14.2576[/C][C]1.1881[/C][C]1.09[/C][/ROW]
[ROW][C]79[/C][C]0.2046[/C][C]-0.0588[/C][C]0.0049[/C][C]6.5508[/C][C]0.5459[/C][C]0.7389[/C][/ROW]
[ROW][C]80[/C][C]0.2023[/C][C]-0.0172[/C][C]0.0014[/C][C]0.6169[/C][C]0.0514[/C][C]0.2267[/C][/ROW]
[ROW][C]81[/C][C]0.1994[/C][C]-0.2424[/C][C]0.0202[/C][C]140.1166[/C][C]11.6764[/C][C]3.4171[/C][/ROW]
[ROW][C]82[/C][C]0.199[/C][C]0.1167[/C][C]0.0097[/C][C]33.0432[/C][C]2.7536[/C][C]1.6594[/C][/ROW]
[ROW][C]83[/C][C]0.2076[/C][C]0.0274[/C][C]0.0023[/C][C]1.2505[/C][C]0.1042[/C][C]0.3228[/C][/ROW]
[ROW][C]84[/C][C]0.2005[/C][C]-0.2247[/C][C]0.0187[/C][C]114.9938[/C][C]9.5828[/C][C]3.0956[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32028&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32028&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
730.1599-0.01510.00130.52220.04350.2086
740.1902-0.06610.00558.84380.7370.8585
750.1901-0.07150.00615.43431.28621.1341
760.1998-0.12770.010636.00493.00041.7322
770.1969-0.21750.0181123.542910.29523.2086
780.1949-0.07020.005914.25761.18811.09
790.2046-0.05880.00496.55080.54590.7389
800.2023-0.01720.00140.61690.05140.2267
810.1994-0.24240.0202140.116611.67643.4171
820.1990.11670.009733.04322.75361.6594
830.20760.02740.00231.25050.10420.3228
840.2005-0.22470.0187114.99389.58283.0956



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