Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 06:50:25 -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/11/t1197380743r3cm2qqlua0jj7n.htm/, Retrieved Mon, 29 Apr 2024 07:03:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3112, Retrieved Mon, 29 Apr 2024 07:03:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact230
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima] [2007-12-11 13:50:25] [9bbf43209035234637c4ce5aaffd9fad] [Current]
Feedback Forum

Post a new message
Dataseries X:
112
118
132
129
121
135
148
148
136
119
104
118
115
126
141
135
125
149
170
170
158
133
114
140
145
150
178
163
172
178
199
199
184
162
146
166
171
180
193
181
183
218
230
242
209
191
172
194
196
196
236
235
229
243
264
272
237
211
180
201
204
188
235
227
234
264
302
293
259
229
203
229
242
233
267
269
270
315
364
347
312
274
237
278
284
277
317
313
318
374
413
405
355
306
271
306
315
301
356
348
355
422
465
467
404
347
305
336
340
318
362
348
363
435
491
505
404
359
310
337
360
342
406
396
420
472
548
559
463
407
362
405
417
391
419
461
472
535
622
606
508
461
390
432




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

\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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3112&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]3 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=3112&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3112&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 time3 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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417415.7331386.3633447.33550.46870.74720.99970.7472
134391391.5025359.3557426.5250.48880.07680.99720.225
135419455.1064413.3114501.12780.06210.99680.98180.9836
136461440.2625396.0801489.37340.20390.80190.96130.9203
137472462.6677412.7118518.67040.3720.52330.93230.9782
138535534.9437473.4857604.37880.49940.96220.96220.9999
139622612.1049537.9016696.54460.40920.96330.93161
140606625.8987546.3543717.02410.33430.53340.92491
141508509.3843441.8687587.2160.48610.00750.87860.9957
142461449.4054387.5459521.13870.37570.05470.87670.8875
143390393.7077337.6267459.10410.45580.02190.8290.3675
144432434.029370.2411508.80680.47880.87580.77660.7766

