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, 16 Dec 2008 09:49:27 -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/16/t1229446218tnc9oihfd62r5y6.htm/, Retrieved Wed, 15 May 2024 23:58:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34032, Retrieved Wed, 15 May 2024 23:58:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact163
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [21.1] [2008-12-16 16:49:27] [0458bd763b171003ec052ce63099d477] [Current]
Feedback Forum

Post a new message
Dataseries X:
138
137
136
133
126
120
114
116
153
162
161
149
139
135
130
127
122
117
112
113
149
157
157
147
137
132
125
123
117
114
111
112
144
150
149
134
123
116
117
111
105
102
95
93
124
130
124
115
106
105
105
101
95
93
84
87
116
120
117
109
105




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=34032&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=34032&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34032&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[49])
37123-------
38116-------
39117-------
40111-------
41105-------
42102-------
4395-------
4493-------
45124-------
46130-------
47124-------
48115-------
49106-------
50105101.888298.0237105.95310.06670.023700.0237
51105100.298595.2064105.75030.04550.045500.0202
5210197.028591.1802103.3740.110.006900.0028
539592.429686.169399.29420.23150.00722e-041e-04
549389.65182.985397.02970.18680.07775e-040
558485.264878.470192.84460.37180.02270.00590
568784.896277.643693.05470.30660.58520.02580
57116110.017199.2687122.32880.17040.99990.0130.7388
58120115.0275103.0206128.9190.24150.44540.01730.8986
59117112.3529100.1292126.58960.26120.14620.05440.8091
60109104.021492.453117.54440.23530.030.05580.3871
6110596.505685.569109.33110.09710.02810.07340.0734

