Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 01:12:47 -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/08/t1197100740usj26ee445xl7tj.htm/, Retrieved Mon, 29 Apr 2024 07:39:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2893, Retrieved Mon, 29 Apr 2024 07:39:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact244
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA_Forecast] [2007-12-08 08:12:47] [129742d52914620af0bad7eb53591257] [Current]
Feedback Forum

Post a new message
Dataseries X:
48527
44446
46380
48950
38883
42928
37107
30186
32602
39892
32194
21629
59968
45694
55756
48554
41052
49822
39191
31994
35735
38930
33658
23849
58972
59249
63955
53785
52760
44795
37348
32370
32717
40974
33591
21124
58608
46865
51378
46235
47206
45382
41227
33795
31295
42625
33625
21538
56421
53152
53536
52408
41454
38271
35306
26414
31917
38030
27534
18387
50556
43901
48572
43899
37532
40357
35489
29027
34485
42598
30306
26451
47460
50104
61465
53726
39477
43895
31481
29896
33842
39120
33702
25094
51442
45594
52518
48564
41745
49585
32747
33379
35645
37034
35681
20972




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2893&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]2 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=2893&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2893&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 time2 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[84])
7226451-------
7347460-------
7450104-------
7561465-------
7653726-------
7739477-------
7843895-------
7931481-------
8029896-------
8133842-------
8239120-------
8333702-------
8425094-------
855144255808.88448618.969662998.79840.116910.98861
864559450694.608943239.322658149.89510.090.42210.56171
875251855720.373747877.521563563.22590.21180.99430.07561
884856450579.581942433.481658725.68220.31390.32050.22451
894174543367.429535078.444451656.41460.35060.10960.82121
904958544167.607135769.63252565.58230.1030.71410.52541
913274737085.60828618.007245553.20880.15760.00190.90270.9972
923337930717.886122206.713339229.05890.270.32020.57510.9024
933564533267.600924728.229541806.97240.29260.48980.44760.9697
943703440185.168631630.523248739.8140.23520.85090.59640.9997
953568131819.419523257.674840381.16410.18830.11630.33320.9382
962097222159.931513594.118230725.74470.39290.0010.2510.251

