Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 07:29:42 -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/07/t1197037010vcs9cghb1td5o9h.htm/, Retrieved Sun, 28 Apr 2024 21:59:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2845, Retrieved Sun, 28 Apr 2024 21:59:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact169
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Werkloosheid < 25...] [2007-12-07 14:29:42] [2cdb7403ed3391afb545b8c0d20da37e] [Current]
Feedback Forum

Post a new message
Dataseries X:
140
132
117
114
113
110
107
103
98
98
137
148
147
139
130
128
127
123
118
114
108
111
151
159
158
148
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




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 11 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=2845&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]11 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=2845&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2845&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 time11 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[61])
49157-------
50147-------
51137-------
52132-------
53125-------
54123-------
55117-------
56114-------
57111-------
58112-------
59144-------
60150-------
61149-------
62134138.2788134.9068141.65070.0064000
63123129.725124.1397135.31030.00910.06680.00530
64116124.3278117.4803131.17520.00860.6480.0140
65117117.4761109.5015125.45060.45340.64160.03220
66111115.3968106.612124.18160.16330.36030.04490
67105110.107100.5869119.62720.14650.42710.07790
68102107.603297.5001117.70630.13850.69320.10730
6995104.990594.36115.62090.03270.70930.13390
7093106.430195.3598117.50040.00870.97850.1620
71124139.0136127.5468150.48030.005110.1970.0439
72130144.7041132.8968156.51140.00730.99970.18970.2379
73124144.096131.9812156.21086e-040.98870.21380.2138

