Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 27 Dec 2007 13:41:30 -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/27/t1198786924vp71mqpi51kxmro.htm/, Retrieved Sat, 27 Apr 2024 15:15:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4910, Retrieved Sat, 27 Apr 2024 15:15:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact284
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-27 20:41:30] [5ab9c9a9553a1280610271cc4d1472e3] [Current]
-    D    [ARIMA Forecasting] [step 1 workshop AF] [2008-12-15 18:37:16] [c4e82a203a5642d47e013a6c97b9cd86]
F    D    [ARIMA Forecasting] [step 1] [2008-12-15 18:45:05] [c4e82a203a5642d47e013a6c97b9cd86]
Feedback Forum

Post a new message
Dataseries X:
15136
16733
20016
17708
18019
19227
22893
23739
21133
22591
26786
29740
15028
17977
20008
21354
19498
22125
25817
28779
20960
22254
27392
29945
16933
17892
20533
23569
22417
22084
26580
27454
24081
23451
28991
31386
16896
20045
23471
21747
25621
23859
25500
30998
24475
23145
29701
34365
17556
22077
25702
22214
26886
23191
27831
35406
23195
25110
30009
36242
18450
21845
26488
22394
28057
25451
24872
33424
24052
28449
33533
37351
19969
21701
26249
24493
24603
26485
30723
34569
26689
26157
32064
38870
21337
19419
23166
28286
24570
24001
33151
24878
26804
28967
33311
40226
20504
23060
23562
27562
23940
24584
34303
25517
23494
29095
32903
34379
16991
21109
23740
25552
21752
20294
29009
25500
24166
26960
31222
38641
14672
17543
25453
32683
22449
22316
27595
25451
25421
25288
32568
35110
16052
22146
21198
19543
22084
23816
29961
26773
26635
26972
30207
38687
16974
21697
24179
23757
25013
24019
30345
24488
25156
25650
30923
37240
17466
19463
24352
26805
25236
24735
29356
31234
22724
28496
32857
37198
13652
22784
23565
26323
23779
27549
29660
23356




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4910&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 time4 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[164])
15224488-------
15325156-------
15425650-------
15530923-------
15637240-------
15717466-------
15819463-------
15924352-------
16026805-------
16125236-------
16224735-------
16329356-------
16431234-------
1652272426126.110721686.660230565.56110.06650.01210.66580.0121
1662849626559.139822118.374930999.90460.19630.95470.65590.0195
1673285732447.635728003.110636892.16080.42840.95930.74930.7037
1683719838425.531633921.763742929.29940.29660.99230.6970.9991
1691365218037.594313487.346322587.84220.029400.59720
1702278421456.164416882.003426030.32530.28470.99960.80350
1712356524870.927720269.425729472.42960.2890.8130.58750.0034
1722632326369.94521738.619231001.27070.49210.88240.4270.0198
1732377925132.006220473.070129790.94230.28460.30820.48260.0051
1742754924857.075420171.779929542.37080.13010.6740.52040.0038
1752966030621.441325910.216635332.66590.34460.89940.70070.3994
1762335628749.423824012.962333485.88530.01280.35320.15190.1519