\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[132]) \tabularnewline
120 & 337 & - & - & - & - & - & - & - \tabularnewline
121 & 360 & - & - & - & - & - & - & - \tabularnewline
122 & 342 & - & - & - & - & - & - & - \tabularnewline
123 & 406 & - & - & - & - & - & - & - \tabularnewline
124 & 396 & - & - & - & - & - & - & - \tabularnewline
125 & 420 & - & - & - & - & - & - & - \tabularnewline
126 & 472 & - & - & - & - & - & - & - \tabularnewline
127 & 548 & - & - & - & - & - & - & - \tabularnewline
128 & 559 & - & - & - & - & - & - & - \tabularnewline
129 & 463 & - & - & - & - & - & - & - \tabularnewline
130 & 407 & - & - & - & - & - & - & - \tabularnewline
131 & 362 & - & - & - & - & - & - & - \tabularnewline
132 & 405 & - & - & - & - & - & - & - \tabularnewline
133 & 417 & 415.7331 & 386.3633 & 447.3355 & 0.4687 & 0.7472 & 0.9997 & 0.7472 \tabularnewline
134 & 391 & 391.5025 & 359.3557 & 426.525 & 0.4888 & 0.0768 & 0.9972 & 0.225 \tabularnewline
135 & 419 & 455.1064 & 413.3114 & 501.1278 & 0.0621 & 0.9968 & 0.9818 & 0.9836 \tabularnewline
136 & 461 & 440.2625 & 396.0801 & 489.3734 & 0.2039 & 0.8019 & 0.9613 & 0.9203 \tabularnewline
137 & 472 & 462.6677 & 412.7118 & 518.6704 & 0.372 & 0.5233 & 0.9323 & 0.9782 \tabularnewline
138 & 535 & 534.9437 & 473.4857 & 604.3788 & 0.4994 & 0.9622 & 0.9622 & 0.9999 \tabularnewline
139 & 622 & 612.1049 & 537.9016 & 696.5446 & 0.4092 & 0.9633 & 0.9316 & 1 \tabularnewline
140 & 606 & 625.8987 & 546.3543 & 717.0241 & 0.3343 & 0.5334 & 0.9249 & 1 \tabularnewline
141 & 508 & 509.3843 & 441.8687 & 587.216 & 0.4861 & 0.0075 & 0.8786 & 0.9957 \tabularnewline
142 & 461 & 449.4054 & 387.5459 & 521.1387 & 0.3757 & 0.0547 & 0.8767 & 0.8875 \tabularnewline
143 & 390 & 393.7077 & 337.6267 & 459.1041 & 0.4558 & 0.0219 & 0.829 & 0.3675 \tabularnewline
144 & 432 & 434.029 & 370.2411 & 508.8068 & 0.4788 & 0.8758 & 0.7766 & 0.7766 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3112&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[132])[/C][/ROW]
[ROW][C]120[/C][C]337[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]342[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]123[/C][C]406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]124[/C][C]396[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]125[/C][C]420[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]126[/C][C]472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]127[/C][C]548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]128[/C][C]559[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]129[/C][C]463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]130[/C][C]407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]131[/C][C]362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]132[/C][C]405[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]133[/C][C]417[/C][C]415.7331[/C][C]386.3633[/C][C]447.3355[/C][C]0.4687[/C][C]0.7472[/C][C]0.9997[/C][C]0.7472[/C][/ROW]
[ROW][C]134[/C][C]391[/C][C]391.5025[/C][C]359.3557[/C][C]426.525[/C][C]0.4888[/C][C]0.0768[/C][C]0.9972[/C][C]0.225[/C][/ROW]
[ROW][C]135[/C][C]419[/C][C]455.1064[/C][C]413.3114[/C][C]501.1278[/C][C]0.0621[/C][C]0.9968[/C][C]0.9818[/C][C]0.9836[/C][/ROW]
[ROW][C]136[/C][C]461[/C][C]440.2625[/C][C]396.0801[/C][C]489.3734[/C][C]0.2039[/C][C]0.8019[/C][C]0.9613[/C][C]0.9203[/C][/ROW]
[ROW][C]137[/C][C]472[/C][C]462.6677[/C][C]412.7118[/C][C]518.6704[/C][C]0.372[/C][C]0.5233[/C][C]0.9323[/C][C]0.9782[/C][/ROW]
[ROW][C]138[/C][C]535[/C][C]534.9437[/C][C]473.4857[/C][C]604.3788[/C][C]0.4994[/C][C]0.9622[/C][C]0.9622[/C][C]0.9999[/C][/ROW]
[ROW][C]139[/C][C]622[/C][C]612.1049[/C][C]537.9016[/C][C]696.5446[/C][C]0.4092[/C][C]0.9633[/C][C]0.9316[/C][C]1[/C][/ROW]
[ROW][C]140[/C][C]606[/C][C]625.8987[/C][C]546.3543[/C][C]717.0241[/C][C]0.3343[/C][C]0.5334[/C][C]0.9249[/C][C]1[/C][/ROW]
[ROW][C]141[/C][C]508[/C][C]509.3843[/C][C]441.8687[/C][C]587.216[/C][C]0.4861[/C][C]0.0075[/C][C]0.8786[/C][C]0.9957[/C][/ROW]
[ROW][C]142[/C][C]461[/C][C]449.4054[/C][C]387.5459[/C][C]521.1387[/C][C]0.3757[/C][C]0.0547[/C][C]0.8767[/C][C]0.8875[/C][/ROW]
[ROW][C]143[/C][C]390[/C][C]393.7077[/C][C]337.6267[/C][C]459.1041[/C][C]0.4558[/C][C]0.0219[/C][C]0.829[/C][C]0.3675[/C][/ROW]
[ROW][C]144[/C][C]432[/C][C]434.029[/C][C]370.2411[/C][C]508.8068[/C][C]0.4788[/C][C]0.8758[/C][C]0.7766[/C][C]0.7766[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3112&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3112&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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417415.7331386.3633447.33550.46870.74720.99970.7472
134391391.5025359.3557426.5250.48880.07680.99720.225
135419455.1064413.3114501.12780.06210.99680.98180.9836
136461440.2625396.0801489.37340.20390.80190.96130.9203
137472462.6677412.7118518.67040.3720.52330.93230.9782
138535534.9437473.4857604.37880.49940.96220.96220.9999
139622612.1049537.9016696.54460.40920.96330.93161
140606625.8987546.3543717.02410.33430.53340.92491
141508509.3843441.8687587.2160.48610.00750.87860.9957
142461449.4054387.5459521.13870.37570.05470.87670.8875
143390393.7077337.6267459.10410.45580.02190.8290.3675
144432434.029370.2411508.80680.47880.87580.77660.7766







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1330.03880.0033e-041.60510.13380.3657
1340.0456-0.00131e-040.25250.0210.1451
1350.0516-0.07930.00661303.6692108.639110.423
1360.05690.04710.0039430.044535.8375.9864
1370.06180.02020.001787.09147.25762.694
1380.06621e-0400.00323e-040.0163
1390.07040.01620.001397.9128.15932.8565
1400.0743-0.03180.0026395.959932.99675.7443
1410.078-0.00272e-041.91630.15970.3996
1420.08140.02580.0021134.435411.2033.3471
1430.0847-0.00948e-0413.74731.14561.0703
1440.0879-0.00474e-044.11680.34310.5857

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
133 & 0.0388 & 0.003 & 3e-04 & 1.6051 & 0.1338 & 0.3657 \tabularnewline
134 & 0.0456 & -0.0013 & 1e-04 & 0.2525 & 0.021 & 0.1451 \tabularnewline
135 & 0.0516 & -0.0793 & 0.0066 & 1303.6692 & 108.6391 & 10.423 \tabularnewline
136 & 0.0569 & 0.0471 & 0.0039 & 430.0445 & 35.837 & 5.9864 \tabularnewline
137 & 0.0618 & 0.0202 & 0.0017 & 87.0914 & 7.2576 & 2.694 \tabularnewline
138 & 0.0662 & 1e-04 & 0 & 0.0032 & 3e-04 & 0.0163 \tabularnewline
139 & 0.0704 & 0.0162 & 0.0013 & 97.912 & 8.1593 & 2.8565 \tabularnewline
140 & 0.0743 & -0.0318 & 0.0026 & 395.9599 & 32.9967 & 5.7443 \tabularnewline
141 & 0.078 & -0.0027 & 2e-04 & 1.9163 & 0.1597 & 0.3996 \tabularnewline
142 & 0.0814 & 0.0258 & 0.0021 & 134.4354 & 11.203 & 3.3471 \tabularnewline
143 & 0.0847 & -0.0094 & 8e-04 & 13.7473 & 1.1456 & 1.0703 \tabularnewline
144 & 0.0879 & -0.0047 & 4e-04 & 4.1168 & 0.3431 & 0.5857 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3112&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]133[/C][C]0.0388[/C][C]0.003[/C][C]3e-04[/C][C]1.6051[/C][C]0.1338[/C][C]0.3657[/C][/ROW]
[ROW][C]134[/C][C]0.0456[/C][C]-0.0013[/C][C]1e-04[/C][C]0.2525[/C][C]0.021[/C][C]0.1451[/C][/ROW]
[ROW][C]135[/C][C]0.0516[/C][C]-0.0793[/C][C]0.0066[/C][C]1303.6692[/C][C]108.6391[/C][C]10.423[/C][/ROW]
[ROW][C]136[/C][C]0.0569[/C][C]0.0471[/C][C]0.0039[/C][C]430.0445[/C][C]35.837[/C][C]5.9864[/C][/ROW]
[ROW][C]137[/C][C]0.0618[/C][C]0.0202[/C][C]0.0017[/C][C]87.0914[/C][C]7.2576[/C][C]2.694[/C][/ROW]
[ROW][C]138[/C][C]0.0662[/C][C]1e-04[/C][C]0[/C][C]0.0032[/C][C]3e-04[/C][C]0.0163[/C][/ROW]
[ROW][C]139[/C][C]0.0704[/C][C]0.0162[/C][C]0.0013[/C][C]97.912[/C][C]8.1593[/C][C]2.8565[/C][/ROW]
[ROW][C]140[/C][C]0.0743[/C][C]-0.0318[/C][C]0.0026[/C][C]395.9599[/C][C]32.9967[/C][C]5.7443[/C][/ROW]
[ROW][C]141[/C][C]0.078[/C][C]-0.0027[/C][C]2e-04[/C][C]1.9163[/C][C]0.1597[/C][C]0.3996[/C][/ROW]
[ROW][C]142[/C][C]0.0814[/C][C]0.0258[/C][C]0.0021[/C][C]134.4354[/C][C]11.203[/C][C]3.3471[/C][/ROW]
[ROW][C]143[/C][C]0.0847[/C][C]-0.0094[/C][C]8e-04[/C][C]13.7473[/C][C]1.1456[/C][C]1.0703[/C][/ROW]
[ROW][C]144[/C][C]0.0879[/C][C]-0.0047[/C][C]4e-04[/C][C]4.1168[/C][C]0.3431[/C][C]0.5857[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3112&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3112&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
1330.03880.0033e-041.60510.13380.3657
1340.0456-0.00131e-040.25250.0210.1451
1350.0516-0.07930.00661303.6692108.639110.423
1360.05690.04710.0039430.044535.8375.9864
1370.06180.02020.001787.09147.25762.694
1380.06621e-0400.00323e-040.0163
1390.07040.01620.001397.9128.15932.8565
1400.0743-0.03180.0026395.959932.99675.7443
1410.078-0.00272e-041.91630.15970.3996
1420.08140.02580.0021134.435411.2033.3471
1430.0847-0.00948e-0413.74731.14561.0703
1440.0879-0.00474e-044.11680.34310.5857



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