\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[61]) \tabularnewline
49 & 157 & - & - & - & - & - & - & - \tabularnewline
50 & 147 & - & - & - & - & - & - & - \tabularnewline
51 & 137 & - & - & - & - & - & - & - \tabularnewline
52 & 132 & - & - & - & - & - & - & - \tabularnewline
53 & 125 & - & - & - & - & - & - & - \tabularnewline
54 & 123 & - & - & - & - & - & - & - \tabularnewline
55 & 117 & - & - & - & - & - & - & - \tabularnewline
56 & 114 & - & - & - & - & - & - & - \tabularnewline
57 & 111 & - & - & - & - & - & - & - \tabularnewline
58 & 112 & - & - & - & - & - & - & - \tabularnewline
59 & 144 & - & - & - & - & - & - & - \tabularnewline
60 & 150 & - & - & - & - & - & - & - \tabularnewline
61 & 149 & - & - & - & - & - & - & - \tabularnewline
62 & 134 & 138.2788 & 134.9068 & 141.6507 & 0.0064 & 0 & 0 & 0 \tabularnewline
63 & 123 & 129.725 & 124.1397 & 135.3103 & 0.0091 & 0.0668 & 0.0053 & 0 \tabularnewline
64 & 116 & 124.3278 & 117.4803 & 131.1752 & 0.0086 & 0.648 & 0.014 & 0 \tabularnewline
65 & 117 & 117.4761 & 109.5015 & 125.4506 & 0.4534 & 0.6416 & 0.0322 & 0 \tabularnewline
66 & 111 & 115.3968 & 106.612 & 124.1816 & 0.1633 & 0.3603 & 0.0449 & 0 \tabularnewline
67 & 105 & 110.107 & 100.5869 & 119.6272 & 0.1465 & 0.4271 & 0.0779 & 0 \tabularnewline
68 & 102 & 107.6032 & 97.5001 & 117.7063 & 0.1385 & 0.6932 & 0.1073 & 0 \tabularnewline
69 & 95 & 104.9905 & 94.36 & 115.6209 & 0.0327 & 0.7093 & 0.1339 & 0 \tabularnewline
70 & 93 & 106.4301 & 95.3598 & 117.5004 & 0.0087 & 0.9785 & 0.162 & 0 \tabularnewline
71 & 124 & 139.0136 & 127.5468 & 150.4803 & 0.0051 & 1 & 0.197 & 0.0439 \tabularnewline
72 & 130 & 144.7041 & 132.8968 & 156.5114 & 0.0073 & 0.9997 & 0.1897 & 0.2379 \tabularnewline
73 & 124 & 144.096 & 131.9812 & 156.2108 & 6e-04 & 0.9887 & 0.2138 & 0.2138 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2845&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[61])[/C][/ROW]
[ROW][C]49[/C][C]157[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]147[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]132[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]125[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]123[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]114[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]150[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]149[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]134[/C][C]138.2788[/C][C]134.9068[/C][C]141.6507[/C][C]0.0064[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]123[/C][C]129.725[/C][C]124.1397[/C][C]135.3103[/C][C]0.0091[/C][C]0.0668[/C][C]0.0053[/C][C]0[/C][/ROW]
[ROW][C]64[/C][C]116[/C][C]124.3278[/C][C]117.4803[/C][C]131.1752[/C][C]0.0086[/C][C]0.648[/C][C]0.014[/C][C]0[/C][/ROW]
[ROW][C]65[/C][C]117[/C][C]117.4761[/C][C]109.5015[/C][C]125.4506[/C][C]0.4534[/C][C]0.6416[/C][C]0.0322[/C][C]0[/C][/ROW]
[ROW][C]66[/C][C]111[/C][C]115.3968[/C][C]106.612[/C][C]124.1816[/C][C]0.1633[/C][C]0.3603[/C][C]0.0449[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]105[/C][C]110.107[/C][C]100.5869[/C][C]119.6272[/C][C]0.1465[/C][C]0.4271[/C][C]0.0779[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]102[/C][C]107.6032[/C][C]97.5001[/C][C]117.7063[/C][C]0.1385[/C][C]0.6932[/C][C]0.1073[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]95[/C][C]104.9905[/C][C]94.36[/C][C]115.6209[/C][C]0.0327[/C][C]0.7093[/C][C]0.1339[/C][C]0[/C][/ROW]
[ROW][C]70[/C][C]93[/C][C]106.4301[/C][C]95.3598[/C][C]117.5004[/C][C]0.0087[/C][C]0.9785[/C][C]0.162[/C][C]0[/C][/ROW]
[ROW][C]71[/C][C]124[/C][C]139.0136[/C][C]127.5468[/C][C]150.4803[/C][C]0.0051[/C][C]1[/C][C]0.197[/C][C]0.0439[/C][/ROW]
[ROW][C]72[/C][C]130[/C][C]144.7041[/C][C]132.8968[/C][C]156.5114[/C][C]0.0073[/C][C]0.9997[/C][C]0.1897[/C][C]0.2379[/C][/ROW]
[ROW][C]73[/C][C]124[/C][C]144.096[/C][C]131.9812[/C][C]156.2108[/C][C]6e-04[/C][C]0.9887[/C][C]0.2138[/C][C]0.2138[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2845&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2845&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[61])
49157-------
50147-------
51137-------
52132-------
53125-------
54123-------
55117-------
56114-------
57111-------
58112-------
59144-------
60150-------
61149-------
62134138.2788134.9068141.65070.0064000
63123129.725124.1397135.31030.00910.06680.00530
64116124.3278117.4803131.17520.00860.6480.0140
65117117.4761109.5015125.45060.45340.64160.03220
66111115.3968106.612124.18160.16330.36030.04490
67105110.107100.5869119.62720.14650.42710.07790
68102107.603297.5001117.70630.13850.69320.10730
6995104.990594.36115.62090.03270.70930.13390
7093106.430195.3598117.50040.00870.97850.1620
71124139.0136127.5468150.48030.005110.1970.0439
72130144.7041132.8968156.51140.00730.99970.18970.2379
73124144.096131.9812156.21086e-040.98870.21380.2138







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.0124-0.03090.002618.30781.52571.2352
630.022-0.05180.004345.2263.76881.9413
640.0281-0.0670.005669.35145.77932.404
650.0346-0.00413e-040.22660.01890.1374
660.0388-0.03810.003219.33181.6111.2692
670.0441-0.04640.003926.08172.17351.4743
680.0479-0.05210.004331.39562.61631.6175
690.0517-0.09520.007999.80918.31742.884
700.0531-0.12620.0105180.368615.03073.8769
710.0421-0.1080.009225.407318.78394.334
720.0416-0.10160.0085216.210218.01754.2447
730.0429-0.13950.0116403.849133.65415.8012

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0124 & -0.0309 & 0.0026 & 18.3078 & 1.5257 & 1.2352 \tabularnewline
63 & 0.022 & -0.0518 & 0.0043 & 45.226 & 3.7688 & 1.9413 \tabularnewline
64 & 0.0281 & -0.067 & 0.0056 & 69.3514 & 5.7793 & 2.404 \tabularnewline
65 & 0.0346 & -0.0041 & 3e-04 & 0.2266 & 0.0189 & 0.1374 \tabularnewline
66 & 0.0388 & -0.0381 & 0.0032 & 19.3318 & 1.611 & 1.2692 \tabularnewline
67 & 0.0441 & -0.0464 & 0.0039 & 26.0817 & 2.1735 & 1.4743 \tabularnewline
68 & 0.0479 & -0.0521 & 0.0043 & 31.3956 & 2.6163 & 1.6175 \tabularnewline
69 & 0.0517 & -0.0952 & 0.0079 & 99.8091 & 8.3174 & 2.884 \tabularnewline
70 & 0.0531 & -0.1262 & 0.0105 & 180.3686 & 15.0307 & 3.8769 \tabularnewline
71 & 0.0421 & -0.108 & 0.009 & 225.4073 & 18.7839 & 4.334 \tabularnewline
72 & 0.0416 & -0.1016 & 0.0085 & 216.2102 & 18.0175 & 4.2447 \tabularnewline
73 & 0.0429 & -0.1395 & 0.0116 & 403.8491 & 33.6541 & 5.8012 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2845&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]62[/C][C]0.0124[/C][C]-0.0309[/C][C]0.0026[/C][C]18.3078[/C][C]1.5257[/C][C]1.2352[/C][/ROW]
[ROW][C]63[/C][C]0.022[/C][C]-0.0518[/C][C]0.0043[/C][C]45.226[/C][C]3.7688[/C][C]1.9413[/C][/ROW]
[ROW][C]64[/C][C]0.0281[/C][C]-0.067[/C][C]0.0056[/C][C]69.3514[/C][C]5.7793[/C][C]2.404[/C][/ROW]
[ROW][C]65[/C][C]0.0346[/C][C]-0.0041[/C][C]3e-04[/C][C]0.2266[/C][C]0.0189[/C][C]0.1374[/C][/ROW]
[ROW][C]66[/C][C]0.0388[/C][C]-0.0381[/C][C]0.0032[/C][C]19.3318[/C][C]1.611[/C][C]1.2692[/C][/ROW]
[ROW][C]67[/C][C]0.0441[/C][C]-0.0464[/C][C]0.0039[/C][C]26.0817[/C][C]2.1735[/C][C]1.4743[/C][/ROW]
[ROW][C]68[/C][C]0.0479[/C][C]-0.0521[/C][C]0.0043[/C][C]31.3956[/C][C]2.6163[/C][C]1.6175[/C][/ROW]
[ROW][C]69[/C][C]0.0517[/C][C]-0.0952[/C][C]0.0079[/C][C]99.8091[/C][C]8.3174[/C][C]2.884[/C][/ROW]
[ROW][C]70[/C][C]0.0531[/C][C]-0.1262[/C][C]0.0105[/C][C]180.3686[/C][C]15.0307[/C][C]3.8769[/C][/ROW]
[ROW][C]71[/C][C]0.0421[/C][C]-0.108[/C][C]0.009[/C][C]225.4073[/C][C]18.7839[/C][C]4.334[/C][/ROW]
[ROW][C]72[/C][C]0.0416[/C][C]-0.1016[/C][C]0.0085[/C][C]216.2102[/C][C]18.0175[/C][C]4.2447[/C][/ROW]
[ROW][C]73[/C][C]0.0429[/C][C]-0.1395[/C][C]0.0116[/C][C]403.8491[/C][C]33.6541[/C][C]5.8012[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2845&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2845&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
620.0124-0.03090.002618.30781.52571.2352
630.022-0.05180.004345.2263.76881.9413
640.0281-0.0670.005669.35145.77932.404
650.0346-0.00413e-040.22660.01890.1374
660.0388-0.03810.003219.33181.6111.2692
670.0441-0.04640.003926.08172.17351.4743
680.0479-0.05210.004331.39562.61631.6175
690.0517-0.09520.007999.80918.31742.884
700.0531-0.12620.0105180.368615.03073.8769
710.0421-0.1080.009225.407318.78394.334
720.0416-0.10160.0085216.210218.01754.2447
730.0429-0.13950.0116403.849133.65415.8012



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