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, 15 Dec 2010 17:55:23 +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/15/t12924359397cis1ynfoe3qqrw.htm/, Retrieved Fri, 03 May 2024 05:25:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110626, Retrieved Fri, 03 May 2024 05:25:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact105
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]
- R PD        [ARIMA Forecasting] [] [2010-12-15 17:55:23] [4c854bb223ec27caaa7bcfc5e77b0dbd] [Current]
Feedback Forum

Post a new message
Dataseries X:
12231
13604
15107
10853
13698
11536
8879
11005
13656
12631
10931
8064
12332
12452
14029
10003
12388
10492
9114
9304
9660
10569
8356
5998
10408
11420
11538
10860
10412
9521
7602
8197
10449
11561
8603
8080
10792
11943
11179
9939
10065
11021
9226
9554
11468
9937
8928
8395
11996
12385
15277
12657
11482
16797
11047
11794
13077
11725
10921
9334
11431
13085
16394
15701
14936
18282
12824
14784
16061
14814
14375
13644
16397
19254
21943
16731
22065
20937
18242
19017
20372
20561
18267
16170




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=110626&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=110626&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110626&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[72])
609334-------
6111431-------
6213085-------
6316394-------
6415701-------
6514936-------
6618282-------
6712824-------
6814784-------
6916061-------
7014814-------
7114375-------
7213644-------
731639715414.762512900.390917929.13410.22190.91630.9990.9163
741925416851.082614125.193719576.97140.0420.6280.99660.9894
752194319819.779216897.643822741.91460.07720.64780.98921
761673118805.254515699.247321911.26170.09530.02390.97490.9994
772206518074.237414794.651121353.82370.00850.78890.96960.9959
782093721420.226817975.797724864.65580.39170.35680.96291
791824216215.868112614.132819817.60340.13510.00510.96750.9192
801901717894.732614142.279721647.18540.27890.4280.94790.9868
812037219221.688215324.34223119.03450.28150.5410.9440.9975
822056118008.233413971.190722045.2760.10760.12560.93950.9829
831826717426.16713254.102921598.23110.34640.07040.92410.9622
841617016575.004912272.154220877.85560.42680.22040.90910.9091

