Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 17 Dec 2007 04:03:39 -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/17/t1197888591z7sqvmqno2o7d95.htm/, Retrieved Fri, 03 May 2024 22:43:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4348, Retrieved Fri, 03 May 2024 22:43:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting] [2007-12-17 11:03:39] [9bb499d88394279c02e6a8b8cf177cf7] [Current]
Feedback Forum

Post a new message
Dataseries X:
18.33
22.6
24.9
24.8
23.8
25.1
26
27.4
27.3
24.3
28.4
24.4
30.3
31.5
29.8
25.3
25.6
26.7
27.4
28.6
26.3
28.5
28.4
29.4
30.3
29.6
32.1
32.4
36.3
34.6
36.3
40.3
40.4
45.4
39
35.7
40.2
41.7
49.1
49.6
47
52
53.1
57.8
57.9
54.6
51.3
52.7
58.5
56.6
57.9
64.4
65.1
64.6
68.9
68.8
59.3
55
55.4
58
50.8
54.6
58.6
63.6
64.5
66.9
71.9
68.7
74.2
75.8




Summary of compuational 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 compuational 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=4348&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]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=4348&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4348&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 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[58])
4654.6-------
4751.3-------
4852.7-------
4958.5-------
5056.6-------
5157.9-------
5264.4-------
5365.1-------
5464.6-------
5568.9-------
5668.8-------
5759.3-------
5855-------
5955.45546.407965.18290.46930.50.76180.5
60585543.254969.93430.34690.47910.61860.5
6150.85540.981573.81380.33090.37730.35770.5
6254.65539.158177.2510.48590.64430.4440.5
6358.65537.618980.41170.39060.51230.41150.5
6463.65536.279683.38030.27630.40180.25810.5
6564.55535.0986.20690.27540.29460.26290.5
6666.95534.017988.92380.24590.29150.28960.5
6771.95533.040891.55350.18240.26170.2280.5
6868.75532.142594.11230.24620.19850.24460.5
6974.25531.310796.61240.18290.25940.41970.5
7075.85530.536199.06320.17740.19650.50.5

