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 computationTue, 07 Dec 2010 21:04:58 +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/07/t1291755800noxv9ezqk3gfzh3.htm/, Retrieved Fri, 03 May 2024 21:36:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106743, Retrieved Fri, 03 May 2024 21:36:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
-   PD              [ARIMA Forecasting] [ARIMA forecast op...] [2010-12-07 21:04:58] [be034431ba35f7eb1ce695fc7ca4deb9] [Current]
Feedback Forum

Post a new message
Dataseries X:
27951
29781
32914
33488
35652
36488
35387
35676
34844
32447
31068
29010
29812
30951
32974
32936
34012
32946
31948
30599
27691
25073
23406
22248
22896
25317
26558
26471
27543
26198
24725
25005
23462
20780
19815
19761
21454
23899
24939
23580
24562
24696
23785
23812
21917
19713
19282
18788
21453
24482
27474
27264
27349
30632
29429
30084
26290
24379
23335
21346
21106
24514
28353
30805
31348
34556
33855
34787
32529
29998
29257
28155
30466
35704
39327
39351
42234
43630
43722
43121
37985
37135
34646
33026
35087
38846
42013
43908
42868
44423
44167
43636
44382
42142
43452
36912
42413
45344
44873
47510
49554
47369
45998
48140
48441
44928
40454
38661
37246
36843
36424
37594
38144
38737
34560
36080
33508
35462
33374
32110
35533
35532
37903
36763
40399
44164
44496
43110
43880




Summary of computational 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 computational 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=106743&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]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=106743&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106743&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 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[117])
10548441-------
10644928-------
10740454-------
10838661-------
10937246-------
11036843-------
11136424-------
11237594-------
11338144-------
11438737-------
11534560-------
11636080-------
11733508-------
1183546231421.440128299.210534543.66960.00560.095100.0951
1193337430149.542825734.043534565.04220.07620.009200.068
1203211028291.791622883.931433699.65180.08320.03271e-040.0293
1213553329697.575323453.116335942.03440.03350.22450.00890.1158
1223553231960.261724981.298438939.2250.15790.15780.08510.3319
1233790333569.5825926.374741212.78530.13320.30740.23210.5063
1243676334395.951526141.786142650.11690.2870.20250.22380.5835
1254039935283.601926460.682544106.52120.12790.37120.26260.6534
1264416435835.581226478.414745192.74770.04050.16960.27170.6871
1274449634609.382924746.866844471.8990.02470.02880.50390.5866
1284311035059.478324716.273645402.6830.06360.03690.42330.6156
1294388033361.869222559.344444164.3940.02820.03850.48940.4894

