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 computationThu, 18 Dec 2008 10:23:29 -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/18/t1229621060d5qr2ffo78anc3w.htm/, Retrieved Sun, 12 May 2024 08:16:57 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34897, Retrieved Sun, 12 May 2024 08:16:57 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact161
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [ARIMA Forcasting ...] [2008-12-13 10:25:16] [58bf45a666dc5198906262e8815a9722]
-   P     [ARIMA Forecasting] [ARIMA Forcasting ...] [2008-12-18 17:23:29] [63db34dadd44fb018112addcdefe949f] [Current]
-   PD      [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-20 14:53:20] [063e4b67ad7d3a8a83eccec794cd5aa7]
Feedback Forum

Post a new message
Dataseries X:
101
104
99
105
107
111
117
119
127
128
135
132
136
143
142
153
145
138
148
152
169
169
161
174
179
191
190
182
175
181
197
194
197
216
221
218
230
227
204
197
199
208
191
202
211
224
224
231
244
235
250
266
288
283
295
312
334
348
383
407




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34897&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'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[48])
36218-------
37230-------
38227-------
39204-------
40197-------
41199-------
42208-------
43191-------
44202-------
45211-------
46224-------
47224-------
48231-------
49244232.9045215.6337250.17530.1040.58560.62920.5856
50235231.6412206.0398257.24260.39850.1720.63880.5196
51250232.4792201.2872263.67120.13550.43710.96320.537
52266231.9233195.64268.20670.03280.16440.97040.5199
53288232.2921191.7625272.82160.00350.05150.94630.5249
54283232.0475187.5471276.54780.01240.00690.85520.5184
55295232.2097184.1443280.27510.00520.01920.95360.5197
56312232.1021180.6692283.5350.00120.00830.87430.5168
57334232.1735177.6112286.73581e-040.00210.77660.5168
58348232.1261174.5851289.667203e-040.6090.5153
59383232.1575171.7968292.518301e-040.60450.515
60407232.1367169.0745295.199000.51410.5141