\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[164]) \tabularnewline
152 & 24488 & - & - & - & - & - & - & - \tabularnewline
153 & 25156 & - & - & - & - & - & - & - \tabularnewline
154 & 25650 & - & - & - & - & - & - & - \tabularnewline
155 & 30923 & - & - & - & - & - & - & - \tabularnewline
156 & 37240 & - & - & - & - & - & - & - \tabularnewline
157 & 17466 & - & - & - & - & - & - & - \tabularnewline
158 & 19463 & - & - & - & - & - & - & - \tabularnewline
159 & 24352 & - & - & - & - & - & - & - \tabularnewline
160 & 26805 & - & - & - & - & - & - & - \tabularnewline
161 & 25236 & - & - & - & - & - & - & - \tabularnewline
162 & 24735 & - & - & - & - & - & - & - \tabularnewline
163 & 29356 & - & - & - & - & - & - & - \tabularnewline
164 & 31234 & - & - & - & - & - & - & - \tabularnewline
165 & 22724 & 26126.1107 & 21686.6602 & 30565.5611 & 0.0665 & 0.0121 & 0.6658 & 0.0121 \tabularnewline
166 & 28496 & 26559.1398 & 22118.3749 & 30999.9046 & 0.1963 & 0.9547 & 0.6559 & 0.0195 \tabularnewline
167 & 32857 & 32447.6357 & 28003.1106 & 36892.1608 & 0.4284 & 0.9593 & 0.7493 & 0.7037 \tabularnewline
168 & 37198 & 38425.5316 & 33921.7637 & 42929.2994 & 0.2966 & 0.9923 & 0.697 & 0.9991 \tabularnewline
169 & 13652 & 18037.5943 & 13487.3463 & 22587.8422 & 0.0294 & 0 & 0.5972 & 0 \tabularnewline
170 & 22784 & 21456.1644 & 16882.0034 & 26030.3253 & 0.2847 & 0.9996 & 0.8035 & 0 \tabularnewline
171 & 23565 & 24870.9277 & 20269.4257 & 29472.4296 & 0.289 & 0.813 & 0.5875 & 0.0034 \tabularnewline
172 & 26323 & 26369.945 & 21738.6192 & 31001.2707 & 0.4921 & 0.8824 & 0.427 & 0.0198 \tabularnewline
173 & 23779 & 25132.0062 & 20473.0701 & 29790.9423 & 0.2846 & 0.3082 & 0.4826 & 0.0051 \tabularnewline
174 & 27549 & 24857.0754 & 20171.7799 & 29542.3708 & 0.1301 & 0.674 & 0.5204 & 0.0038 \tabularnewline
175 & 29660 & 30621.4413 & 25910.2166 & 35332.6659 & 0.3446 & 0.8994 & 0.7007 & 0.3994 \tabularnewline
176 & 23356 & 28749.4238 & 24012.9623 & 33485.8853 & 0.0128 & 0.3532 & 0.1519 & 0.1519 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4910&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[164])[/C][/ROW]
[ROW][C]152[/C][C]24488[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]153[/C][C]25156[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]154[/C][C]25650[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]155[/C][C]30923[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]156[/C][C]37240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]157[/C][C]17466[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]158[/C][C]19463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]159[/C][C]24352[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]160[/C][C]26805[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]161[/C][C]25236[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]162[/C][C]24735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]163[/C][C]29356[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]164[/C][C]31234[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]165[/C][C]22724[/C][C]26126.1107[/C][C]21686.6602[/C][C]30565.5611[/C][C]0.0665[/C][C]0.0121[/C][C]0.6658[/C][C]0.0121[/C][/ROW]
[ROW][C]166[/C][C]28496[/C][C]26559.1398[/C][C]22118.3749[/C][C]30999.9046[/C][C]0.1963[/C][C]0.9547[/C][C]0.6559[/C][C]0.0195[/C][/ROW]
[ROW][C]167[/C][C]32857[/C][C]32447.6357[/C][C]28003.1106[/C][C]36892.1608[/C][C]0.4284[/C][C]0.9593[/C][C]0.7493[/C][C]0.7037[/C][/ROW]
[ROW][C]168[/C][C]37198[/C][C]38425.5316[/C][C]33921.7637[/C][C]42929.2994[/C][C]0.2966[/C][C]0.9923[/C][C]0.697[/C][C]0.9991[/C][/ROW]
[ROW][C]169[/C][C]13652[/C][C]18037.5943[/C][C]13487.3463[/C][C]22587.8422[/C][C]0.0294[/C][C]0[/C][C]0.5972[/C][C]0[/C][/ROW]
[ROW][C]170[/C][C]22784[/C][C]21456.1644[/C][C]16882.0034[/C][C]26030.3253[/C][C]0.2847[/C][C]0.9996[/C][C]0.8035[/C][C]0[/C][/ROW]
[ROW][C]171[/C][C]23565[/C][C]24870.9277[/C][C]20269.4257[/C][C]29472.4296[/C][C]0.289[/C][C]0.813[/C][C]0.5875[/C][C]0.0034[/C][/ROW]
[ROW][C]172[/C][C]26323[/C][C]26369.945[/C][C]21738.6192[/C][C]31001.2707[/C][C]0.4921[/C][C]0.8824[/C][C]0.427[/C][C]0.0198[/C][/ROW]
[ROW][C]173[/C][C]23779[/C][C]25132.0062[/C][C]20473.0701[/C][C]29790.9423[/C][C]0.2846[/C][C]0.3082[/C][C]0.4826[/C][C]0.0051[/C][/ROW]
[ROW][C]174[/C][C]27549[/C][C]24857.0754[/C][C]20171.7799[/C][C]29542.3708[/C][C]0.1301[/C][C]0.674[/C][C]0.5204[/C][C]0.0038[/C][/ROW]
[ROW][C]175[/C][C]29660[/C][C]30621.4413[/C][C]25910.2166[/C][C]35332.6659[/C][C]0.3446[/C][C]0.8994[/C][C]0.7007[/C][C]0.3994[/C][/ROW]
[ROW][C]176[/C][C]23356[/C][C]28749.4238[/C][C]24012.9623[/C][C]33485.8853[/C][C]0.0128[/C][C]0.3532[/C][C]0.1519[/C][C]0.1519[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4910&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4910&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[164])
15224488-------
15325156-------
15425650-------
15530923-------
15637240-------
15717466-------
15819463-------
15924352-------
16026805-------
16125236-------
16224735-------
16329356-------
16431234-------
1652272426126.110721686.660230565.56110.06650.01210.66580.0121
1662849626559.139822118.374930999.90460.19630.95470.65590.0195
1673285732447.635728003.110636892.16080.42840.95930.74930.7037
1683719838425.531633921.763742929.29940.29660.99230.6970.9991
1691365218037.594313487.346322587.84220.029400.59720
1702278421456.164416882.003426030.32530.28470.99960.80350
1712356524870.927720269.425729472.42960.2890.8130.58750.0034
1722632326369.94521738.619231001.27070.49210.88240.4270.0198
1732377925132.006220473.070129790.94230.28460.30820.48260.0051
1742754924857.075420171.779929542.37080.13010.6740.52040.0038
1752966030621.441325910.216635332.66590.34460.89940.70070.3994
1762335628749.423824012.962333485.88530.01280.35320.15190.1519







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1650.0867-0.13020.010911574357.0462964529.7538982.1048
1660.08530.07290.00613751427.6247312618.9687559.1234
1670.06990.01260.0011167579.124213964.927118.1733
1680.0598-0.03190.00271506833.7763125569.4814354.3578
1690.1287-0.24310.020319233437.20491602786.43371266.012
1700.10880.06190.00521763147.4836146928.957383.3131
1710.0944-0.05250.00441705447.0807142120.5901376.9888
1720.0896-0.00181e-042203.8284183.652413.5518
1730.0946-0.05380.00451830625.824152552.152390.5793
1740.09620.10830.0097246458.1863603871.5155777.0917
1750.0785-0.03140.0026924369.286777030.7739277.5442
1760.0841-0.18760.015629089020.42352424085.03531556.9473

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
165 & 0.0867 & -0.1302 & 0.0109 & 11574357.0462 & 964529.7538 & 982.1048 \tabularnewline
166 & 0.0853 & 0.0729 & 0.0061 & 3751427.6247 & 312618.9687 & 559.1234 \tabularnewline
167 & 0.0699 & 0.0126 & 0.0011 & 167579.1242 & 13964.927 & 118.1733 \tabularnewline
168 & 0.0598 & -0.0319 & 0.0027 & 1506833.7763 & 125569.4814 & 354.3578 \tabularnewline
169 & 0.1287 & -0.2431 & 0.0203 & 19233437.2049 & 1602786.4337 & 1266.012 \tabularnewline
170 & 0.1088 & 0.0619 & 0.0052 & 1763147.4836 & 146928.957 & 383.3131 \tabularnewline
171 & 0.0944 & -0.0525 & 0.0044 & 1705447.0807 & 142120.5901 & 376.9888 \tabularnewline
172 & 0.0896 & -0.0018 & 1e-04 & 2203.8284 & 183.6524 & 13.5518 \tabularnewline
173 & 0.0946 & -0.0538 & 0.0045 & 1830625.824 & 152552.152 & 390.5793 \tabularnewline
174 & 0.0962 & 0.1083 & 0.009 & 7246458.1863 & 603871.5155 & 777.0917 \tabularnewline
175 & 0.0785 & -0.0314 & 0.0026 & 924369.2867 & 77030.7739 & 277.5442 \tabularnewline
176 & 0.0841 & -0.1876 & 0.0156 & 29089020.4235 & 2424085.0353 & 1556.9473 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4910&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]165[/C][C]0.0867[/C][C]-0.1302[/C][C]0.0109[/C][C]11574357.0462[/C][C]964529.7538[/C][C]982.1048[/C][/ROW]
[ROW][C]166[/C][C]0.0853[/C][C]0.0729[/C][C]0.0061[/C][C]3751427.6247[/C][C]312618.9687[/C][C]559.1234[/C][/ROW]
[ROW][C]167[/C][C]0.0699[/C][C]0.0126[/C][C]0.0011[/C][C]167579.1242[/C][C]13964.927[/C][C]118.1733[/C][/ROW]
[ROW][C]168[/C][C]0.0598[/C][C]-0.0319[/C][C]0.0027[/C][C]1506833.7763[/C][C]125569.4814[/C][C]354.3578[/C][/ROW]
[ROW][C]169[/C][C]0.1287[/C][C]-0.2431[/C][C]0.0203[/C][C]19233437.2049[/C][C]1602786.4337[/C][C]1266.012[/C][/ROW]
[ROW][C]170[/C][C]0.1088[/C][C]0.0619[/C][C]0.0052[/C][C]1763147.4836[/C][C]146928.957[/C][C]383.3131[/C][/ROW]
[ROW][C]171[/C][C]0.0944[/C][C]-0.0525[/C][C]0.0044[/C][C]1705447.0807[/C][C]142120.5901[/C][C]376.9888[/C][/ROW]
[ROW][C]172[/C][C]0.0896[/C][C]-0.0018[/C][C]1e-04[/C][C]2203.8284[/C][C]183.6524[/C][C]13.5518[/C][/ROW]
[ROW][C]173[/C][C]0.0946[/C][C]-0.0538[/C][C]0.0045[/C][C]1830625.824[/C][C]152552.152[/C][C]390.5793[/C][/ROW]
[ROW][C]174[/C][C]0.0962[/C][C]0.1083[/C][C]0.009[/C][C]7246458.1863[/C][C]603871.5155[/C][C]777.0917[/C][/ROW]
[ROW][C]175[/C][C]0.0785[/C][C]-0.0314[/C][C]0.0026[/C][C]924369.2867[/C][C]77030.7739[/C][C]277.5442[/C][/ROW]
[ROW][C]176[/C][C]0.0841[/C][C]-0.1876[/C][C]0.0156[/C][C]29089020.4235[/C][C]2424085.0353[/C][C]1556.9473[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4910&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4910&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
1650.0867-0.13020.010911574357.0462964529.7538982.1048
1660.08530.07290.00613751427.6247312618.9687559.1234
1670.06990.01260.0011167579.124213964.927118.1733
1680.0598-0.03190.00271506833.7763125569.4814354.3578
1690.1287-0.24310.020319233437.20491602786.43371266.012
1700.10880.06190.00521763147.4836146928.957383.3131
1710.0944-0.05250.00441705447.0807142120.5901376.9888
1720.0896-0.00181e-042203.8284183.652413.5518
1730.0946-0.05380.00451830625.824152552.152390.5793
1740.09620.10830.0097246458.1863603871.5155777.0917
1750.0785-0.03140.0026924369.286777030.7739277.5442
1760.0841-0.18760.015629089020.42352424085.03531556.9473



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