\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[117]) \tabularnewline
105 & 48441 & - & - & - & - & - & - & - \tabularnewline
106 & 44928 & - & - & - & - & - & - & - \tabularnewline
107 & 40454 & - & - & - & - & - & - & - \tabularnewline
108 & 38661 & - & - & - & - & - & - & - \tabularnewline
109 & 37246 & - & - & - & - & - & - & - \tabularnewline
110 & 36843 & - & - & - & - & - & - & - \tabularnewline
111 & 36424 & - & - & - & - & - & - & - \tabularnewline
112 & 37594 & - & - & - & - & - & - & - \tabularnewline
113 & 38144 & - & - & - & - & - & - & - \tabularnewline
114 & 38737 & - & - & - & - & - & - & - \tabularnewline
115 & 34560 & - & - & - & - & - & - & - \tabularnewline
116 & 36080 & - & - & - & - & - & - & - \tabularnewline
117 & 33508 & - & - & - & - & - & - & - \tabularnewline
118 & 35462 & 31421.4401 & 28299.2105 & 34543.6696 & 0.0056 & 0.0951 & 0 & 0.0951 \tabularnewline
119 & 33374 & 30149.5428 & 25734.0435 & 34565.0422 & 0.0762 & 0.0092 & 0 & 0.068 \tabularnewline
120 & 32110 & 28291.7916 & 22883.9314 & 33699.6518 & 0.0832 & 0.0327 & 1e-04 & 0.0293 \tabularnewline
121 & 35533 & 29697.5753 & 23453.1163 & 35942.0344 & 0.0335 & 0.2245 & 0.0089 & 0.1158 \tabularnewline
122 & 35532 & 31960.2617 & 24981.2984 & 38939.225 & 0.1579 & 0.1578 & 0.0851 & 0.3319 \tabularnewline
123 & 37903 & 33569.58 & 25926.3747 & 41212.7853 & 0.1332 & 0.3074 & 0.2321 & 0.5063 \tabularnewline
124 & 36763 & 34395.9515 & 26141.7861 & 42650.1169 & 0.287 & 0.2025 & 0.2238 & 0.5835 \tabularnewline
125 & 40399 & 35283.6019 & 26460.6825 & 44106.5212 & 0.1279 & 0.3712 & 0.2626 & 0.6534 \tabularnewline
126 & 44164 & 35835.5812 & 26478.4147 & 45192.7477 & 0.0405 & 0.1696 & 0.2717 & 0.6871 \tabularnewline
127 & 44496 & 34609.3829 & 24746.8668 & 44471.899 & 0.0247 & 0.0288 & 0.5039 & 0.5866 \tabularnewline
128 & 43110 & 35059.4783 & 24716.2736 & 45402.683 & 0.0636 & 0.0369 & 0.4233 & 0.6156 \tabularnewline
129 & 43880 & 33361.8692 & 22559.3444 & 44164.394 & 0.0282 & 0.0385 & 0.4894 & 0.4894 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106743&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[117])[/C][/ROW]
[ROW][C]105[/C][C]48441[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]44928[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]40454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]38661[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]37246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]36843[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]36424[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]37594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]38144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]38737[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]34560[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]36080[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]33508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]35462[/C][C]31421.4401[/C][C]28299.2105[/C][C]34543.6696[/C][C]0.0056[/C][C]0.0951[/C][C]0[/C][C]0.0951[/C][/ROW]
[ROW][C]119[/C][C]33374[/C][C]30149.5428[/C][C]25734.0435[/C][C]34565.0422[/C][C]0.0762[/C][C]0.0092[/C][C]0[/C][C]0.068[/C][/ROW]
[ROW][C]120[/C][C]32110[/C][C]28291.7916[/C][C]22883.9314[/C][C]33699.6518[/C][C]0.0832[/C][C]0.0327[/C][C]1e-04[/C][C]0.0293[/C][/ROW]
[ROW][C]121[/C][C]35533[/C][C]29697.5753[/C][C]23453.1163[/C][C]35942.0344[/C][C]0.0335[/C][C]0.2245[/C][C]0.0089[/C][C]0.1158[/C][/ROW]
[ROW][C]122[/C][C]35532[/C][C]31960.2617[/C][C]24981.2984[/C][C]38939.225[/C][C]0.1579[/C][C]0.1578[/C][C]0.0851[/C][C]0.3319[/C][/ROW]
[ROW][C]123[/C][C]37903[/C][C]33569.58[/C][C]25926.3747[/C][C]41212.7853[/C][C]0.1332[/C][C]0.3074[/C][C]0.2321[/C][C]0.5063[/C][/ROW]
[ROW][C]124[/C][C]36763[/C][C]34395.9515[/C][C]26141.7861[/C][C]42650.1169[/C][C]0.287[/C][C]0.2025[/C][C]0.2238[/C][C]0.5835[/C][/ROW]
[ROW][C]125[/C][C]40399[/C][C]35283.6019[/C][C]26460.6825[/C][C]44106.5212[/C][C]0.1279[/C][C]0.3712[/C][C]0.2626[/C][C]0.6534[/C][/ROW]
[ROW][C]126[/C][C]44164[/C][C]35835.5812[/C][C]26478.4147[/C][C]45192.7477[/C][C]0.0405[/C][C]0.1696[/C][C]0.2717[/C][C]0.6871[/C][/ROW]
[ROW][C]127[/C][C]44496[/C][C]34609.3829[/C][C]24746.8668[/C][C]44471.899[/C][C]0.0247[/C][C]0.0288[/C][C]0.5039[/C][C]0.5866[/C][/ROW]
[ROW][C]128[/C][C]43110[/C][C]35059.4783[/C][C]24716.2736[/C][C]45402.683[/C][C]0.0636[/C][C]0.0369[/C][C]0.4233[/C][C]0.6156[/C][/ROW]
[ROW][C]129[/C][C]43880[/C][C]33361.8692[/C][C]22559.3444[/C][C]44164.394[/C][C]0.0282[/C][C]0.0385[/C][C]0.4894[/C][C]0.4894[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106743&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106743&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[117])
10548441-------
10644928-------
10740454-------
10838661-------
10937246-------
11036843-------
11136424-------
11237594-------
11338144-------
11438737-------
11534560-------
11636080-------
11733508-------
1183546231421.440128299.210534543.66960.00560.095100.0951
1193337430149.542825734.043534565.04220.07620.009200.068
1203211028291.791622883.931433699.65180.08320.03271e-040.0293
1213553329697.575323453.116335942.03440.03350.22450.00890.1158
1223553231960.261724981.298438939.2250.15790.15780.08510.3319
1233790333569.5825926.374741212.78530.13320.30740.23210.5063
1243676334395.951526141.786142650.11690.2870.20250.22380.5835
1254039935283.601926460.682544106.52120.12790.37120.26260.6534
1264416435835.581226478.414745192.74770.04050.16960.27170.6871
1274449634609.382924746.866844471.8990.02470.02880.50390.5866
1284311035059.478324716.273645402.6830.06360.03690.42330.6156
1294388033361.869222559.344444164.3940.02820.03850.48940.4894







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1180.05070.1286016326124.697700
1190.07470.10690.117810397123.946613361624.32213655.3556
1200.09750.1350.123514578715.107813767321.25073710.4341
1210.10730.19650.141734052180.865118838536.15434340.3383
1220.11140.11180.135712757314.600317622291.84354197.8914
1230.11620.12910.134618778528.98717814998.03414220.7817
1240.12240.06880.12525602918.439216070415.23484008.7922
1250.12760.1450.127726167298.000217332525.58054163.235
1260.13320.23240.139369362560.285823113640.54774807.6648
1270.14540.28570.15497745197.449130576796.23795529.6289
1280.15050.22960.160864810899.697433688987.46155804.2215
1290.16520.31530.1737110631074.871940100828.0796332.5215

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
118 & 0.0507 & 0.1286 & 0 & 16326124.6977 & 0 & 0 \tabularnewline
119 & 0.0747 & 0.1069 & 0.1178 & 10397123.9466 & 13361624.3221 & 3655.3556 \tabularnewline
120 & 0.0975 & 0.135 & 0.1235 & 14578715.1078 & 13767321.2507 & 3710.4341 \tabularnewline
121 & 0.1073 & 0.1965 & 0.1417 & 34052180.8651 & 18838536.1543 & 4340.3383 \tabularnewline
122 & 0.1114 & 0.1118 & 0.1357 & 12757314.6003 & 17622291.8435 & 4197.8914 \tabularnewline
123 & 0.1162 & 0.1291 & 0.1346 & 18778528.987 & 17814998.0341 & 4220.7817 \tabularnewline
124 & 0.1224 & 0.0688 & 0.1252 & 5602918.4392 & 16070415.2348 & 4008.7922 \tabularnewline
125 & 0.1276 & 0.145 & 0.1277 & 26167298.0002 & 17332525.5805 & 4163.235 \tabularnewline
126 & 0.1332 & 0.2324 & 0.1393 & 69362560.2858 & 23113640.5477 & 4807.6648 \tabularnewline
127 & 0.1454 & 0.2857 & 0.154 & 97745197.4491 & 30576796.2379 & 5529.6289 \tabularnewline
128 & 0.1505 & 0.2296 & 0.1608 & 64810899.6974 & 33688987.4615 & 5804.2215 \tabularnewline
129 & 0.1652 & 0.3153 & 0.1737 & 110631074.8719 & 40100828.079 & 6332.5215 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106743&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]118[/C][C]0.0507[/C][C]0.1286[/C][C]0[/C][C]16326124.6977[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]119[/C][C]0.0747[/C][C]0.1069[/C][C]0.1178[/C][C]10397123.9466[/C][C]13361624.3221[/C][C]3655.3556[/C][/ROW]
[ROW][C]120[/C][C]0.0975[/C][C]0.135[/C][C]0.1235[/C][C]14578715.1078[/C][C]13767321.2507[/C][C]3710.4341[/C][/ROW]
[ROW][C]121[/C][C]0.1073[/C][C]0.1965[/C][C]0.1417[/C][C]34052180.8651[/C][C]18838536.1543[/C][C]4340.3383[/C][/ROW]
[ROW][C]122[/C][C]0.1114[/C][C]0.1118[/C][C]0.1357[/C][C]12757314.6003[/C][C]17622291.8435[/C][C]4197.8914[/C][/ROW]
[ROW][C]123[/C][C]0.1162[/C][C]0.1291[/C][C]0.1346[/C][C]18778528.987[/C][C]17814998.0341[/C][C]4220.7817[/C][/ROW]
[ROW][C]124[/C][C]0.1224[/C][C]0.0688[/C][C]0.1252[/C][C]5602918.4392[/C][C]16070415.2348[/C][C]4008.7922[/C][/ROW]
[ROW][C]125[/C][C]0.1276[/C][C]0.145[/C][C]0.1277[/C][C]26167298.0002[/C][C]17332525.5805[/C][C]4163.235[/C][/ROW]
[ROW][C]126[/C][C]0.1332[/C][C]0.2324[/C][C]0.1393[/C][C]69362560.2858[/C][C]23113640.5477[/C][C]4807.6648[/C][/ROW]
[ROW][C]127[/C][C]0.1454[/C][C]0.2857[/C][C]0.154[/C][C]97745197.4491[/C][C]30576796.2379[/C][C]5529.6289[/C][/ROW]
[ROW][C]128[/C][C]0.1505[/C][C]0.2296[/C][C]0.1608[/C][C]64810899.6974[/C][C]33688987.4615[/C][C]5804.2215[/C][/ROW]
[ROW][C]129[/C][C]0.1652[/C][C]0.3153[/C][C]0.1737[/C][C]110631074.8719[/C][C]40100828.079[/C][C]6332.5215[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106743&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106743&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
1180.05070.1286016326124.697700
1190.07470.10690.117810397123.946613361624.32213655.3556
1200.09750.1350.123514578715.107813767321.25073710.4341
1210.10730.19650.141734052180.865118838536.15434340.3383
1220.11140.11180.135712757314.600317622291.84354197.8914
1230.11620.12910.134618778528.98717814998.03414220.7817
1240.12240.06880.12525602918.439216070415.23484008.7922
1250.12760.1450.127726167298.000217332525.58054163.235
1260.13320.23240.139369362560.285823113640.54774807.6648
1270.14540.28570.15497745197.449130576796.23795529.6289
1280.15050.22960.160864810899.697433688987.46155804.2215
1290.16520.31530.1737110631074.871940100828.0796332.5215



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