\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[48]) \tabularnewline
36 & 218 & - & - & - & - & - & - & - \tabularnewline
37 & 230 & - & - & - & - & - & - & - \tabularnewline
38 & 227 & - & - & - & - & - & - & - \tabularnewline
39 & 204 & - & - & - & - & - & - & - \tabularnewline
40 & 197 & - & - & - & - & - & - & - \tabularnewline
41 & 199 & - & - & - & - & - & - & - \tabularnewline
42 & 208 & - & - & - & - & - & - & - \tabularnewline
43 & 191 & - & - & - & - & - & - & - \tabularnewline
44 & 202 & - & - & - & - & - & - & - \tabularnewline
45 & 211 & - & - & - & - & - & - & - \tabularnewline
46 & 224 & - & - & - & - & - & - & - \tabularnewline
47 & 224 & - & - & - & - & - & - & - \tabularnewline
48 & 231 & - & - & - & - & - & - & - \tabularnewline
49 & 244 & 232.9045 & 215.6337 & 250.1753 & 0.104 & 0.5856 & 0.6292 & 0.5856 \tabularnewline
50 & 235 & 231.6412 & 206.0398 & 257.2426 & 0.3985 & 0.172 & 0.6388 & 0.5196 \tabularnewline
51 & 250 & 232.4792 & 201.2872 & 263.6712 & 0.1355 & 0.4371 & 0.9632 & 0.537 \tabularnewline
52 & 266 & 231.9233 & 195.64 & 268.2067 & 0.0328 & 0.1644 & 0.9704 & 0.5199 \tabularnewline
53 & 288 & 232.2921 & 191.7625 & 272.8216 & 0.0035 & 0.0515 & 0.9463 & 0.5249 \tabularnewline
54 & 283 & 232.0475 & 187.5471 & 276.5478 & 0.0124 & 0.0069 & 0.8552 & 0.5184 \tabularnewline
55 & 295 & 232.2097 & 184.1443 & 280.2751 & 0.0052 & 0.0192 & 0.9536 & 0.5197 \tabularnewline
56 & 312 & 232.1021 & 180.6692 & 283.535 & 0.0012 & 0.0083 & 0.8743 & 0.5168 \tabularnewline
57 & 334 & 232.1735 & 177.6112 & 286.7358 & 1e-04 & 0.0021 & 0.7766 & 0.5168 \tabularnewline
58 & 348 & 232.1261 & 174.5851 & 289.6672 & 0 & 3e-04 & 0.609 & 0.5153 \tabularnewline
59 & 383 & 232.1575 & 171.7968 & 292.5183 & 0 & 1e-04 & 0.6045 & 0.515 \tabularnewline
60 & 407 & 232.1367 & 169.0745 & 295.199 & 0 & 0 & 0.5141 & 0.5141 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34897&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[48])[/C][/ROW]
[ROW][C]36[/C][C]218[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]230[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]227[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]204[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]208[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]191[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]202[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]211[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]224[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]224[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]231[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]244[/C][C]232.9045[/C][C]215.6337[/C][C]250.1753[/C][C]0.104[/C][C]0.5856[/C][C]0.6292[/C][C]0.5856[/C][/ROW]
[ROW][C]50[/C][C]235[/C][C]231.6412[/C][C]206.0398[/C][C]257.2426[/C][C]0.3985[/C][C]0.172[/C][C]0.6388[/C][C]0.5196[/C][/ROW]
[ROW][C]51[/C][C]250[/C][C]232.4792[/C][C]201.2872[/C][C]263.6712[/C][C]0.1355[/C][C]0.4371[/C][C]0.9632[/C][C]0.537[/C][/ROW]
[ROW][C]52[/C][C]266[/C][C]231.9233[/C][C]195.64[/C][C]268.2067[/C][C]0.0328[/C][C]0.1644[/C][C]0.9704[/C][C]0.5199[/C][/ROW]
[ROW][C]53[/C][C]288[/C][C]232.2921[/C][C]191.7625[/C][C]272.8216[/C][C]0.0035[/C][C]0.0515[/C][C]0.9463[/C][C]0.5249[/C][/ROW]
[ROW][C]54[/C][C]283[/C][C]232.0475[/C][C]187.5471[/C][C]276.5478[/C][C]0.0124[/C][C]0.0069[/C][C]0.8552[/C][C]0.5184[/C][/ROW]
[ROW][C]55[/C][C]295[/C][C]232.2097[/C][C]184.1443[/C][C]280.2751[/C][C]0.0052[/C][C]0.0192[/C][C]0.9536[/C][C]0.5197[/C][/ROW]
[ROW][C]56[/C][C]312[/C][C]232.1021[/C][C]180.6692[/C][C]283.535[/C][C]0.0012[/C][C]0.0083[/C][C]0.8743[/C][C]0.5168[/C][/ROW]
[ROW][C]57[/C][C]334[/C][C]232.1735[/C][C]177.6112[/C][C]286.7358[/C][C]1e-04[/C][C]0.0021[/C][C]0.7766[/C][C]0.5168[/C][/ROW]
[ROW][C]58[/C][C]348[/C][C]232.1261[/C][C]174.5851[/C][C]289.6672[/C][C]0[/C][C]3e-04[/C][C]0.609[/C][C]0.5153[/C][/ROW]
[ROW][C]59[/C][C]383[/C][C]232.1575[/C][C]171.7968[/C][C]292.5183[/C][C]0[/C][C]1e-04[/C][C]0.6045[/C][C]0.515[/C][/ROW]
[ROW][C]60[/C][C]407[/C][C]232.1367[/C][C]169.0745[/C][C]295.199[/C][C]0[/C][C]0[/C][C]0.5141[/C][C]0.5141[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34897&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34897&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[48])
36218-------
37230-------
38227-------
39204-------
40197-------
41199-------
42208-------
43191-------
44202-------
45211-------
46224-------
47224-------
48231-------
49244232.9045215.6337250.17530.1040.58560.62920.5856
50235231.6412206.0398257.24260.39850.1720.63880.5196
51250232.4792201.2872263.67120.13550.43710.96320.537
52266231.9233195.64268.20670.03280.16440.97040.5199
53288232.2921191.7625272.82160.00350.05150.94630.5249
54283232.0475187.5471276.54780.01240.00690.85520.5184
55295232.2097184.1443280.27510.00520.01920.95360.5197
56312232.1021180.6692283.5350.00120.00830.87430.5168
57334232.1735177.6112286.73581e-040.00210.77660.5168
58348232.1261174.5851289.667203e-040.6090.5153
59383232.1575171.7968292.518301e-040.60450.515
60407232.1367169.0745295.199000.51410.5141







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03780.04760.004123.109210.25913.203
500.05640.01450.001211.28150.94010.9696
510.06850.07540.0063306.978125.58155.0578
520.07980.14690.01221161.218596.76829.8371
530.0890.23980.023103.3743258.614516.0815
540.09780.21960.01832596.159216.346614.7087
550.10560.27040.02253942.6194328.551618.126
560.11310.34420.02876383.6739531.972823.0645
570.11990.43860.036510368.6387864.053229.3948
580.12650.49920.041613426.75221118.89633.4499
590.13270.64970.054122753.44611896.120543.5445
600.13860.75330.062830577.16982548.097550.4787

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0378 & 0.0476 & 0.004 & 123.1092 & 10.2591 & 3.203 \tabularnewline
50 & 0.0564 & 0.0145 & 0.0012 & 11.2815 & 0.9401 & 0.9696 \tabularnewline
51 & 0.0685 & 0.0754 & 0.0063 & 306.9781 & 25.5815 & 5.0578 \tabularnewline
52 & 0.0798 & 0.1469 & 0.0122 & 1161.2185 & 96.7682 & 9.8371 \tabularnewline
53 & 0.089 & 0.2398 & 0.02 & 3103.3743 & 258.6145 & 16.0815 \tabularnewline
54 & 0.0978 & 0.2196 & 0.0183 & 2596.159 & 216.3466 & 14.7087 \tabularnewline
55 & 0.1056 & 0.2704 & 0.0225 & 3942.6194 & 328.5516 & 18.126 \tabularnewline
56 & 0.1131 & 0.3442 & 0.0287 & 6383.6739 & 531.9728 & 23.0645 \tabularnewline
57 & 0.1199 & 0.4386 & 0.0365 & 10368.6387 & 864.0532 & 29.3948 \tabularnewline
58 & 0.1265 & 0.4992 & 0.0416 & 13426.7522 & 1118.896 & 33.4499 \tabularnewline
59 & 0.1327 & 0.6497 & 0.0541 & 22753.4461 & 1896.1205 & 43.5445 \tabularnewline
60 & 0.1386 & 0.7533 & 0.0628 & 30577.1698 & 2548.0975 & 50.4787 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34897&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]49[/C][C]0.0378[/C][C]0.0476[/C][C]0.004[/C][C]123.1092[/C][C]10.2591[/C][C]3.203[/C][/ROW]
[ROW][C]50[/C][C]0.0564[/C][C]0.0145[/C][C]0.0012[/C][C]11.2815[/C][C]0.9401[/C][C]0.9696[/C][/ROW]
[ROW][C]51[/C][C]0.0685[/C][C]0.0754[/C][C]0.0063[/C][C]306.9781[/C][C]25.5815[/C][C]5.0578[/C][/ROW]
[ROW][C]52[/C][C]0.0798[/C][C]0.1469[/C][C]0.0122[/C][C]1161.2185[/C][C]96.7682[/C][C]9.8371[/C][/ROW]
[ROW][C]53[/C][C]0.089[/C][C]0.2398[/C][C]0.02[/C][C]3103.3743[/C][C]258.6145[/C][C]16.0815[/C][/ROW]
[ROW][C]54[/C][C]0.0978[/C][C]0.2196[/C][C]0.0183[/C][C]2596.159[/C][C]216.3466[/C][C]14.7087[/C][/ROW]
[ROW][C]55[/C][C]0.1056[/C][C]0.2704[/C][C]0.0225[/C][C]3942.6194[/C][C]328.5516[/C][C]18.126[/C][/ROW]
[ROW][C]56[/C][C]0.1131[/C][C]0.3442[/C][C]0.0287[/C][C]6383.6739[/C][C]531.9728[/C][C]23.0645[/C][/ROW]
[ROW][C]57[/C][C]0.1199[/C][C]0.4386[/C][C]0.0365[/C][C]10368.6387[/C][C]864.0532[/C][C]29.3948[/C][/ROW]
[ROW][C]58[/C][C]0.1265[/C][C]0.4992[/C][C]0.0416[/C][C]13426.7522[/C][C]1118.896[/C][C]33.4499[/C][/ROW]
[ROW][C]59[/C][C]0.1327[/C][C]0.6497[/C][C]0.0541[/C][C]22753.4461[/C][C]1896.1205[/C][C]43.5445[/C][/ROW]
[ROW][C]60[/C][C]0.1386[/C][C]0.7533[/C][C]0.0628[/C][C]30577.1698[/C][C]2548.0975[/C][C]50.4787[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34897&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34897&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
490.03780.04760.004123.109210.25913.203
500.05640.01450.001211.28150.94010.9696
510.06850.07540.0063306.978125.58155.0578
520.07980.14690.01221161.218596.76829.8371
530.0890.23980.023103.3743258.614516.0815
540.09780.21960.01832596.159216.346614.7087
550.10560.27040.02253942.6194328.551618.126
560.11310.34420.02876383.6739531.972823.0645
570.11990.43860.036510368.6387864.053229.3948
580.12650.49920.041613426.75221118.89633.4499
590.13270.64970.054122753.44611896.120543.5445
600.13860.75330.062830577.16982548.097550.4787



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