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 computationMon, 20 Dec 2010 10:13:32 +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/20/t12928398690jcpzqchu5604o2.htm/, Retrieved Sat, 04 May 2024 00:07:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112824, Retrieved Sat, 04 May 2024 00:07:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact220
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 Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Backward Selection] [Arima - Parameter...] [2010-12-12 13:50:49] [aeb27d5c05332f2e597ad139ee63fbe4]
-   P         [ARIMA Backward Selection] [Foutmelding Arima] [2010-12-17 08:18:10] [aeb27d5c05332f2e597ad139ee63fbe4]
- RMP             [ARIMA Forecasting] [] [2010-12-20 10:13:32] [d76b387543b13b5e3afd8ff9e5fdc89f] [Current]
-                   [ARIMA Forecasting] [Voorspelling ARIM...] [2010-12-21 09:19:56] [aeb27d5c05332f2e597ad139ee63fbe4]
-    D                [ARIMA Forecasting] [Arima Voorspelling] [2010-12-24 14:25:26] [aeb27d5c05332f2e597ad139ee63fbe4]
Feedback Forum

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




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112824&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112824&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112824&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'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[117])
10522896-------
10622248-------
10723406-------
10825073-------
10927691-------
11030599-------
11131948-------
11232946-------
11334012-------
11432936-------
11532974-------
11630951-------
11729812-------
1182901027977.111124544.754831409.46740.27770.14740.99950.1474
1193106829729.722424875.637834583.8070.29450.61430.99470.4867
1203244731118.509425173.494537063.52430.33070.50660.97690.6667
1213484432981.827526117.116139846.53890.29750.56070.93460.8173
1223567634837.832927169.858142505.80760.41520.49940.86070.9005
1233538734683.009826288.284743077.7350.43470.40830.73840.8723
1243648835747.535826684.148944810.92270.43640.53110.72770.9004
1253565234844.585525158.587844530.58330.43510.36970.56690.8457
1263348833672.751723401.81643943.68740.48590.35280.55590.7694
1273291433159.681422335.371443983.99130.48230.47630.51340.7278
1282978131214.222619863.484742564.96050.40230.38460.51810.5957
1292795128815.327616961.517640669.13770.44320.43660.43460.4346