\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[72]) \tabularnewline
60 & 9334 & - & - & - & - & - & - & - \tabularnewline
61 & 11431 & - & - & - & - & - & - & - \tabularnewline
62 & 13085 & - & - & - & - & - & - & - \tabularnewline
63 & 16394 & - & - & - & - & - & - & - \tabularnewline
64 & 15701 & - & - & - & - & - & - & - \tabularnewline
65 & 14936 & - & - & - & - & - & - & - \tabularnewline
66 & 18282 & - & - & - & - & - & - & - \tabularnewline
67 & 12824 & - & - & - & - & - & - & - \tabularnewline
68 & 14784 & - & - & - & - & - & - & - \tabularnewline
69 & 16061 & - & - & - & - & - & - & - \tabularnewline
70 & 14814 & - & - & - & - & - & - & - \tabularnewline
71 & 14375 & - & - & - & - & - & - & - \tabularnewline
72 & 13644 & - & - & - & - & - & - & - \tabularnewline
73 & 16397 & 15414.7625 & 12900.3909 & 17929.1341 & 0.2219 & 0.9163 & 0.999 & 0.9163 \tabularnewline
74 & 19254 & 16851.0826 & 14125.1937 & 19576.9714 & 0.042 & 0.628 & 0.9966 & 0.9894 \tabularnewline
75 & 21943 & 19819.7792 & 16897.6438 & 22741.9146 & 0.0772 & 0.6478 & 0.9892 & 1 \tabularnewline
76 & 16731 & 18805.2545 & 15699.2473 & 21911.2617 & 0.0953 & 0.0239 & 0.9749 & 0.9994 \tabularnewline
77 & 22065 & 18074.2374 & 14794.6511 & 21353.8237 & 0.0085 & 0.7889 & 0.9696 & 0.9959 \tabularnewline
78 & 20937 & 21420.2268 & 17975.7977 & 24864.6558 & 0.3917 & 0.3568 & 0.9629 & 1 \tabularnewline
79 & 18242 & 16215.8681 & 12614.1328 & 19817.6034 & 0.1351 & 0.0051 & 0.9675 & 0.9192 \tabularnewline
80 & 19017 & 17894.7326 & 14142.2797 & 21647.1854 & 0.2789 & 0.428 & 0.9479 & 0.9868 \tabularnewline
81 & 20372 & 19221.6882 & 15324.342 & 23119.0345 & 0.2815 & 0.541 & 0.944 & 0.9975 \tabularnewline
82 & 20561 & 18008.2334 & 13971.1907 & 22045.276 & 0.1076 & 0.1256 & 0.9395 & 0.9829 \tabularnewline
83 & 18267 & 17426.167 & 13254.1029 & 21598.2311 & 0.3464 & 0.0704 & 0.9241 & 0.9622 \tabularnewline
84 & 16170 & 16575.0049 & 12272.1542 & 20877.8556 & 0.4268 & 0.2204 & 0.9091 & 0.9091 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110626&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[72])[/C][/ROW]
[ROW][C]60[/C][C]9334[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]11431[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]13085[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]16394[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]15701[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]14936[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]18282[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]12824[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]14784[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]16061[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]14814[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]14375[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]13644[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]16397[/C][C]15414.7625[/C][C]12900.3909[/C][C]17929.1341[/C][C]0.2219[/C][C]0.9163[/C][C]0.999[/C][C]0.9163[/C][/ROW]
[ROW][C]74[/C][C]19254[/C][C]16851.0826[/C][C]14125.1937[/C][C]19576.9714[/C][C]0.042[/C][C]0.628[/C][C]0.9966[/C][C]0.9894[/C][/ROW]
[ROW][C]75[/C][C]21943[/C][C]19819.7792[/C][C]16897.6438[/C][C]22741.9146[/C][C]0.0772[/C][C]0.6478[/C][C]0.9892[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]16731[/C][C]18805.2545[/C][C]15699.2473[/C][C]21911.2617[/C][C]0.0953[/C][C]0.0239[/C][C]0.9749[/C][C]0.9994[/C][/ROW]
[ROW][C]77[/C][C]22065[/C][C]18074.2374[/C][C]14794.6511[/C][C]21353.8237[/C][C]0.0085[/C][C]0.7889[/C][C]0.9696[/C][C]0.9959[/C][/ROW]
[ROW][C]78[/C][C]20937[/C][C]21420.2268[/C][C]17975.7977[/C][C]24864.6558[/C][C]0.3917[/C][C]0.3568[/C][C]0.9629[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]18242[/C][C]16215.8681[/C][C]12614.1328[/C][C]19817.6034[/C][C]0.1351[/C][C]0.0051[/C][C]0.9675[/C][C]0.9192[/C][/ROW]
[ROW][C]80[/C][C]19017[/C][C]17894.7326[/C][C]14142.2797[/C][C]21647.1854[/C][C]0.2789[/C][C]0.428[/C][C]0.9479[/C][C]0.9868[/C][/ROW]
[ROW][C]81[/C][C]20372[/C][C]19221.6882[/C][C]15324.342[/C][C]23119.0345[/C][C]0.2815[/C][C]0.541[/C][C]0.944[/C][C]0.9975[/C][/ROW]
[ROW][C]82[/C][C]20561[/C][C]18008.2334[/C][C]13971.1907[/C][C]22045.276[/C][C]0.1076[/C][C]0.1256[/C][C]0.9395[/C][C]0.9829[/C][/ROW]
[ROW][C]83[/C][C]18267[/C][C]17426.167[/C][C]13254.1029[/C][C]21598.2311[/C][C]0.3464[/C][C]0.0704[/C][C]0.9241[/C][C]0.9622[/C][/ROW]
[ROW][C]84[/C][C]16170[/C][C]16575.0049[/C][C]12272.1542[/C][C]20877.8556[/C][C]0.4268[/C][C]0.2204[/C][C]0.9091[/C][C]0.9091[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110626&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110626&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[72])
609334-------
6111431-------
6213085-------
6316394-------
6415701-------
6514936-------
6618282-------
6712824-------
6814784-------
6916061-------
7014814-------
7114375-------
7213644-------
731639715414.762512900.390917929.13410.22190.91630.9990.9163
741925416851.082614125.193719576.97140.0420.6280.99660.9894
752194319819.779216897.643822741.91460.07720.64780.98921
761673118805.254515699.247321911.26170.09530.02390.97490.9994
772206518074.237414794.651121353.82370.00850.78890.96960.9959
782093721420.226817975.797724864.65580.39170.35680.96291
791824216215.868112614.132819817.60340.13510.00510.96750.9192
801901717894.732614142.279721647.18540.27890.4280.94790.9868
812037219221.688215324.34223119.03450.28150.5410.9440.9975
822056118008.233413971.190722045.2760.10760.12560.93950.9829
831826717426.16713254.102921598.23110.34640.07040.92410.9622
841617016575.004912272.154220877.85560.42680.22040.90910.9091







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.08320.06370964790.547400
740.08250.14260.10325774012.17423369401.36081835.5929
750.07520.10710.10454508066.70843748956.47671936.2222
760.0843-0.11030.10594302531.70173887350.28291971.6364
770.09260.22080.128915926185.79696295117.38572509.0073
780.082-0.02260.1112233508.09975284849.17142298.88
790.11330.12490.11324105210.53185116329.36572261.9305
800.1070.06270.10681259484.19854634223.71982152.7247
810.10340.05980.10161323217.12784266334.09852065.5106
820.11440.14180.10566516617.54114491362.44282119.2835
830.12210.04830.1004707000.12694147329.5052036.4993
840.1324-0.02440.0941164028.97823815387.79441953.3018

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0832 & 0.0637 & 0 & 964790.5474 & 0 & 0 \tabularnewline
74 & 0.0825 & 0.1426 & 0.1032 & 5774012.1742 & 3369401.3608 & 1835.5929 \tabularnewline
75 & 0.0752 & 0.1071 & 0.1045 & 4508066.7084 & 3748956.4767 & 1936.2222 \tabularnewline
76 & 0.0843 & -0.1103 & 0.1059 & 4302531.7017 & 3887350.2829 & 1971.6364 \tabularnewline
77 & 0.0926 & 0.2208 & 0.1289 & 15926185.7969 & 6295117.3857 & 2509.0073 \tabularnewline
78 & 0.082 & -0.0226 & 0.1112 & 233508.0997 & 5284849.1714 & 2298.88 \tabularnewline
79 & 0.1133 & 0.1249 & 0.1132 & 4105210.5318 & 5116329.3657 & 2261.9305 \tabularnewline
80 & 0.107 & 0.0627 & 0.1068 & 1259484.1985 & 4634223.7198 & 2152.7247 \tabularnewline
81 & 0.1034 & 0.0598 & 0.1016 & 1323217.1278 & 4266334.0985 & 2065.5106 \tabularnewline
82 & 0.1144 & 0.1418 & 0.1056 & 6516617.5411 & 4491362.4428 & 2119.2835 \tabularnewline
83 & 0.1221 & 0.0483 & 0.1004 & 707000.1269 & 4147329.505 & 2036.4993 \tabularnewline
84 & 0.1324 & -0.0244 & 0.0941 & 164028.9782 & 3815387.7944 & 1953.3018 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110626&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]73[/C][C]0.0832[/C][C]0.0637[/C][C]0[/C][C]964790.5474[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0825[/C][C]0.1426[/C][C]0.1032[/C][C]5774012.1742[/C][C]3369401.3608[/C][C]1835.5929[/C][/ROW]
[ROW][C]75[/C][C]0.0752[/C][C]0.1071[/C][C]0.1045[/C][C]4508066.7084[/C][C]3748956.4767[/C][C]1936.2222[/C][/ROW]
[ROW][C]76[/C][C]0.0843[/C][C]-0.1103[/C][C]0.1059[/C][C]4302531.7017[/C][C]3887350.2829[/C][C]1971.6364[/C][/ROW]
[ROW][C]77[/C][C]0.0926[/C][C]0.2208[/C][C]0.1289[/C][C]15926185.7969[/C][C]6295117.3857[/C][C]2509.0073[/C][/ROW]
[ROW][C]78[/C][C]0.082[/C][C]-0.0226[/C][C]0.1112[/C][C]233508.0997[/C][C]5284849.1714[/C][C]2298.88[/C][/ROW]
[ROW][C]79[/C][C]0.1133[/C][C]0.1249[/C][C]0.1132[/C][C]4105210.5318[/C][C]5116329.3657[/C][C]2261.9305[/C][/ROW]
[ROW][C]80[/C][C]0.107[/C][C]0.0627[/C][C]0.1068[/C][C]1259484.1985[/C][C]4634223.7198[/C][C]2152.7247[/C][/ROW]
[ROW][C]81[/C][C]0.1034[/C][C]0.0598[/C][C]0.1016[/C][C]1323217.1278[/C][C]4266334.0985[/C][C]2065.5106[/C][/ROW]
[ROW][C]82[/C][C]0.1144[/C][C]0.1418[/C][C]0.1056[/C][C]6516617.5411[/C][C]4491362.4428[/C][C]2119.2835[/C][/ROW]
[ROW][C]83[/C][C]0.1221[/C][C]0.0483[/C][C]0.1004[/C][C]707000.1269[/C][C]4147329.505[/C][C]2036.4993[/C][/ROW]
[ROW][C]84[/C][C]0.1324[/C][C]-0.0244[/C][C]0.0941[/C][C]164028.9782[/C][C]3815387.7944[/C][C]1953.3018[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110626&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110626&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
730.08320.06370964790.547400
740.08250.14260.10325774012.17423369401.36081835.5929
750.07520.10710.10454508066.70843748956.47671936.2222
760.0843-0.11030.10594302531.70173887350.28291971.6364
770.09260.22080.128915926185.79696295117.38572509.0073
780.082-0.02260.1112233508.09975284849.17142298.88
790.11330.12490.11324105210.53185116329.36572261.9305
800.1070.06270.10681259484.19854634223.71982152.7247
810.10340.05980.10161323217.12784266334.09852065.5106
820.11440.14180.10566516617.54114491362.44282119.2835
830.12210.04830.1004707000.12694147329.5052036.4993
840.1324-0.02440.0941164028.97823815387.79441953.3018



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