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 computationSat, 20 Dec 2008 06:17:10 -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/20/t122977910948h7c8o03d499u1.htm/, Retrieved Sun, 19 May 2024 10:52:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35349, Retrieved Sun, 19 May 2024 10:52:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact237
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [SMP prof bach] [2008-12-15 22:25:20] [bc937651ef42bf891200cf0e0edc7238]
- RM    [Variance Reduction Matrix] [VRM prof bach] [2008-12-15 22:31:00] [bc937651ef42bf891200cf0e0edc7238]
- RMP     [(Partial) Autocorrelation Function] [ARIMA Prof bach A...] [2008-12-15 22:38:57] [bc937651ef42bf891200cf0e0edc7238]
- RMP       [ARIMA Backward Selection] [Arima backward se...] [2008-12-19 17:26:16] [bc937651ef42bf891200cf0e0edc7238]
- RMP         [ARIMA Forecasting] [ARIMA forecast pr...] [2008-12-20 11:40:03] [bc937651ef42bf891200cf0e0edc7238]
-   P           [ARIMA Forecasting] [ARIMA forecast pr...] [2008-12-20 13:00:09] [bc937651ef42bf891200cf0e0edc7238]
-   P               [ARIMA Forecasting] [ARIMA voorspellin...] [2008-12-20 13:17:10] [21d7d81e7693ad6dde5aadefb1046611] [Current]
Feedback Forum

Post a new message
Dataseries X:
13363
12530
11420
10948
10173
10602
16094
19631
17140
14345
12632
12894
11808
10673
9939
9890
9283
10131
15864
19283
16203
13919
11937
11795
11268
10522
9929
9725
9372
10068
16230
19115
18351
16265
14103
14115
13327
12618
12129
11775
11493
12470
20792
22337
21325
18581
16475
16581
15745
14453
13712
13766
13336
15346
24446
26178
24628
21282
18850
18822
18060
17536
16417
15842
15188
16905
25430
27962
26607
23364
20827
20506
19181
18016
17354
16256
15770
17538
26899
28915
25247
22856
19980
19856
16994
16839
15618
15883
15513
17106
25272
26731
22891
19583
16939
16757
15435
14786
13680
13208
12707
14277
22436
23229
18241
16145
13994
14780
13100
12329
12463
11532
10784
13106
19491
20418
16094
14491
13067




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35349&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35349&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35349&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'George Udny Yule' @ 72.249.76.132







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[119])
10713994-------
10814780-------
10913100-------
11012329-------
11112463-------
11211532-------
11310784-------
11413106-------
11519491-------
11620418-------
11716094-------
11814491-------
11913067-------
120NA13590.981312629.032414603.0834NA0.84490.01070.8449
121NA11850.693810739.467613040.0083NANA0.01980.0225
122NA11418.043210105.007512846.0867NANA0.10560.0118
123NA11249.85699780.617812867.0289NANA0.07070.0138
124NA10682.09889113.253812430.8697NANA0.17040.0038
125NA10045.73938417.261611882.8873NANA0.21556e-04
126NA11980.77719998.271714223.2992NANA0.16270.1712
127NA17996.699515175.431221166.075NANA0.17770.9989
128NA18874.656315793.511822353.7441NANA0.19230.9995
129NA14950.835912217.403318086.007NANA0.23740.8805
130NA13128.406110529.848916145.6295NANA0.1880.5159
131NA11698.32859212.226814619.7831NANA0.17920.1792

