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 computationWed, 22 Dec 2010 16:09:24 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/22/t129303411515anicc5dqfpfm5.htm/, Retrieved Mon, 06 May 2024 05:47:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114348, Retrieved Mon, 06 May 2024 05:47:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact168
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]
-   PD      [ARIMA Forecasting] [] [2010-12-07 15:02:49] [dd4fe494cff2ee46c12b15bdc7b848ca]
-             [ARIMA Forecasting] [] [2010-12-07 15:19:10] [dd4fe494cff2ee46c12b15bdc7b848ca]
-   PD            [ARIMA Forecasting] [] [2010-12-22 16:09:24] [6c31f786e793d35ef3a03978bc5de774] [Current]
Feedback Forum

Post a new message
Dataseries X:
320
324
343
295
301
367
196
182
342
361
333
330
345
323
365
323
316
358
235
169
430
409
407
341
326
374
364
349
300
385
304
196
443
414
325
388
356
386
444
387
327
448
225
182
460
411
342
361
377
331
428
340
352
461
221
198
422
329
320
375
364
351
380
319
322
386
221
187
343
342
365
313
356
337
389
326
343
357
220
218
391
425
332
298
360
336
325
393
301
426
265
210
429
440
357
431
442
422
544
420
396
482
261
211
448
468
464
425




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 4 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114348&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114348&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114348&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 time4 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[96])
84298-------
85360-------
86336-------
87325-------
88393-------
89301-------
90426-------
91265-------
92210-------
93429-------
94440-------
95357-------
96431-------
97442375.3009312.3009438.30090.0190.04160.6830.0416
98422383.3344320.316446.35290.11460.0340.92950.0691
99544414.0326349.3271478.73800.40460.99650.3036
100420375.6885309.9366441.44030.093300.30290.0496
101396353.5391286.6715420.40680.10660.02570.93820.0116
102482431.0651363.1485498.98170.07080.84420.55810.5007
103261267.6781198.7479336.60830.424700.53040
104211223.8003153.8961293.70450.35980.14850.65060
105448437.7943366.953508.63560.388810.59610.5746
106468420.9177349.1744492.66090.09920.22970.30110.3915
107464376.4037303.7955449.01180.0090.00670.69980.0703
108425382.6926309.248456.13720.12940.0150.09870.0987