\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[84]) \tabularnewline
72 & 26451 & - & - & - & - & - & - & - \tabularnewline
73 & 47460 & - & - & - & - & - & - & - \tabularnewline
74 & 50104 & - & - & - & - & - & - & - \tabularnewline
75 & 61465 & - & - & - & - & - & - & - \tabularnewline
76 & 53726 & - & - & - & - & - & - & - \tabularnewline
77 & 39477 & - & - & - & - & - & - & - \tabularnewline
78 & 43895 & - & - & - & - & - & - & - \tabularnewline
79 & 31481 & - & - & - & - & - & - & - \tabularnewline
80 & 29896 & - & - & - & - & - & - & - \tabularnewline
81 & 33842 & - & - & - & - & - & - & - \tabularnewline
82 & 39120 & - & - & - & - & - & - & - \tabularnewline
83 & 33702 & - & - & - & - & - & - & - \tabularnewline
84 & 25094 & - & - & - & - & - & - & - \tabularnewline
85 & 51442 & 55808.884 & 48618.9696 & 62998.7984 & 0.1169 & 1 & 0.9886 & 1 \tabularnewline
86 & 45594 & 50694.6089 & 43239.3226 & 58149.8951 & 0.09 & 0.4221 & 0.5617 & 1 \tabularnewline
87 & 52518 & 55720.3737 & 47877.5215 & 63563.2259 & 0.2118 & 0.9943 & 0.0756 & 1 \tabularnewline
88 & 48564 & 50579.5819 & 42433.4816 & 58725.6822 & 0.3139 & 0.3205 & 0.2245 & 1 \tabularnewline
89 & 41745 & 43367.4295 & 35078.4444 & 51656.4146 & 0.3506 & 0.1096 & 0.8212 & 1 \tabularnewline
90 & 49585 & 44167.6071 & 35769.632 & 52565.5823 & 0.103 & 0.7141 & 0.5254 & 1 \tabularnewline
91 & 32747 & 37085.608 & 28618.0072 & 45553.2088 & 0.1576 & 0.0019 & 0.9027 & 0.9972 \tabularnewline
92 & 33379 & 30717.8861 & 22206.7133 & 39229.0589 & 0.27 & 0.3202 & 0.5751 & 0.9024 \tabularnewline
93 & 35645 & 33267.6009 & 24728.2295 & 41806.9724 & 0.2926 & 0.4898 & 0.4476 & 0.9697 \tabularnewline
94 & 37034 & 40185.1686 & 31630.5232 & 48739.814 & 0.2352 & 0.8509 & 0.5964 & 0.9997 \tabularnewline
95 & 35681 & 31819.4195 & 23257.6748 & 40381.1641 & 0.1883 & 0.1163 & 0.3332 & 0.9382 \tabularnewline
96 & 20972 & 22159.9315 & 13594.1182 & 30725.7447 & 0.3929 & 0.001 & 0.251 & 0.251 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2893&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[84])[/C][/ROW]
[ROW][C]72[/C][C]26451[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]47460[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]50104[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]61465[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]53726[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]39477[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]43895[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]31481[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]29896[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]33842[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]39120[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]33702[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]25094[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]51442[/C][C]55808.884[/C][C]48618.9696[/C][C]62998.7984[/C][C]0.1169[/C][C]1[/C][C]0.9886[/C][C]1[/C][/ROW]
[ROW][C]86[/C][C]45594[/C][C]50694.6089[/C][C]43239.3226[/C][C]58149.8951[/C][C]0.09[/C][C]0.4221[/C][C]0.5617[/C][C]1[/C][/ROW]
[ROW][C]87[/C][C]52518[/C][C]55720.3737[/C][C]47877.5215[/C][C]63563.2259[/C][C]0.2118[/C][C]0.9943[/C][C]0.0756[/C][C]1[/C][/ROW]
[ROW][C]88[/C][C]48564[/C][C]50579.5819[/C][C]42433.4816[/C][C]58725.6822[/C][C]0.3139[/C][C]0.3205[/C][C]0.2245[/C][C]1[/C][/ROW]
[ROW][C]89[/C][C]41745[/C][C]43367.4295[/C][C]35078.4444[/C][C]51656.4146[/C][C]0.3506[/C][C]0.1096[/C][C]0.8212[/C][C]1[/C][/ROW]
[ROW][C]90[/C][C]49585[/C][C]44167.6071[/C][C]35769.632[/C][C]52565.5823[/C][C]0.103[/C][C]0.7141[/C][C]0.5254[/C][C]1[/C][/ROW]
[ROW][C]91[/C][C]32747[/C][C]37085.608[/C][C]28618.0072[/C][C]45553.2088[/C][C]0.1576[/C][C]0.0019[/C][C]0.9027[/C][C]0.9972[/C][/ROW]
[ROW][C]92[/C][C]33379[/C][C]30717.8861[/C][C]22206.7133[/C][C]39229.0589[/C][C]0.27[/C][C]0.3202[/C][C]0.5751[/C][C]0.9024[/C][/ROW]
[ROW][C]93[/C][C]35645[/C][C]33267.6009[/C][C]24728.2295[/C][C]41806.9724[/C][C]0.2926[/C][C]0.4898[/C][C]0.4476[/C][C]0.9697[/C][/ROW]
[ROW][C]94[/C][C]37034[/C][C]40185.1686[/C][C]31630.5232[/C][C]48739.814[/C][C]0.2352[/C][C]0.8509[/C][C]0.5964[/C][C]0.9997[/C][/ROW]
[ROW][C]95[/C][C]35681[/C][C]31819.4195[/C][C]23257.6748[/C][C]40381.1641[/C][C]0.1883[/C][C]0.1163[/C][C]0.3332[/C][C]0.9382[/C][/ROW]
[ROW][C]96[/C][C]20972[/C][C]22159.9315[/C][C]13594.1182[/C][C]30725.7447[/C][C]0.3929[/C][C]0.001[/C][C]0.251[/C][C]0.251[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2893&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2893&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[84])
7226451-------
7347460-------
7450104-------
7561465-------
7653726-------
7739477-------
7843895-------
7931481-------
8029896-------
8133842-------
8239120-------
8333702-------
8425094-------
855144255808.88448618.969662998.79840.116910.98861
864559450694.608943239.322658149.89510.090.42210.56171
875251855720.373747877.521563563.22590.21180.99430.07561
884856450579.581942433.481658725.68220.31390.32050.22451
894174543367.429535078.444451656.41460.35060.10960.82121
904958544167.607135769.63252565.58230.1030.71410.52541
913274737085.60828618.007245553.20880.15760.00190.90270.9972
923337930717.886122206.713339229.05890.270.32020.57510.9024
933564533267.600924728.229541806.97240.29260.48980.44760.9697
943703440185.168631630.523248739.8140.23520.85090.59640.9997
953568131819.419523257.674840381.16410.18830.11630.33320.9382
962097222159.931513594.118230725.74470.39290.0010.2510.251







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0657-0.07820.006519069675.92791589139.66071260.6108
860.075-0.10060.008426016210.97922168017.58161472.419
870.0718-0.05750.004810255197.1233854599.7603924.4457
880.0822-0.03980.00334062570.5916338547.5493581.8484
890.0975-0.03740.00312632277.5054219356.4588468.3551
900.0970.12270.010229348145.44882445678.78741563.8666
910.1165-0.1170.009718823519.5981568626.63321252.4483
920.14140.08660.00727081527.1253590127.2604768.1974
930.1310.07150.0065652026.3967471002.1997686.296
940.1086-0.07840.00659929863.4177827488.6181909.664
950.13730.12140.010114911804.17811242650.34821114.7423
960.1972-0.05360.00451411181.1495117598.4291342.9263

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0657 & -0.0782 & 0.0065 & 19069675.9279 & 1589139.6607 & 1260.6108 \tabularnewline
86 & 0.075 & -0.1006 & 0.0084 & 26016210.9792 & 2168017.5816 & 1472.419 \tabularnewline
87 & 0.0718 & -0.0575 & 0.0048 & 10255197.1233 & 854599.7603 & 924.4457 \tabularnewline
88 & 0.0822 & -0.0398 & 0.0033 & 4062570.5916 & 338547.5493 & 581.8484 \tabularnewline
89 & 0.0975 & -0.0374 & 0.0031 & 2632277.5054 & 219356.4588 & 468.3551 \tabularnewline
90 & 0.097 & 0.1227 & 0.0102 & 29348145.4488 & 2445678.7874 & 1563.8666 \tabularnewline
91 & 0.1165 & -0.117 & 0.0097 & 18823519.598 & 1568626.6332 & 1252.4483 \tabularnewline
92 & 0.1414 & 0.0866 & 0.0072 & 7081527.1253 & 590127.2604 & 768.1974 \tabularnewline
93 & 0.131 & 0.0715 & 0.006 & 5652026.3967 & 471002.1997 & 686.296 \tabularnewline
94 & 0.1086 & -0.0784 & 0.0065 & 9929863.4177 & 827488.6181 & 909.664 \tabularnewline
95 & 0.1373 & 0.1214 & 0.0101 & 14911804.1781 & 1242650.3482 & 1114.7423 \tabularnewline
96 & 0.1972 & -0.0536 & 0.0045 & 1411181.1495 & 117598.4291 & 342.9263 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2893&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]85[/C][C]0.0657[/C][C]-0.0782[/C][C]0.0065[/C][C]19069675.9279[/C][C]1589139.6607[/C][C]1260.6108[/C][/ROW]
[ROW][C]86[/C][C]0.075[/C][C]-0.1006[/C][C]0.0084[/C][C]26016210.9792[/C][C]2168017.5816[/C][C]1472.419[/C][/ROW]
[ROW][C]87[/C][C]0.0718[/C][C]-0.0575[/C][C]0.0048[/C][C]10255197.1233[/C][C]854599.7603[/C][C]924.4457[/C][/ROW]
[ROW][C]88[/C][C]0.0822[/C][C]-0.0398[/C][C]0.0033[/C][C]4062570.5916[/C][C]338547.5493[/C][C]581.8484[/C][/ROW]
[ROW][C]89[/C][C]0.0975[/C][C]-0.0374[/C][C]0.0031[/C][C]2632277.5054[/C][C]219356.4588[/C][C]468.3551[/C][/ROW]
[ROW][C]90[/C][C]0.097[/C][C]0.1227[/C][C]0.0102[/C][C]29348145.4488[/C][C]2445678.7874[/C][C]1563.8666[/C][/ROW]
[ROW][C]91[/C][C]0.1165[/C][C]-0.117[/C][C]0.0097[/C][C]18823519.598[/C][C]1568626.6332[/C][C]1252.4483[/C][/ROW]
[ROW][C]92[/C][C]0.1414[/C][C]0.0866[/C][C]0.0072[/C][C]7081527.1253[/C][C]590127.2604[/C][C]768.1974[/C][/ROW]
[ROW][C]93[/C][C]0.131[/C][C]0.0715[/C][C]0.006[/C][C]5652026.3967[/C][C]471002.1997[/C][C]686.296[/C][/ROW]
[ROW][C]94[/C][C]0.1086[/C][C]-0.0784[/C][C]0.0065[/C][C]9929863.4177[/C][C]827488.6181[/C][C]909.664[/C][/ROW]
[ROW][C]95[/C][C]0.1373[/C][C]0.1214[/C][C]0.0101[/C][C]14911804.1781[/C][C]1242650.3482[/C][C]1114.7423[/C][/ROW]
[ROW][C]96[/C][C]0.1972[/C][C]-0.0536[/C][C]0.0045[/C][C]1411181.1495[/C][C]117598.4291[/C][C]342.9263[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2893&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2893&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
850.0657-0.07820.006519069675.92791589139.66071260.6108
860.075-0.10060.008426016210.97922168017.58161472.419
870.0718-0.05750.004810255197.1233854599.7603924.4457
880.0822-0.03980.00334062570.5916338547.5493581.8484
890.0975-0.03740.00312632277.5054219356.4588468.3551
900.0970.12270.010229348145.44882445678.78741563.8666
910.1165-0.1170.009718823519.5981568626.63321252.4483
920.14140.08660.00727081527.1253590127.2604768.1974
930.1310.07150.0065652026.3967471002.1997686.296
940.1086-0.07840.00659929863.4177827488.6181909.664
950.13730.12140.010114911804.17811242650.34821114.7423
960.1972-0.05360.00451411181.1495117598.4291342.9263



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