\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[119]) \tabularnewline
107 & 13994 & - & - & - & - & - & - & - \tabularnewline
108 & 14780 & - & - & - & - & - & - & - \tabularnewline
109 & 13100 & - & - & - & - & - & - & - \tabularnewline
110 & 12329 & - & - & - & - & - & - & - \tabularnewline
111 & 12463 & - & - & - & - & - & - & - \tabularnewline
112 & 11532 & - & - & - & - & - & - & - \tabularnewline
113 & 10784 & - & - & - & - & - & - & - \tabularnewline
114 & 13106 & - & - & - & - & - & - & - \tabularnewline
115 & 19491 & - & - & - & - & - & - & - \tabularnewline
116 & 20418 & - & - & - & - & - & - & - \tabularnewline
117 & 16094 & - & - & - & - & - & - & - \tabularnewline
118 & 14491 & - & - & - & - & - & - & - \tabularnewline
119 & 13067 & - & - & - & - & - & - & - \tabularnewline
120 & NA & 13590.9813 & 12629.0324 & 14603.0834 & NA & 0.8449 & 0.0107 & 0.8449 \tabularnewline
121 & NA & 11850.6938 & 10739.4676 & 13040.0083 & NA & NA & 0.0198 & 0.0225 \tabularnewline
122 & NA & 11418.0432 & 10105.0075 & 12846.0867 & NA & NA & 0.1056 & 0.0118 \tabularnewline
123 & NA & 11249.8569 & 9780.6178 & 12867.0289 & NA & NA & 0.0707 & 0.0138 \tabularnewline
124 & NA & 10682.0988 & 9113.2538 & 12430.8697 & NA & NA & 0.1704 & 0.0038 \tabularnewline
125 & NA & 10045.7393 & 8417.2616 & 11882.8873 & NA & NA & 0.2155 & 6e-04 \tabularnewline
126 & NA & 11980.7771 & 9998.2717 & 14223.2992 & NA & NA & 0.1627 & 0.1712 \tabularnewline
127 & NA & 17996.6995 & 15175.4312 & 21166.075 & NA & NA & 0.1777 & 0.9989 \tabularnewline
128 & NA & 18874.6563 & 15793.5118 & 22353.7441 & NA & NA & 0.1923 & 0.9995 \tabularnewline
129 & NA & 14950.8359 & 12217.4033 & 18086.007 & NA & NA & 0.2374 & 0.8805 \tabularnewline
130 & NA & 13128.4061 & 10529.8489 & 16145.6295 & NA & NA & 0.188 & 0.5159 \tabularnewline
131 & NA & 11698.3285 & 9212.2268 & 14619.7831 & NA & NA & 0.1792 & 0.1792 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35349&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[119])[/C][/ROW]
[ROW][C]107[/C][C]13994[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]14780[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]13100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]12329[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]12463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]11532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]10784[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]13106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]19491[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]20418[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]16094[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]14491[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]13067[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]NA[/C][C]13590.9813[/C][C]12629.0324[/C][C]14603.0834[/C][C]NA[/C][C]0.8449[/C][C]0.0107[/C][C]0.8449[/C][/ROW]
[ROW][C]121[/C][C]NA[/C][C]11850.6938[/C][C]10739.4676[/C][C]13040.0083[/C][C]NA[/C][C]NA[/C][C]0.0198[/C][C]0.0225[/C][/ROW]
[ROW][C]122[/C][C]NA[/C][C]11418.0432[/C][C]10105.0075[/C][C]12846.0867[/C][C]NA[/C][C]NA[/C][C]0.1056[/C][C]0.0118[/C][/ROW]
[ROW][C]123[/C][C]NA[/C][C]11249.8569[/C][C]9780.6178[/C][C]12867.0289[/C][C]NA[/C][C]NA[/C][C]0.0707[/C][C]0.0138[/C][/ROW]
[ROW][C]124[/C][C]NA[/C][C]10682.0988[/C][C]9113.2538[/C][C]12430.8697[/C][C]NA[/C][C]NA[/C][C]0.1704[/C][C]0.0038[/C][/ROW]
[ROW][C]125[/C][C]NA[/C][C]10045.7393[/C][C]8417.2616[/C][C]11882.8873[/C][C]NA[/C][C]NA[/C][C]0.2155[/C][C]6e-04[/C][/ROW]
[ROW][C]126[/C][C]NA[/C][C]11980.7771[/C][C]9998.2717[/C][C]14223.2992[/C][C]NA[/C][C]NA[/C][C]0.1627[/C][C]0.1712[/C][/ROW]
[ROW][C]127[/C][C]NA[/C][C]17996.6995[/C][C]15175.4312[/C][C]21166.075[/C][C]NA[/C][C]NA[/C][C]0.1777[/C][C]0.9989[/C][/ROW]
[ROW][C]128[/C][C]NA[/C][C]18874.6563[/C][C]15793.5118[/C][C]22353.7441[/C][C]NA[/C][C]NA[/C][C]0.1923[/C][C]0.9995[/C][/ROW]
[ROW][C]129[/C][C]NA[/C][C]14950.8359[/C][C]12217.4033[/C][C]18086.007[/C][C]NA[/C][C]NA[/C][C]0.2374[/C][C]0.8805[/C][/ROW]
[ROW][C]130[/C][C]NA[/C][C]13128.4061[/C][C]10529.8489[/C][C]16145.6295[/C][C]NA[/C][C]NA[/C][C]0.188[/C][C]0.5159[/C][/ROW]
[ROW][C]131[/C][C]NA[/C][C]11698.3285[/C][C]9212.2268[/C][C]14619.7831[/C][C]NA[/C][C]NA[/C][C]0.1792[/C][C]0.1792[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35349&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35349&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[119])
10713994-------
10814780-------
10913100-------
11012329-------
11112463-------
11211532-------
11310784-------
11413106-------
11519491-------
11620418-------
11716094-------
11814491-------
11913067-------
120NA13590.981312629.032414603.0834NA0.84490.01070.8449
121NA11850.693810739.467613040.0083NANA0.01980.0225
122NA11418.043210105.007512846.0867NANA0.10560.0118
123NA11249.85699780.617812867.0289NANA0.07070.0138
124NA10682.09889113.253812430.8697NANA0.17040.0038
125NA10045.73938417.261611882.8873NANA0.21556e-04
126NA11980.77719998.271714223.2992NANA0.16270.1712
127NA17996.699515175.431221166.075NANA0.17770.9989
128NA18874.656315793.511822353.7441NANA0.19230.9995
129NA14950.835912217.403318086.007NANA0.23740.8805
130NA13128.406110529.848916145.6295NANA0.1880.5159
131NA11698.32859212.226814619.7831NANA0.17920.1792







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.038NANANANANA
1210.0512NANANANANA
1220.0638NANANANANA
1230.0733NANANANANA
1240.0835NANANANANA
1250.0933NANANANANA
1260.0955NANANANANA
1270.0899NANANANANA
1280.094NANANANANA
1290.107NANANANANA
1300.1173NANANANANA
1310.1274NANANANANA

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.038 & NA & NA & NA & NA & NA \tabularnewline
121 & 0.0512 & NA & NA & NA & NA & NA \tabularnewline
122 & 0.0638 & NA & NA & NA & NA & NA \tabularnewline
123 & 0.0733 & NA & NA & NA & NA & NA \tabularnewline
124 & 0.0835 & NA & NA & NA & NA & NA \tabularnewline
125 & 0.0933 & NA & NA & NA & NA & NA \tabularnewline
126 & 0.0955 & NA & NA & NA & NA & NA \tabularnewline
127 & 0.0899 & NA & NA & NA & NA & NA \tabularnewline
128 & 0.094 & NA & NA & NA & NA & NA \tabularnewline
129 & 0.107 & NA & NA & NA & NA & NA \tabularnewline
130 & 0.1173 & NA & NA & NA & NA & NA \tabularnewline
131 & 0.1274 & NA & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35349&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]120[/C][C]0.038[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]121[/C][C]0.0512[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]122[/C][C]0.0638[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]123[/C][C]0.0733[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]124[/C][C]0.0835[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]125[/C][C]0.0933[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]126[/C][C]0.0955[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]127[/C][C]0.0899[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]128[/C][C]0.094[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]129[/C][C]0.107[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]130[/C][C]0.1173[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]131[/C][C]0.1274[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35349&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35349&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
1200.038NANANANANA
1210.0512NANANANANA
1220.0638NANANANANA
1230.0733NANANANANA
1240.0835NANANANANA
1250.0933NANANANANA
1260.0955NANANANANA
1270.0899NANANANANA
1280.094NANANANANA
1290.107NANANANANA
1300.1173NANANANANA
1310.1274NANANANANA



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