\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[96]) \tabularnewline
84 & 298 & - & - & - & - & - & - & - \tabularnewline
85 & 360 & - & - & - & - & - & - & - \tabularnewline
86 & 336 & - & - & - & - & - & - & - \tabularnewline
87 & 325 & - & - & - & - & - & - & - \tabularnewline
88 & 393 & - & - & - & - & - & - & - \tabularnewline
89 & 301 & - & - & - & - & - & - & - \tabularnewline
90 & 426 & - & - & - & - & - & - & - \tabularnewline
91 & 265 & - & - & - & - & - & - & - \tabularnewline
92 & 210 & - & - & - & - & - & - & - \tabularnewline
93 & 429 & - & - & - & - & - & - & - \tabularnewline
94 & 440 & - & - & - & - & - & - & - \tabularnewline
95 & 357 & - & - & - & - & - & - & - \tabularnewline
96 & 431 & - & - & - & - & - & - & - \tabularnewline
97 & 442 & 375.3009 & 312.3009 & 438.3009 & 0.019 & 0.0416 & 0.683 & 0.0416 \tabularnewline
98 & 422 & 383.3344 & 320.316 & 446.3529 & 0.1146 & 0.034 & 0.9295 & 0.0691 \tabularnewline
99 & 544 & 414.0326 & 349.3271 & 478.738 & 0 & 0.4046 & 0.9965 & 0.3036 \tabularnewline
100 & 420 & 375.6885 & 309.9366 & 441.4403 & 0.0933 & 0 & 0.3029 & 0.0496 \tabularnewline
101 & 396 & 353.5391 & 286.6715 & 420.4068 & 0.1066 & 0.0257 & 0.9382 & 0.0116 \tabularnewline
102 & 482 & 431.0651 & 363.1485 & 498.9817 & 0.0708 & 0.8442 & 0.5581 & 0.5007 \tabularnewline
103 & 261 & 267.6781 & 198.7479 & 336.6083 & 0.4247 & 0 & 0.5304 & 0 \tabularnewline
104 & 211 & 223.8003 & 153.8961 & 293.7045 & 0.3598 & 0.1485 & 0.6506 & 0 \tabularnewline
105 & 448 & 437.7943 & 366.953 & 508.6356 & 0.3888 & 1 & 0.5961 & 0.5746 \tabularnewline
106 & 468 & 420.9177 & 349.1744 & 492.6609 & 0.0992 & 0.2297 & 0.3011 & 0.3915 \tabularnewline
107 & 464 & 376.4037 & 303.7955 & 449.0118 & 0.009 & 0.0067 & 0.6998 & 0.0703 \tabularnewline
108 & 425 & 382.6926 & 309.248 & 456.1372 & 0.1294 & 0.015 & 0.0987 & 0.0987 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114348&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[96])[/C][/ROW]
[ROW][C]84[/C][C]298[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]336[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]325[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]393[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]301[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]426[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]265[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]210[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]429[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]440[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]431[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]442[/C][C]375.3009[/C][C]312.3009[/C][C]438.3009[/C][C]0.019[/C][C]0.0416[/C][C]0.683[/C][C]0.0416[/C][/ROW]
[ROW][C]98[/C][C]422[/C][C]383.3344[/C][C]320.316[/C][C]446.3529[/C][C]0.1146[/C][C]0.034[/C][C]0.9295[/C][C]0.0691[/C][/ROW]
[ROW][C]99[/C][C]544[/C][C]414.0326[/C][C]349.3271[/C][C]478.738[/C][C]0[/C][C]0.4046[/C][C]0.9965[/C][C]0.3036[/C][/ROW]
[ROW][C]100[/C][C]420[/C][C]375.6885[/C][C]309.9366[/C][C]441.4403[/C][C]0.0933[/C][C]0[/C][C]0.3029[/C][C]0.0496[/C][/ROW]
[ROW][C]101[/C][C]396[/C][C]353.5391[/C][C]286.6715[/C][C]420.4068[/C][C]0.1066[/C][C]0.0257[/C][C]0.9382[/C][C]0.0116[/C][/ROW]
[ROW][C]102[/C][C]482[/C][C]431.0651[/C][C]363.1485[/C][C]498.9817[/C][C]0.0708[/C][C]0.8442[/C][C]0.5581[/C][C]0.5007[/C][/ROW]
[ROW][C]103[/C][C]261[/C][C]267.6781[/C][C]198.7479[/C][C]336.6083[/C][C]0.4247[/C][C]0[/C][C]0.5304[/C][C]0[/C][/ROW]
[ROW][C]104[/C][C]211[/C][C]223.8003[/C][C]153.8961[/C][C]293.7045[/C][C]0.3598[/C][C]0.1485[/C][C]0.6506[/C][C]0[/C][/ROW]
[ROW][C]105[/C][C]448[/C][C]437.7943[/C][C]366.953[/C][C]508.6356[/C][C]0.3888[/C][C]1[/C][C]0.5961[/C][C]0.5746[/C][/ROW]
[ROW][C]106[/C][C]468[/C][C]420.9177[/C][C]349.1744[/C][C]492.6609[/C][C]0.0992[/C][C]0.2297[/C][C]0.3011[/C][C]0.3915[/C][/ROW]
[ROW][C]107[/C][C]464[/C][C]376.4037[/C][C]303.7955[/C][C]449.0118[/C][C]0.009[/C][C]0.0067[/C][C]0.6998[/C][C]0.0703[/C][/ROW]
[ROW][C]108[/C][C]425[/C][C]382.6926[/C][C]309.248[/C][C]456.1372[/C][C]0.1294[/C][C]0.015[/C][C]0.0987[/C][C]0.0987[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114348&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114348&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[96])
84298-------
85360-------
86336-------
87325-------
88393-------
89301-------
90426-------
91265-------
92210-------
93429-------
94440-------
95357-------
96431-------
97442375.3009312.3009438.30090.0190.04160.6830.0416
98422383.3344320.316446.35290.11460.0340.92950.0691
99544414.0326349.3271478.73800.40460.99650.3036
100420375.6885309.9366441.44030.093300.30290.0496
101396353.5391286.6715420.40680.10660.02570.93820.0116
102482431.0651363.1485498.98170.07080.84420.55810.5007
103261267.6781198.7479336.60830.424700.53040
104211223.8003153.8961293.70450.35980.14850.65060
105448437.7943366.953508.63560.388810.59610.5746
106468420.9177349.1744492.66090.09920.22970.30110.3915
107464376.4037303.7955449.01180.0090.00670.69980.0703
108425382.6926309.248456.13720.12940.0150.09870.0987







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
970.08560.177704448.771700
980.08390.10090.13931495.02542971.898554.5151
990.07970.31390.197516891.5387611.778487.2455
1000.08930.11790.17761963.51286199.71278.7382
1010.09650.12010.16611802.92765320.355172.9408
1020.08040.11820.15812594.36454866.023369.7569
1030.1314-0.02490.139144.59714177.248164.6316
1040.1594-0.05720.1289163.84763675.573160.6265
1050.08260.02330.1171104.1573278.749157.2604
1060.0870.11190.11662216.74583172.548756.3254
1070.09840.23270.12727673.11963581.691559.8472
1080.09790.11060.12581789.91493432.376858.5865

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
97 & 0.0856 & 0.1777 & 0 & 4448.7717 & 0 & 0 \tabularnewline
98 & 0.0839 & 0.1009 & 0.1393 & 1495.0254 & 2971.8985 & 54.5151 \tabularnewline
99 & 0.0797 & 0.3139 & 0.1975 & 16891.538 & 7611.7784 & 87.2455 \tabularnewline
100 & 0.0893 & 0.1179 & 0.1776 & 1963.5128 & 6199.712 & 78.7382 \tabularnewline
101 & 0.0965 & 0.1201 & 0.1661 & 1802.9276 & 5320.3551 & 72.9408 \tabularnewline
102 & 0.0804 & 0.1182 & 0.1581 & 2594.3645 & 4866.0233 & 69.7569 \tabularnewline
103 & 0.1314 & -0.0249 & 0.1391 & 44.5971 & 4177.2481 & 64.6316 \tabularnewline
104 & 0.1594 & -0.0572 & 0.1289 & 163.8476 & 3675.5731 & 60.6265 \tabularnewline
105 & 0.0826 & 0.0233 & 0.1171 & 104.157 & 3278.7491 & 57.2604 \tabularnewline
106 & 0.087 & 0.1119 & 0.1166 & 2216.7458 & 3172.5487 & 56.3254 \tabularnewline
107 & 0.0984 & 0.2327 & 0.1272 & 7673.1196 & 3581.6915 & 59.8472 \tabularnewline
108 & 0.0979 & 0.1106 & 0.1258 & 1789.9149 & 3432.3768 & 58.5865 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114348&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]97[/C][C]0.0856[/C][C]0.1777[/C][C]0[/C][C]4448.7717[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]98[/C][C]0.0839[/C][C]0.1009[/C][C]0.1393[/C][C]1495.0254[/C][C]2971.8985[/C][C]54.5151[/C][/ROW]
[ROW][C]99[/C][C]0.0797[/C][C]0.3139[/C][C]0.1975[/C][C]16891.538[/C][C]7611.7784[/C][C]87.2455[/C][/ROW]
[ROW][C]100[/C][C]0.0893[/C][C]0.1179[/C][C]0.1776[/C][C]1963.5128[/C][C]6199.712[/C][C]78.7382[/C][/ROW]
[ROW][C]101[/C][C]0.0965[/C][C]0.1201[/C][C]0.1661[/C][C]1802.9276[/C][C]5320.3551[/C][C]72.9408[/C][/ROW]
[ROW][C]102[/C][C]0.0804[/C][C]0.1182[/C][C]0.1581[/C][C]2594.3645[/C][C]4866.0233[/C][C]69.7569[/C][/ROW]
[ROW][C]103[/C][C]0.1314[/C][C]-0.0249[/C][C]0.1391[/C][C]44.5971[/C][C]4177.2481[/C][C]64.6316[/C][/ROW]
[ROW][C]104[/C][C]0.1594[/C][C]-0.0572[/C][C]0.1289[/C][C]163.8476[/C][C]3675.5731[/C][C]60.6265[/C][/ROW]
[ROW][C]105[/C][C]0.0826[/C][C]0.0233[/C][C]0.1171[/C][C]104.157[/C][C]3278.7491[/C][C]57.2604[/C][/ROW]
[ROW][C]106[/C][C]0.087[/C][C]0.1119[/C][C]0.1166[/C][C]2216.7458[/C][C]3172.5487[/C][C]56.3254[/C][/ROW]
[ROW][C]107[/C][C]0.0984[/C][C]0.2327[/C][C]0.1272[/C][C]7673.1196[/C][C]3581.6915[/C][C]59.8472[/C][/ROW]
[ROW][C]108[/C][C]0.0979[/C][C]0.1106[/C][C]0.1258[/C][C]1789.9149[/C][C]3432.3768[/C][C]58.5865[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114348&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114348&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
970.08560.177704448.771700
980.08390.10090.13931495.02542971.898554.5151
990.07970.31390.197516891.5387611.778487.2455
1000.08930.11790.17761963.51286199.71278.7382
1010.09650.12010.16611802.92765320.355172.9408
1020.08040.11820.15812594.36454866.023369.7569
1030.1314-0.02490.139144.59714177.248164.6316
1040.1594-0.05720.1289163.84763675.573160.6265
1050.08260.02330.1171104.1573278.749157.2604
1060.0870.11190.11662216.74583172.548756.3254
1070.09840.23270.12727673.11963581.691559.8472
1080.09790.11060.12581789.91493432.376858.5865



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