\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 & 22896 & - & - & - & - & - & - & - \tabularnewline
106 & 22248 & - & - & - & - & - & - & - \tabularnewline
107 & 23406 & - & - & - & - & - & - & - \tabularnewline
108 & 25073 & - & - & - & - & - & - & - \tabularnewline
109 & 27691 & - & - & - & - & - & - & - \tabularnewline
110 & 30599 & - & - & - & - & - & - & - \tabularnewline
111 & 31948 & - & - & - & - & - & - & - \tabularnewline
112 & 32946 & - & - & - & - & - & - & - \tabularnewline
113 & 34012 & - & - & - & - & - & - & - \tabularnewline
114 & 32936 & - & - & - & - & - & - & - \tabularnewline
115 & 32974 & - & - & - & - & - & - & - \tabularnewline
116 & 30951 & - & - & - & - & - & - & - \tabularnewline
117 & 29812 & - & - & - & - & - & - & - \tabularnewline
118 & 29010 & 27977.1111 & 24544.7548 & 31409.4674 & 0.2777 & 0.1474 & 0.9995 & 0.1474 \tabularnewline
119 & 31068 & 29729.7224 & 24875.6378 & 34583.807 & 0.2945 & 0.6143 & 0.9947 & 0.4867 \tabularnewline
120 & 32447 & 31118.5094 & 25173.4945 & 37063.5243 & 0.3307 & 0.5066 & 0.9769 & 0.6667 \tabularnewline
121 & 34844 & 32981.8275 & 26117.1161 & 39846.5389 & 0.2975 & 0.5607 & 0.9346 & 0.8173 \tabularnewline
122 & 35676 & 34837.8329 & 27169.8581 & 42505.8076 & 0.4152 & 0.4994 & 0.8607 & 0.9005 \tabularnewline
123 & 35387 & 34683.0098 & 26288.2847 & 43077.735 & 0.4347 & 0.4083 & 0.7384 & 0.8723 \tabularnewline
124 & 36488 & 35747.5358 & 26684.1489 & 44810.9227 & 0.4364 & 0.5311 & 0.7277 & 0.9004 \tabularnewline
125 & 35652 & 34844.5855 & 25158.5878 & 44530.5833 & 0.4351 & 0.3697 & 0.5669 & 0.8457 \tabularnewline
126 & 33488 & 33672.7517 & 23401.816 & 43943.6874 & 0.4859 & 0.3528 & 0.5559 & 0.7694 \tabularnewline
127 & 32914 & 33159.6814 & 22335.3714 & 43983.9913 & 0.4823 & 0.4763 & 0.5134 & 0.7278 \tabularnewline
128 & 29781 & 31214.2226 & 19863.4847 & 42564.9605 & 0.4023 & 0.3846 & 0.5181 & 0.5957 \tabularnewline
129 & 27951 & 28815.3276 & 16961.5176 & 40669.1377 & 0.4432 & 0.4366 & 0.4346 & 0.4346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112824&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]22896[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]22248[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]23406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]25073[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]27691[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]30599[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]31948[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]32946[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]34012[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]32936[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]32974[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]30951[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]29812[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]29010[/C][C]27977.1111[/C][C]24544.7548[/C][C]31409.4674[/C][C]0.2777[/C][C]0.1474[/C][C]0.9995[/C][C]0.1474[/C][/ROW]
[ROW][C]119[/C][C]31068[/C][C]29729.7224[/C][C]24875.6378[/C][C]34583.807[/C][C]0.2945[/C][C]0.6143[/C][C]0.9947[/C][C]0.4867[/C][/ROW]
[ROW][C]120[/C][C]32447[/C][C]31118.5094[/C][C]25173.4945[/C][C]37063.5243[/C][C]0.3307[/C][C]0.5066[/C][C]0.9769[/C][C]0.6667[/C][/ROW]
[ROW][C]121[/C][C]34844[/C][C]32981.8275[/C][C]26117.1161[/C][C]39846.5389[/C][C]0.2975[/C][C]0.5607[/C][C]0.9346[/C][C]0.8173[/C][/ROW]
[ROW][C]122[/C][C]35676[/C][C]34837.8329[/C][C]27169.8581[/C][C]42505.8076[/C][C]0.4152[/C][C]0.4994[/C][C]0.8607[/C][C]0.9005[/C][/ROW]
[ROW][C]123[/C][C]35387[/C][C]34683.0098[/C][C]26288.2847[/C][C]43077.735[/C][C]0.4347[/C][C]0.4083[/C][C]0.7384[/C][C]0.8723[/C][/ROW]
[ROW][C]124[/C][C]36488[/C][C]35747.5358[/C][C]26684.1489[/C][C]44810.9227[/C][C]0.4364[/C][C]0.5311[/C][C]0.7277[/C][C]0.9004[/C][/ROW]
[ROW][C]125[/C][C]35652[/C][C]34844.5855[/C][C]25158.5878[/C][C]44530.5833[/C][C]0.4351[/C][C]0.3697[/C][C]0.5669[/C][C]0.8457[/C][/ROW]
[ROW][C]126[/C][C]33488[/C][C]33672.7517[/C][C]23401.816[/C][C]43943.6874[/C][C]0.4859[/C][C]0.3528[/C][C]0.5559[/C][C]0.7694[/C][/ROW]
[ROW][C]127[/C][C]32914[/C][C]33159.6814[/C][C]22335.3714[/C][C]43983.9913[/C][C]0.4823[/C][C]0.4763[/C][C]0.5134[/C][C]0.7278[/C][/ROW]
[ROW][C]128[/C][C]29781[/C][C]31214.2226[/C][C]19863.4847[/C][C]42564.9605[/C][C]0.4023[/C][C]0.3846[/C][C]0.5181[/C][C]0.5957[/C][/ROW]
[ROW][C]129[/C][C]27951[/C][C]28815.3276[/C][C]16961.5176[/C][C]40669.1377[/C][C]0.4432[/C][C]0.4366[/C][C]0.4346[/C][C]0.4346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112824&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112824&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])
10522896-------
10622248-------
10723406-------
10825073-------
10927691-------
11030599-------
11131948-------
11232946-------
11334012-------
11432936-------
11532974-------
11630951-------
11729812-------
1182901027977.111124544.754831409.46740.27770.14740.99950.1474
1193106829729.722424875.637834583.8070.29450.61430.99470.4867
1203244731118.509425173.494537063.52430.33070.50660.97690.6667
1213484432981.827526117.116139846.53890.29750.56070.93460.8173
1223567634837.832927169.858142505.80760.41520.49940.86070.9005
1233538734683.009826288.284743077.7350.43470.40830.73840.8723
1243648835747.535826684.148944810.92270.43640.53110.72770.9004
1253565234844.585525158.587844530.58330.43510.36970.56690.8457
1263348833672.751723401.81643943.68740.48590.35280.55590.7694
1273291433159.681422335.371443983.99130.48230.47630.51340.7278
1282978131214.222619863.484742564.96050.40230.38460.51810.5957
1292795128815.327616961.517640669.13770.44320.43660.43460.4346







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1180.06260.036901066859.512800
1190.08330.0450.0411790986.9791428923.24591195.3758
1200.09750.04270.04151764887.27271540911.25481241.3345
1210.10620.05650.04533467686.57532022605.08491422.1832
1220.11230.02410.041702524.15221758588.89841326.118
1230.12350.02030.0376495602.18661548091.11311244.2231
1240.12940.02070.0352548287.2051405261.98341185.4375
1250.14180.02320.0337651918.10441311093.99851145.0301
1260.1556-0.00550.030534133.18041169209.46311081.2999
1270.1665-0.00740.028260359.32871058324.44971028.749
1280.1855-0.04590.02982054127.08721148851.96221071.8451
1290.2099-0.030.0298747062.2621115369.48721056.1105

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
118 & 0.0626 & 0.0369 & 0 & 1066859.5128 & 0 & 0 \tabularnewline
119 & 0.0833 & 0.045 & 0.041 & 1790986.979 & 1428923.2459 & 1195.3758 \tabularnewline
120 & 0.0975 & 0.0427 & 0.0415 & 1764887.2727 & 1540911.2548 & 1241.3345 \tabularnewline
121 & 0.1062 & 0.0565 & 0.0453 & 3467686.5753 & 2022605.0849 & 1422.1832 \tabularnewline
122 & 0.1123 & 0.0241 & 0.041 & 702524.1522 & 1758588.8984 & 1326.118 \tabularnewline
123 & 0.1235 & 0.0203 & 0.0376 & 495602.1866 & 1548091.1131 & 1244.2231 \tabularnewline
124 & 0.1294 & 0.0207 & 0.0352 & 548287.205 & 1405261.9834 & 1185.4375 \tabularnewline
125 & 0.1418 & 0.0232 & 0.0337 & 651918.1044 & 1311093.9985 & 1145.0301 \tabularnewline
126 & 0.1556 & -0.0055 & 0.0305 & 34133.1804 & 1169209.4631 & 1081.2999 \tabularnewline
127 & 0.1665 & -0.0074 & 0.0282 & 60359.3287 & 1058324.4497 & 1028.749 \tabularnewline
128 & 0.1855 & -0.0459 & 0.0298 & 2054127.0872 & 1148851.9622 & 1071.8451 \tabularnewline
129 & 0.2099 & -0.03 & 0.0298 & 747062.262 & 1115369.4872 & 1056.1105 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112824&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.0626[/C][C]0.0369[/C][C]0[/C][C]1066859.5128[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]119[/C][C]0.0833[/C][C]0.045[/C][C]0.041[/C][C]1790986.979[/C][C]1428923.2459[/C][C]1195.3758[/C][/ROW]
[ROW][C]120[/C][C]0.0975[/C][C]0.0427[/C][C]0.0415[/C][C]1764887.2727[/C][C]1540911.2548[/C][C]1241.3345[/C][/ROW]
[ROW][C]121[/C][C]0.1062[/C][C]0.0565[/C][C]0.0453[/C][C]3467686.5753[/C][C]2022605.0849[/C][C]1422.1832[/C][/ROW]
[ROW][C]122[/C][C]0.1123[/C][C]0.0241[/C][C]0.041[/C][C]702524.1522[/C][C]1758588.8984[/C][C]1326.118[/C][/ROW]
[ROW][C]123[/C][C]0.1235[/C][C]0.0203[/C][C]0.0376[/C][C]495602.1866[/C][C]1548091.1131[/C][C]1244.2231[/C][/ROW]
[ROW][C]124[/C][C]0.1294[/C][C]0.0207[/C][C]0.0352[/C][C]548287.205[/C][C]1405261.9834[/C][C]1185.4375[/C][/ROW]
[ROW][C]125[/C][C]0.1418[/C][C]0.0232[/C][C]0.0337[/C][C]651918.1044[/C][C]1311093.9985[/C][C]1145.0301[/C][/ROW]
[ROW][C]126[/C][C]0.1556[/C][C]-0.0055[/C][C]0.0305[/C][C]34133.1804[/C][C]1169209.4631[/C][C]1081.2999[/C][/ROW]
[ROW][C]127[/C][C]0.1665[/C][C]-0.0074[/C][C]0.0282[/C][C]60359.3287[/C][C]1058324.4497[/C][C]1028.749[/C][/ROW]
[ROW][C]128[/C][C]0.1855[/C][C]-0.0459[/C][C]0.0298[/C][C]2054127.0872[/C][C]1148851.9622[/C][C]1071.8451[/C][/ROW]
[ROW][C]129[/C][C]0.2099[/C][C]-0.03[/C][C]0.0298[/C][C]747062.262[/C][C]1115369.4872[/C][C]1056.1105[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112824&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112824&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.06260.036901066859.512800
1190.08330.0450.0411790986.9791428923.24591195.3758
1200.09750.04270.04151764887.27271540911.25481241.3345
1210.10620.05650.04533467686.57532022605.08491422.1832
1220.11230.02410.041702524.15221758588.89841326.118
1230.12350.02030.0376495602.18661548091.11311244.2231
1240.12940.02070.0352548287.2051405261.98341185.4375
1250.14180.02320.0337651918.10441311093.99851145.0301
1260.1556-0.00550.030534133.18041169209.46311081.2999
1270.1665-0.00740.028260359.32871058324.44971028.749
1280.1855-0.04590.02982054127.08721148851.96221071.8451
1290.2099-0.030.0298747062.2621115369.48721056.1105



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