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, 20 Dec 2011 15:08:21 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/20/t1324411723tiiq4fdtjw1cv9z.htm/, Retrieved Mon, 06 May 2024 10:25:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=158224, Retrieved Mon, 06 May 2024 10:25:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact85
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]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
F R PD      [ARIMA Forecasting] [Forecast] [2010-12-02 21:01:45] [97ad38b1c3b35a5feca8b85f7bc7b3ff]
- R PD        [ARIMA Forecasting] [] [2011-12-05 19:34:28] [06c08141d7d783218a8164fd2ea166f2]
- R PD            [ARIMA Forecasting] [] [2011-12-20 20:08:21] [ce4468323d272130d499477f5e05a6d2] [Current]
Feedback Forum

Post a new message
Dataseries X:
164
148
152
144
155
125
153
146
138
190
192
192
147
133
163
150
129
131
145
137
138
168
176
188
139
143
150
154
137
129
128
140
143
151
177
184
151
134
164
126
131
125
127
143
143
160
190
182
138
136
152
127
151
130
119
153




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=158224&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=158224&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158224&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 time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







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[44])
32140-------
33143-------
34151-------
35177-------
36184-------
37151-------
38134-------
39164-------
40126-------
41131-------
42125-------
43127-------
44143-------
45143143119.5081166.49190.50.50.50.5
46160151127.5081174.49190.22640.74780.50.7478
47190177153.5081200.49190.1390.9220.50.9977
48182184160.5081207.49190.43370.30830.50.9997
49138151127.5081174.49190.1390.00480.50.7478
50136134110.5081157.49190.43370.36930.50.2264
51152164140.5081187.49190.15840.99030.50.9601
52127126102.5081149.49190.46680.0150.50.078
53151131107.5081154.49190.04760.63070.50.1584
54130125101.5081148.49190.33830.0150.50.0666
55119127103.5081150.49190.25220.40120.50.091
56153143119.5081166.49190.2020.97740.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[44]) \tabularnewline
32 & 140 & - & - & - & - & - & - & - \tabularnewline
33 & 143 & - & - & - & - & - & - & - \tabularnewline
34 & 151 & - & - & - & - & - & - & - \tabularnewline
35 & 177 & - & - & - & - & - & - & - \tabularnewline
36 & 184 & - & - & - & - & - & - & - \tabularnewline
37 & 151 & - & - & - & - & - & - & - \tabularnewline
38 & 134 & - & - & - & - & - & - & - \tabularnewline
39 & 164 & - & - & - & - & - & - & - \tabularnewline
40 & 126 & - & - & - & - & - & - & - \tabularnewline
41 & 131 & - & - & - & - & - & - & - \tabularnewline
42 & 125 & - & - & - & - & - & - & - \tabularnewline
43 & 127 & - & - & - & - & - & - & - \tabularnewline
44 & 143 & - & - & - & - & - & - & - \tabularnewline
45 & 143 & 143 & 119.5081 & 166.4919 & 0.5 & 0.5 & 0.5 & 0.5 \tabularnewline
46 & 160 & 151 & 127.5081 & 174.4919 & 0.2264 & 0.7478 & 0.5 & 0.7478 \tabularnewline
47 & 190 & 177 & 153.5081 & 200.4919 & 0.139 & 0.922 & 0.5 & 0.9977 \tabularnewline
48 & 182 & 184 & 160.5081 & 207.4919 & 0.4337 & 0.3083 & 0.5 & 0.9997 \tabularnewline
49 & 138 & 151 & 127.5081 & 174.4919 & 0.139 & 0.0048 & 0.5 & 0.7478 \tabularnewline
50 & 136 & 134 & 110.5081 & 157.4919 & 0.4337 & 0.3693 & 0.5 & 0.2264 \tabularnewline
51 & 152 & 164 & 140.5081 & 187.4919 & 0.1584 & 0.9903 & 0.5 & 0.9601 \tabularnewline
52 & 127 & 126 & 102.5081 & 149.4919 & 0.4668 & 0.015 & 0.5 & 0.078 \tabularnewline
53 & 151 & 131 & 107.5081 & 154.4919 & 0.0476 & 0.6307 & 0.5 & 0.1584 \tabularnewline
54 & 130 & 125 & 101.5081 & 148.4919 & 0.3383 & 0.015 & 0.5 & 0.0666 \tabularnewline
55 & 119 & 127 & 103.5081 & 150.4919 & 0.2522 & 0.4012 & 0.5 & 0.091 \tabularnewline
56 & 153 & 143 & 119.5081 & 166.4919 & 0.202 & 0.9774 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=158224&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[44])[/C][/ROW]
[ROW][C]32[/C][C]140[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]143[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]177[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]184[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]134[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]164[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]126[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]131[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]125[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]127[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]143[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]143[/C][C]143[/C][C]119.5081[/C][C]166.4919[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]46[/C][C]160[/C][C]151[/C][C]127.5081[/C][C]174.4919[/C][C]0.2264[/C][C]0.7478[/C][C]0.5[/C][C]0.7478[/C][/ROW]
[ROW][C]47[/C][C]190[/C][C]177[/C][C]153.5081[/C][C]200.4919[/C][C]0.139[/C][C]0.922[/C][C]0.5[/C][C]0.9977[/C][/ROW]
[ROW][C]48[/C][C]182[/C][C]184[/C][C]160.5081[/C][C]207.4919[/C][C]0.4337[/C][C]0.3083[/C][C]0.5[/C][C]0.9997[/C][/ROW]
[ROW][C]49[/C][C]138[/C][C]151[/C][C]127.5081[/C][C]174.4919[/C][C]0.139[/C][C]0.0048[/C][C]0.5[/C][C]0.7478[/C][/ROW]
[ROW][C]50[/C][C]136[/C][C]134[/C][C]110.5081[/C][C]157.4919[/C][C]0.4337[/C][C]0.3693[/C][C]0.5[/C][C]0.2264[/C][/ROW]
[ROW][C]51[/C][C]152[/C][C]164[/C][C]140.5081[/C][C]187.4919[/C][C]0.1584[/C][C]0.9903[/C][C]0.5[/C][C]0.9601[/C][/ROW]
[ROW][C]52[/C][C]127[/C][C]126[/C][C]102.5081[/C][C]149.4919[/C][C]0.4668[/C][C]0.015[/C][C]0.5[/C][C]0.078[/C][/ROW]
[ROW][C]53[/C][C]151[/C][C]131[/C][C]107.5081[/C][C]154.4919[/C][C]0.0476[/C][C]0.6307[/C][C]0.5[/C][C]0.1584[/C][/ROW]
[ROW][C]54[/C][C]130[/C][C]125[/C][C]101.5081[/C][C]148.4919[/C][C]0.3383[/C][C]0.015[/C][C]0.5[/C][C]0.0666[/C][/ROW]
[ROW][C]55[/C][C]119[/C][C]127[/C][C]103.5081[/C][C]150.4919[/C][C]0.2522[/C][C]0.4012[/C][C]0.5[/C][C]0.091[/C][/ROW]
[ROW][C]56[/C][C]153[/C][C]143[/C][C]119.5081[/C][C]166.4919[/C][C]0.202[/C][C]0.9774[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=158224&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158224&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[44])
32140-------
33143-------
34151-------
35177-------
36184-------
37151-------
38134-------
39164-------
40126-------
41131-------
42125-------
43127-------
44143-------
45143143119.5081166.49190.50.50.50.5
46160151127.5081174.49190.22640.74780.50.7478
47190177153.5081200.49190.1390.9220.50.9977
48182184160.5081207.49190.43370.30830.50.9997
49138151127.5081174.49190.1390.00480.50.7478
50136134110.5081157.49190.43370.36930.50.2264
51152164140.5081187.49190.15840.99030.50.9601
52127126102.5081149.49190.46680.0150.50.078
53151131107.5081154.49190.04760.63070.50.1584
54130125101.5081148.49190.33830.0150.50.0666
55119127103.5081150.49190.25220.40120.50.091
56153143119.5081166.49190.2020.97740.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.083800000
460.07940.05960.02988140.56.364
470.06770.07340.044316983.33339.1287
480.0651-0.01090.036463.57.9687
490.0794-0.08610.04616984.69.1978
500.08940.01490.0408471.16678.436
510.0731-0.07320.045414481.57149.0317
520.09510.00790.0408171.58.4558
530.09150.15270.053240010810.3923
540.09590.040.05192599.79.985
550.0944-0.0630.05296496.45459.8211
560.08380.06990.054310096.759.8362

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.0838 & 0 & 0 & 0 & 0 & 0 \tabularnewline
46 & 0.0794 & 0.0596 & 0.0298 & 81 & 40.5 & 6.364 \tabularnewline
47 & 0.0677 & 0.0734 & 0.0443 & 169 & 83.3333 & 9.1287 \tabularnewline
48 & 0.0651 & -0.0109 & 0.036 & 4 & 63.5 & 7.9687 \tabularnewline
49 & 0.0794 & -0.0861 & 0.046 & 169 & 84.6 & 9.1978 \tabularnewline
50 & 0.0894 & 0.0149 & 0.0408 & 4 & 71.1667 & 8.436 \tabularnewline
51 & 0.0731 & -0.0732 & 0.0454 & 144 & 81.5714 & 9.0317 \tabularnewline
52 & 0.0951 & 0.0079 & 0.0408 & 1 & 71.5 & 8.4558 \tabularnewline
53 & 0.0915 & 0.1527 & 0.0532 & 400 & 108 & 10.3923 \tabularnewline
54 & 0.0959 & 0.04 & 0.0519 & 25 & 99.7 & 9.985 \tabularnewline
55 & 0.0944 & -0.063 & 0.0529 & 64 & 96.4545 & 9.8211 \tabularnewline
56 & 0.0838 & 0.0699 & 0.0543 & 100 & 96.75 & 9.8362 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=158224&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]45[/C][C]0.0838[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.0794[/C][C]0.0596[/C][C]0.0298[/C][C]81[/C][C]40.5[/C][C]6.364[/C][/ROW]
[ROW][C]47[/C][C]0.0677[/C][C]0.0734[/C][C]0.0443[/C][C]169[/C][C]83.3333[/C][C]9.1287[/C][/ROW]
[ROW][C]48[/C][C]0.0651[/C][C]-0.0109[/C][C]0.036[/C][C]4[/C][C]63.5[/C][C]7.9687[/C][/ROW]
[ROW][C]49[/C][C]0.0794[/C][C]-0.0861[/C][C]0.046[/C][C]169[/C][C]84.6[/C][C]9.1978[/C][/ROW]
[ROW][C]50[/C][C]0.0894[/C][C]0.0149[/C][C]0.0408[/C][C]4[/C][C]71.1667[/C][C]8.436[/C][/ROW]
[ROW][C]51[/C][C]0.0731[/C][C]-0.0732[/C][C]0.0454[/C][C]144[/C][C]81.5714[/C][C]9.0317[/C][/ROW]
[ROW][C]52[/C][C]0.0951[/C][C]0.0079[/C][C]0.0408[/C][C]1[/C][C]71.5[/C][C]8.4558[/C][/ROW]
[ROW][C]53[/C][C]0.0915[/C][C]0.1527[/C][C]0.0532[/C][C]400[/C][C]108[/C][C]10.3923[/C][/ROW]
[ROW][C]54[/C][C]0.0959[/C][C]0.04[/C][C]0.0519[/C][C]25[/C][C]99.7[/C][C]9.985[/C][/ROW]
[ROW][C]55[/C][C]0.0944[/C][C]-0.063[/C][C]0.0529[/C][C]64[/C][C]96.4545[/C][C]9.8211[/C][/ROW]
[ROW][C]56[/C][C]0.0838[/C][C]0.0699[/C][C]0.0543[/C][C]100[/C][C]96.75[/C][C]9.8362[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=158224&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158224&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
450.083800000
460.07940.05960.02988140.56.364
470.06770.07340.044316983.33339.1287
480.0651-0.01090.036463.57.9687
490.0794-0.08610.04616984.69.1978
500.08940.01490.0408471.16678.436
510.0731-0.07320.045414481.57149.0317
520.09510.00790.0408171.58.4558
530.09150.15270.053240010810.3923
540.09590.040.05192599.79.985
550.0944-0.0630.05296496.45459.8211
560.08380.06990.054310096.759.8362



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