\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[58]) \tabularnewline
46 & 54.6 & - & - & - & - & - & - & - \tabularnewline
47 & 51.3 & - & - & - & - & - & - & - \tabularnewline
48 & 52.7 & - & - & - & - & - & - & - \tabularnewline
49 & 58.5 & - & - & - & - & - & - & - \tabularnewline
50 & 56.6 & - & - & - & - & - & - & - \tabularnewline
51 & 57.9 & - & - & - & - & - & - & - \tabularnewline
52 & 64.4 & - & - & - & - & - & - & - \tabularnewline
53 & 65.1 & - & - & - & - & - & - & - \tabularnewline
54 & 64.6 & - & - & - & - & - & - & - \tabularnewline
55 & 68.9 & - & - & - & - & - & - & - \tabularnewline
56 & 68.8 & - & - & - & - & - & - & - \tabularnewline
57 & 59.3 & - & - & - & - & - & - & - \tabularnewline
58 & 55 & - & - & - & - & - & - & - \tabularnewline
59 & 55.4 & 55 & 46.4079 & 65.1829 & 0.4693 & 0.5 & 0.7618 & 0.5 \tabularnewline
60 & 58 & 55 & 43.2549 & 69.9343 & 0.3469 & 0.4791 & 0.6186 & 0.5 \tabularnewline
61 & 50.8 & 55 & 40.9815 & 73.8138 & 0.3309 & 0.3773 & 0.3577 & 0.5 \tabularnewline
62 & 54.6 & 55 & 39.1581 & 77.251 & 0.4859 & 0.6443 & 0.444 & 0.5 \tabularnewline
63 & 58.6 & 55 & 37.6189 & 80.4117 & 0.3906 & 0.5123 & 0.4115 & 0.5 \tabularnewline
64 & 63.6 & 55 & 36.2796 & 83.3803 & 0.2763 & 0.4018 & 0.2581 & 0.5 \tabularnewline
65 & 64.5 & 55 & 35.09 & 86.2069 & 0.2754 & 0.2946 & 0.2629 & 0.5 \tabularnewline
66 & 66.9 & 55 & 34.0179 & 88.9238 & 0.2459 & 0.2915 & 0.2896 & 0.5 \tabularnewline
67 & 71.9 & 55 & 33.0408 & 91.5535 & 0.1824 & 0.2617 & 0.228 & 0.5 \tabularnewline
68 & 68.7 & 55 & 32.1425 & 94.1123 & 0.2462 & 0.1985 & 0.2446 & 0.5 \tabularnewline
69 & 74.2 & 55 & 31.3107 & 96.6124 & 0.1829 & 0.2594 & 0.4197 & 0.5 \tabularnewline
70 & 75.8 & 55 & 30.5361 & 99.0632 & 0.1774 & 0.1965 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4348&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[58])[/C][/ROW]
[ROW][C]46[/C][C]54.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]51.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]52.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]58.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]56.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]57.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]64.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]65.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]64.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]68.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]68.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]59.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]55.4[/C][C]55[/C][C]46.4079[/C][C]65.1829[/C][C]0.4693[/C][C]0.5[/C][C]0.7618[/C][C]0.5[/C][/ROW]
[ROW][C]60[/C][C]58[/C][C]55[/C][C]43.2549[/C][C]69.9343[/C][C]0.3469[/C][C]0.4791[/C][C]0.6186[/C][C]0.5[/C][/ROW]
[ROW][C]61[/C][C]50.8[/C][C]55[/C][C]40.9815[/C][C]73.8138[/C][C]0.3309[/C][C]0.3773[/C][C]0.3577[/C][C]0.5[/C][/ROW]
[ROW][C]62[/C][C]54.6[/C][C]55[/C][C]39.1581[/C][C]77.251[/C][C]0.4859[/C][C]0.6443[/C][C]0.444[/C][C]0.5[/C][/ROW]
[ROW][C]63[/C][C]58.6[/C][C]55[/C][C]37.6189[/C][C]80.4117[/C][C]0.3906[/C][C]0.5123[/C][C]0.4115[/C][C]0.5[/C][/ROW]
[ROW][C]64[/C][C]63.6[/C][C]55[/C][C]36.2796[/C][C]83.3803[/C][C]0.2763[/C][C]0.4018[/C][C]0.2581[/C][C]0.5[/C][/ROW]
[ROW][C]65[/C][C]64.5[/C][C]55[/C][C]35.09[/C][C]86.2069[/C][C]0.2754[/C][C]0.2946[/C][C]0.2629[/C][C]0.5[/C][/ROW]
[ROW][C]66[/C][C]66.9[/C][C]55[/C][C]34.0179[/C][C]88.9238[/C][C]0.2459[/C][C]0.2915[/C][C]0.2896[/C][C]0.5[/C][/ROW]
[ROW][C]67[/C][C]71.9[/C][C]55[/C][C]33.0408[/C][C]91.5535[/C][C]0.1824[/C][C]0.2617[/C][C]0.228[/C][C]0.5[/C][/ROW]
[ROW][C]68[/C][C]68.7[/C][C]55[/C][C]32.1425[/C][C]94.1123[/C][C]0.2462[/C][C]0.1985[/C][C]0.2446[/C][C]0.5[/C][/ROW]
[ROW][C]69[/C][C]74.2[/C][C]55[/C][C]31.3107[/C][C]96.6124[/C][C]0.1829[/C][C]0.2594[/C][C]0.4197[/C][C]0.5[/C][/ROW]
[ROW][C]70[/C][C]75.8[/C][C]55[/C][C]30.5361[/C][C]99.0632[/C][C]0.1774[/C][C]0.1965[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4348&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4348&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[58])
4654.6-------
4751.3-------
4852.7-------
4958.5-------
5056.6-------
5157.9-------
5264.4-------
5365.1-------
5464.6-------
5568.9-------
5668.8-------
5759.3-------
5855-------
5955.45546.407965.18290.46930.50.76180.5
60585543.254969.93430.34690.47910.61860.5
6150.85540.981573.81380.33090.37730.35770.5
6254.65539.158177.2510.48590.64430.4440.5
6358.65537.618980.41170.39060.51230.41150.5
6463.65536.279683.38030.27630.40180.25810.5
6564.55535.0986.20690.27540.29460.26290.5
6666.95534.017988.92380.24590.29150.28960.5
6771.95533.040891.55350.18240.26170.2280.5
6868.75532.142594.11230.24620.19850.24460.5
6974.25531.310796.61240.18290.25940.41970.5
7075.85530.536199.06320.17740.19650.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.09450.00736e-040.160.01330.1155
600.13850.05450.004590.750.866
610.1745-0.07640.006417.641.471.2124
620.2064-0.00736e-040.160.01330.1155
630.23570.06550.005512.961.081.0392
640.26330.15640.01373.966.16332.4826
650.28950.17270.014490.257.52082.7424
660.31470.21640.018141.6111.80083.4352
670.33910.30730.0256285.6123.80084.8786
680.36280.24910.0208187.6915.64083.9548
690.3860.34910.0291368.6430.725.5426
700.40870.37820.0315432.6436.05336.0044

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.0945 & 0.0073 & 6e-04 & 0.16 & 0.0133 & 0.1155 \tabularnewline
60 & 0.1385 & 0.0545 & 0.0045 & 9 & 0.75 & 0.866 \tabularnewline
61 & 0.1745 & -0.0764 & 0.0064 & 17.64 & 1.47 & 1.2124 \tabularnewline
62 & 0.2064 & -0.0073 & 6e-04 & 0.16 & 0.0133 & 0.1155 \tabularnewline
63 & 0.2357 & 0.0655 & 0.0055 & 12.96 & 1.08 & 1.0392 \tabularnewline
64 & 0.2633 & 0.1564 & 0.013 & 73.96 & 6.1633 & 2.4826 \tabularnewline
65 & 0.2895 & 0.1727 & 0.0144 & 90.25 & 7.5208 & 2.7424 \tabularnewline
66 & 0.3147 & 0.2164 & 0.018 & 141.61 & 11.8008 & 3.4352 \tabularnewline
67 & 0.3391 & 0.3073 & 0.0256 & 285.61 & 23.8008 & 4.8786 \tabularnewline
68 & 0.3628 & 0.2491 & 0.0208 & 187.69 & 15.6408 & 3.9548 \tabularnewline
69 & 0.386 & 0.3491 & 0.0291 & 368.64 & 30.72 & 5.5426 \tabularnewline
70 & 0.4087 & 0.3782 & 0.0315 & 432.64 & 36.0533 & 6.0044 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4348&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]59[/C][C]0.0945[/C][C]0.0073[/C][C]6e-04[/C][C]0.16[/C][C]0.0133[/C][C]0.1155[/C][/ROW]
[ROW][C]60[/C][C]0.1385[/C][C]0.0545[/C][C]0.0045[/C][C]9[/C][C]0.75[/C][C]0.866[/C][/ROW]
[ROW][C]61[/C][C]0.1745[/C][C]-0.0764[/C][C]0.0064[/C][C]17.64[/C][C]1.47[/C][C]1.2124[/C][/ROW]
[ROW][C]62[/C][C]0.2064[/C][C]-0.0073[/C][C]6e-04[/C][C]0.16[/C][C]0.0133[/C][C]0.1155[/C][/ROW]
[ROW][C]63[/C][C]0.2357[/C][C]0.0655[/C][C]0.0055[/C][C]12.96[/C][C]1.08[/C][C]1.0392[/C][/ROW]
[ROW][C]64[/C][C]0.2633[/C][C]0.1564[/C][C]0.013[/C][C]73.96[/C][C]6.1633[/C][C]2.4826[/C][/ROW]
[ROW][C]65[/C][C]0.2895[/C][C]0.1727[/C][C]0.0144[/C][C]90.25[/C][C]7.5208[/C][C]2.7424[/C][/ROW]
[ROW][C]66[/C][C]0.3147[/C][C]0.2164[/C][C]0.018[/C][C]141.61[/C][C]11.8008[/C][C]3.4352[/C][/ROW]
[ROW][C]67[/C][C]0.3391[/C][C]0.3073[/C][C]0.0256[/C][C]285.61[/C][C]23.8008[/C][C]4.8786[/C][/ROW]
[ROW][C]68[/C][C]0.3628[/C][C]0.2491[/C][C]0.0208[/C][C]187.69[/C][C]15.6408[/C][C]3.9548[/C][/ROW]
[ROW][C]69[/C][C]0.386[/C][C]0.3491[/C][C]0.0291[/C][C]368.64[/C][C]30.72[/C][C]5.5426[/C][/ROW]
[ROW][C]70[/C][C]0.4087[/C][C]0.3782[/C][C]0.0315[/C][C]432.64[/C][C]36.0533[/C][C]6.0044[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4348&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4348&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
590.09450.00736e-040.160.01330.1155
600.13850.05450.004590.750.866
610.1745-0.07640.006417.641.471.2124
620.2064-0.00736e-040.160.01330.1155
630.23570.06550.005512.961.081.0392
640.26330.15640.01373.966.16332.4826
650.28950.17270.014490.257.52082.7424
660.31470.21640.018141.6111.80083.4352
670.33910.30730.0256285.6123.80084.8786
680.36280.24910.0208187.6915.64083.9548
690.3860.34910.0291368.6430.725.5426
700.40870.37820.0315432.6436.05336.0044



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