\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 & 123 & - & - & - & - & - & - & - \tabularnewline
38 & 116 & - & - & - & - & - & - & - \tabularnewline
39 & 117 & - & - & - & - & - & - & - \tabularnewline
40 & 111 & - & - & - & - & - & - & - \tabularnewline
41 & 105 & - & - & - & - & - & - & - \tabularnewline
42 & 102 & - & - & - & - & - & - & - \tabularnewline
43 & 95 & - & - & - & - & - & - & - \tabularnewline
44 & 93 & - & - & - & - & - & - & - \tabularnewline
45 & 124 & - & - & - & - & - & - & - \tabularnewline
46 & 130 & - & - & - & - & - & - & - \tabularnewline
47 & 124 & - & - & - & - & - & - & - \tabularnewline
48 & 115 & - & - & - & - & - & - & - \tabularnewline
49 & 106 & - & - & - & - & - & - & - \tabularnewline
50 & 105 & 101.8882 & 98.0237 & 105.9531 & 0.0667 & 0.0237 & 0 & 0.0237 \tabularnewline
51 & 105 & 100.2985 & 95.2064 & 105.7503 & 0.0455 & 0.0455 & 0 & 0.0202 \tabularnewline
52 & 101 & 97.0285 & 91.1802 & 103.374 & 0.11 & 0.0069 & 0 & 0.0028 \tabularnewline
53 & 95 & 92.4296 & 86.1693 & 99.2942 & 0.2315 & 0.0072 & 2e-04 & 1e-04 \tabularnewline
54 & 93 & 89.651 & 82.9853 & 97.0297 & 0.1868 & 0.0777 & 5e-04 & 0 \tabularnewline
55 & 84 & 85.2648 & 78.4701 & 92.8446 & 0.3718 & 0.0227 & 0.0059 & 0 \tabularnewline
56 & 87 & 84.8962 & 77.6436 & 93.0547 & 0.3066 & 0.5852 & 0.0258 & 0 \tabularnewline
57 & 116 & 110.0171 & 99.2687 & 122.3288 & 0.1704 & 0.9999 & 0.013 & 0.7388 \tabularnewline
58 & 120 & 115.0275 & 103.0206 & 128.919 & 0.2415 & 0.4454 & 0.0173 & 0.8986 \tabularnewline
59 & 117 & 112.3529 & 100.1292 & 126.5896 & 0.2612 & 0.1462 & 0.0544 & 0.8091 \tabularnewline
60 & 109 & 104.0214 & 92.453 & 117.5444 & 0.2353 & 0.03 & 0.0558 & 0.3871 \tabularnewline
61 & 105 & 96.5056 & 85.569 & 109.3311 & 0.0971 & 0.0281 & 0.0734 & 0.0734 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34032&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]123[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]116[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]130[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]105[/C][C]101.8882[/C][C]98.0237[/C][C]105.9531[/C][C]0.0667[/C][C]0.0237[/C][C]0[/C][C]0.0237[/C][/ROW]
[ROW][C]51[/C][C]105[/C][C]100.2985[/C][C]95.2064[/C][C]105.7503[/C][C]0.0455[/C][C]0.0455[/C][C]0[/C][C]0.0202[/C][/ROW]
[ROW][C]52[/C][C]101[/C][C]97.0285[/C][C]91.1802[/C][C]103.374[/C][C]0.11[/C][C]0.0069[/C][C]0[/C][C]0.0028[/C][/ROW]
[ROW][C]53[/C][C]95[/C][C]92.4296[/C][C]86.1693[/C][C]99.2942[/C][C]0.2315[/C][C]0.0072[/C][C]2e-04[/C][C]1e-04[/C][/ROW]
[ROW][C]54[/C][C]93[/C][C]89.651[/C][C]82.9853[/C][C]97.0297[/C][C]0.1868[/C][C]0.0777[/C][C]5e-04[/C][C]0[/C][/ROW]
[ROW][C]55[/C][C]84[/C][C]85.2648[/C][C]78.4701[/C][C]92.8446[/C][C]0.3718[/C][C]0.0227[/C][C]0.0059[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]87[/C][C]84.8962[/C][C]77.6436[/C][C]93.0547[/C][C]0.3066[/C][C]0.5852[/C][C]0.0258[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]116[/C][C]110.0171[/C][C]99.2687[/C][C]122.3288[/C][C]0.1704[/C][C]0.9999[/C][C]0.013[/C][C]0.7388[/C][/ROW]
[ROW][C]58[/C][C]120[/C][C]115.0275[/C][C]103.0206[/C][C]128.919[/C][C]0.2415[/C][C]0.4454[/C][C]0.0173[/C][C]0.8986[/C][/ROW]
[ROW][C]59[/C][C]117[/C][C]112.3529[/C][C]100.1292[/C][C]126.5896[/C][C]0.2612[/C][C]0.1462[/C][C]0.0544[/C][C]0.8091[/C][/ROW]
[ROW][C]60[/C][C]109[/C][C]104.0214[/C][C]92.453[/C][C]117.5444[/C][C]0.2353[/C][C]0.03[/C][C]0.0558[/C][C]0.3871[/C][/ROW]
[ROW][C]61[/C][C]105[/C][C]96.5056[/C][C]85.569[/C][C]109.3311[/C][C]0.0971[/C][C]0.0281[/C][C]0.0734[/C][C]0.0734[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34032&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34032&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])
37123-------
38116-------
39117-------
40111-------
41105-------
42102-------
4395-------
4493-------
45124-------
46130-------
47124-------
48115-------
49106-------
50105101.888298.0237105.95310.06670.023700.0237
51105100.298595.2064105.75030.04550.045500.0202
5210197.028591.1802103.3740.110.006900.0028
539592.429686.169399.29420.23150.00722e-041e-04
549389.65182.985397.02970.18680.07775e-040
558485.264878.470192.84460.37180.02270.00590
568784.896277.643693.05470.30660.58520.02580
57116110.017199.2687122.32880.17040.99990.0130.7388
58120115.0275103.0206128.9190.24150.44540.01730.8986
59117112.3529100.1292126.58960.26120.14620.05440.8091
60109104.021492.453117.54440.23530.030.05580.3871
6110596.505685.569109.33110.09710.02810.07340.0734







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.02040.03050.00259.68350.8070.8983
510.02770.04690.003922.10451.8421.3572
520.03340.04090.003415.77261.31441.1465
530.03790.02780.00236.6070.55060.742
540.0420.03740.003111.21610.93470.9668
550.0454-0.01480.00121.59970.13330.3651
560.0490.02480.00214.4260.36880.6073
570.05710.05440.004535.79562.9831.7271
580.06160.04320.003624.7262.06051.4354
590.06470.04140.003421.5961.79971.3415
600.06630.04790.00424.78632.06551.4372
610.06780.0880.007372.15566.0132.4521

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0204 & 0.0305 & 0.0025 & 9.6835 & 0.807 & 0.8983 \tabularnewline
51 & 0.0277 & 0.0469 & 0.0039 & 22.1045 & 1.842 & 1.3572 \tabularnewline
52 & 0.0334 & 0.0409 & 0.0034 & 15.7726 & 1.3144 & 1.1465 \tabularnewline
53 & 0.0379 & 0.0278 & 0.0023 & 6.607 & 0.5506 & 0.742 \tabularnewline
54 & 0.042 & 0.0374 & 0.0031 & 11.2161 & 0.9347 & 0.9668 \tabularnewline
55 & 0.0454 & -0.0148 & 0.0012 & 1.5997 & 0.1333 & 0.3651 \tabularnewline
56 & 0.049 & 0.0248 & 0.0021 & 4.426 & 0.3688 & 0.6073 \tabularnewline
57 & 0.0571 & 0.0544 & 0.0045 & 35.7956 & 2.983 & 1.7271 \tabularnewline
58 & 0.0616 & 0.0432 & 0.0036 & 24.726 & 2.0605 & 1.4354 \tabularnewline
59 & 0.0647 & 0.0414 & 0.0034 & 21.596 & 1.7997 & 1.3415 \tabularnewline
60 & 0.0663 & 0.0479 & 0.004 & 24.7863 & 2.0655 & 1.4372 \tabularnewline
61 & 0.0678 & 0.088 & 0.0073 & 72.1556 & 6.013 & 2.4521 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34032&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.0204[/C][C]0.0305[/C][C]0.0025[/C][C]9.6835[/C][C]0.807[/C][C]0.8983[/C][/ROW]
[ROW][C]51[/C][C]0.0277[/C][C]0.0469[/C][C]0.0039[/C][C]22.1045[/C][C]1.842[/C][C]1.3572[/C][/ROW]
[ROW][C]52[/C][C]0.0334[/C][C]0.0409[/C][C]0.0034[/C][C]15.7726[/C][C]1.3144[/C][C]1.1465[/C][/ROW]
[ROW][C]53[/C][C]0.0379[/C][C]0.0278[/C][C]0.0023[/C][C]6.607[/C][C]0.5506[/C][C]0.742[/C][/ROW]
[ROW][C]54[/C][C]0.042[/C][C]0.0374[/C][C]0.0031[/C][C]11.2161[/C][C]0.9347[/C][C]0.9668[/C][/ROW]
[ROW][C]55[/C][C]0.0454[/C][C]-0.0148[/C][C]0.0012[/C][C]1.5997[/C][C]0.1333[/C][C]0.3651[/C][/ROW]
[ROW][C]56[/C][C]0.049[/C][C]0.0248[/C][C]0.0021[/C][C]4.426[/C][C]0.3688[/C][C]0.6073[/C][/ROW]
[ROW][C]57[/C][C]0.0571[/C][C]0.0544[/C][C]0.0045[/C][C]35.7956[/C][C]2.983[/C][C]1.7271[/C][/ROW]
[ROW][C]58[/C][C]0.0616[/C][C]0.0432[/C][C]0.0036[/C][C]24.726[/C][C]2.0605[/C][C]1.4354[/C][/ROW]
[ROW][C]59[/C][C]0.0647[/C][C]0.0414[/C][C]0.0034[/C][C]21.596[/C][C]1.7997[/C][C]1.3415[/C][/ROW]
[ROW][C]60[/C][C]0.0663[/C][C]0.0479[/C][C]0.004[/C][C]24.7863[/C][C]2.0655[/C][C]1.4372[/C][/ROW]
[ROW][C]61[/C][C]0.0678[/C][C]0.088[/C][C]0.0073[/C][C]72.1556[/C][C]6.013[/C][C]2.4521[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34032&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34032&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.02040.03050.00259.68350.8070.8983
510.02770.04690.003922.10451.8421.3572
520.03340.04090.003415.77261.31441.1465
530.03790.02780.00236.6070.55060.742
540.0420.03740.003111.21610.93470.9668
550.0454-0.01480.00121.59970.13330.3651
560.0490.02480.00214.4260.36880.6073
570.05710.05440.004535.79562.9831.7271
580.06160.04320.003624.7262.06051.4354
590.06470.04140.003421.5961.79971.3415
600.06630.04790.00424.78632.06551.4372
610.06780.0880.007372.15566.0132.4521



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