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, 17 Dec 2012 05:37:40 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/17/t1355740708i5710fif6ytyf84.htm/, Retrieved Thu, 18 Apr 2024 21:41:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=200755, Retrieved Thu, 18 Apr 2024 21:41:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact65
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]
- R P             [ARIMA Forecasting] [WS 9: ARIMA fore...] [2012-12-02 17:43:38] [5971e03025aa6333f85f7b726952428d]
- R P               [ARIMA Forecasting] [WS 9 ARIMA foreca...] [2012-12-04 19:25:04] [5423d5951ef739cb88e60f5b30c308a9]
- R PD                  [ARIMA Forecasting] [paper: arima fore...] [2012-12-17 10:37:40] [292b44c97cfd231f70174a072f53fc18] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.894
1.757
3.582
5.321
5.561
5.907
4.944
4.966
3.258
1.964
1.743
1.262
2.086
1.793
3.548
5.672
6.084
4.914
4.990
5.139
3.218
2.179
2.238
1.442
2.205
2.025
3.531
4.977
7.998
4.880
5.231
5.202
3.303
2.683
2.202
1.376
2.422
1.997
3.163
5.964
5.657
6.415
6.208
4.500
2.939
2.702
2.090
1.504
2.549
1.931
3.013
6.204
5.788
5.611
5.594
4.647
3.490
2.487
1.992
1.507
2.306
2.002
3.075
5.331
5.589
5.813
4.876
4.665
3.601
2.192
2.111
1.580
2.288
1.993
3.228
5.000
5.480
5.770
4.962
4.685
3.607
2.222
2.467
1.594
2.228
1.910
3.157
4.809
6.249
4.607
4.975
4.784
3.028
2.461
2.218
1.351
2.070
1.887
3.024
4.596
6.398
4.459
5.382
4.359
2.687
2.249
2.154
1.169
2.429
1.762
2.846
5.627
5.749
4.502
5.720
4.403
2.867
2.635
2.059
1.511
2.359
1.741
2.917
6.249
5.760
6.250
5.134
4.831
3.695
2.462
2.146
1.579




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 7 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200755&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200755&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200755&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 time7 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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[120])
1081.169-------
1092.429-------
1101.762-------
1112.846-------
1125.627-------
1135.749-------
1144.502-------
1155.72-------
1164.403-------
1172.867-------
1182.635-------
1192.059-------
1201.511-------
1212.3592.26461.52483.00440.40120.97710.33160.9771
1221.7411.81861.03282.60450.42320.08890.55620.7785
1232.9173.06932.28343.85510.35210.99950.71120.9999
1246.2495.48124.68146.28110.0310.36051
1255.765.84895.04916.64870.41380.16340.59671
1266.254.99324.19285.79360.0010.03020.88551
1275.1345.44154.63926.24370.22630.02410.24811
1284.8314.59393.79115.39680.28140.09370.67941
1293.6953.09222.28873.89570.070700.70860.9999
1302.4622.48951.68523.29380.47330.00170.36140.9914
1312.1462.09541.29062.90030.4510.1860.53540.9227
1321.5791.48770.68242.29310.41210.05460.47740.4774

\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[120]) \tabularnewline
108 & 1.169 & - & - & - & - & - & - & - \tabularnewline
109 & 2.429 & - & - & - & - & - & - & - \tabularnewline
110 & 1.762 & - & - & - & - & - & - & - \tabularnewline
111 & 2.846 & - & - & - & - & - & - & - \tabularnewline
112 & 5.627 & - & - & - & - & - & - & - \tabularnewline
113 & 5.749 & - & - & - & - & - & - & - \tabularnewline
114 & 4.502 & - & - & - & - & - & - & - \tabularnewline
115 & 5.72 & - & - & - & - & - & - & - \tabularnewline
116 & 4.403 & - & - & - & - & - & - & - \tabularnewline
117 & 2.867 & - & - & - & - & - & - & - \tabularnewline
118 & 2.635 & - & - & - & - & - & - & - \tabularnewline
119 & 2.059 & - & - & - & - & - & - & - \tabularnewline
120 & 1.511 & - & - & - & - & - & - & - \tabularnewline
121 & 2.359 & 2.2646 & 1.5248 & 3.0044 & 0.4012 & 0.9771 & 0.3316 & 0.9771 \tabularnewline
122 & 1.741 & 1.8186 & 1.0328 & 2.6045 & 0.4232 & 0.0889 & 0.5562 & 0.7785 \tabularnewline
123 & 2.917 & 3.0693 & 2.2834 & 3.8551 & 0.3521 & 0.9995 & 0.7112 & 0.9999 \tabularnewline
124 & 6.249 & 5.4812 & 4.6814 & 6.2811 & 0.03 & 1 & 0.3605 & 1 \tabularnewline
125 & 5.76 & 5.8489 & 5.0491 & 6.6487 & 0.4138 & 0.1634 & 0.5967 & 1 \tabularnewline
126 & 6.25 & 4.9932 & 4.1928 & 5.7936 & 0.001 & 0.0302 & 0.8855 & 1 \tabularnewline
127 & 5.134 & 5.4415 & 4.6392 & 6.2437 & 0.2263 & 0.0241 & 0.2481 & 1 \tabularnewline
128 & 4.831 & 4.5939 & 3.7911 & 5.3968 & 0.2814 & 0.0937 & 0.6794 & 1 \tabularnewline
129 & 3.695 & 3.0922 & 2.2887 & 3.8957 & 0.0707 & 0 & 0.7086 & 0.9999 \tabularnewline
130 & 2.462 & 2.4895 & 1.6852 & 3.2938 & 0.4733 & 0.0017 & 0.3614 & 0.9914 \tabularnewline
131 & 2.146 & 2.0954 & 1.2906 & 2.9003 & 0.451 & 0.186 & 0.5354 & 0.9227 \tabularnewline
132 & 1.579 & 1.4877 & 0.6824 & 2.2931 & 0.4121 & 0.0546 & 0.4774 & 0.4774 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200755&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[120])[/C][/ROW]
[ROW][C]108[/C][C]1.169[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]2.429[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]1.762[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]2.846[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]5.627[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]5.749[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]4.502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]5.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]4.403[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]2.867[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]2.635[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]2.059[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]1.511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]2.359[/C][C]2.2646[/C][C]1.5248[/C][C]3.0044[/C][C]0.4012[/C][C]0.9771[/C][C]0.3316[/C][C]0.9771[/C][/ROW]
[ROW][C]122[/C][C]1.741[/C][C]1.8186[/C][C]1.0328[/C][C]2.6045[/C][C]0.4232[/C][C]0.0889[/C][C]0.5562[/C][C]0.7785[/C][/ROW]
[ROW][C]123[/C][C]2.917[/C][C]3.0693[/C][C]2.2834[/C][C]3.8551[/C][C]0.3521[/C][C]0.9995[/C][C]0.7112[/C][C]0.9999[/C][/ROW]
[ROW][C]124[/C][C]6.249[/C][C]5.4812[/C][C]4.6814[/C][C]6.2811[/C][C]0.03[/C][C]1[/C][C]0.3605[/C][C]1[/C][/ROW]
[ROW][C]125[/C][C]5.76[/C][C]5.8489[/C][C]5.0491[/C][C]6.6487[/C][C]0.4138[/C][C]0.1634[/C][C]0.5967[/C][C]1[/C][/ROW]
[ROW][C]126[/C][C]6.25[/C][C]4.9932[/C][C]4.1928[/C][C]5.7936[/C][C]0.001[/C][C]0.0302[/C][C]0.8855[/C][C]1[/C][/ROW]
[ROW][C]127[/C][C]5.134[/C][C]5.4415[/C][C]4.6392[/C][C]6.2437[/C][C]0.2263[/C][C]0.0241[/C][C]0.2481[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]4.831[/C][C]4.5939[/C][C]3.7911[/C][C]5.3968[/C][C]0.2814[/C][C]0.0937[/C][C]0.6794[/C][C]1[/C][/ROW]
[ROW][C]129[/C][C]3.695[/C][C]3.0922[/C][C]2.2887[/C][C]3.8957[/C][C]0.0707[/C][C]0[/C][C]0.7086[/C][C]0.9999[/C][/ROW]
[ROW][C]130[/C][C]2.462[/C][C]2.4895[/C][C]1.6852[/C][C]3.2938[/C][C]0.4733[/C][C]0.0017[/C][C]0.3614[/C][C]0.9914[/C][/ROW]
[ROW][C]131[/C][C]2.146[/C][C]2.0954[/C][C]1.2906[/C][C]2.9003[/C][C]0.451[/C][C]0.186[/C][C]0.5354[/C][C]0.9227[/C][/ROW]
[ROW][C]132[/C][C]1.579[/C][C]1.4877[/C][C]0.6824[/C][C]2.2931[/C][C]0.4121[/C][C]0.0546[/C][C]0.4774[/C][C]0.4774[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200755&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200755&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[120])
1081.169-------
1092.429-------
1101.762-------
1112.846-------
1125.627-------
1135.749-------
1144.502-------
1155.72-------
1164.403-------
1172.867-------
1182.635-------
1192.059-------
1201.511-------
1212.3592.26461.52483.00440.40120.97710.33160.9771
1221.7411.81861.03282.60450.42320.08890.55620.7785
1232.9173.06932.28343.85510.35210.99950.71120.9999
1246.2495.48124.68146.28110.0310.36051
1255.765.84895.04916.64870.41380.16340.59671
1266.254.99324.19285.79360.0010.03020.88551
1275.1345.44154.63926.24370.22630.02410.24811
1284.8314.59393.79115.39680.28140.09370.67941
1293.6953.09222.28873.89570.070700.70860.9999
1302.4622.48951.68523.29380.47330.00170.36140.9914
1312.1462.09541.29062.90030.4510.1860.53540.9227
1321.5791.48770.68242.29310.41210.05460.47740.4774







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.16670.041700.008900
1220.2205-0.04270.04220.0060.00750.0864
1230.1306-0.04960.04470.02320.01270.1127
1240.07440.14010.06850.58940.15690.3961
1250.0698-0.01520.05790.00790.12710.3565
1260.08180.25170.09021.57960.36920.6076
1270.0752-0.05650.08540.09450.32990.5744
1280.08920.05160.08110.05620.29570.5438
1290.13260.19490.09380.36340.30320.5507
1300.1648-0.0110.08558e-040.2730.5225
1310.1960.02410.07990.00260.24840.4984
1320.27620.06140.07840.00830.22840.4779

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
121 & 0.1667 & 0.0417 & 0 & 0.0089 & 0 & 0 \tabularnewline
122 & 0.2205 & -0.0427 & 0.0422 & 0.006 & 0.0075 & 0.0864 \tabularnewline
123 & 0.1306 & -0.0496 & 0.0447 & 0.0232 & 0.0127 & 0.1127 \tabularnewline
124 & 0.0744 & 0.1401 & 0.0685 & 0.5894 & 0.1569 & 0.3961 \tabularnewline
125 & 0.0698 & -0.0152 & 0.0579 & 0.0079 & 0.1271 & 0.3565 \tabularnewline
126 & 0.0818 & 0.2517 & 0.0902 & 1.5796 & 0.3692 & 0.6076 \tabularnewline
127 & 0.0752 & -0.0565 & 0.0854 & 0.0945 & 0.3299 & 0.5744 \tabularnewline
128 & 0.0892 & 0.0516 & 0.0811 & 0.0562 & 0.2957 & 0.5438 \tabularnewline
129 & 0.1326 & 0.1949 & 0.0938 & 0.3634 & 0.3032 & 0.5507 \tabularnewline
130 & 0.1648 & -0.011 & 0.0855 & 8e-04 & 0.273 & 0.5225 \tabularnewline
131 & 0.196 & 0.0241 & 0.0799 & 0.0026 & 0.2484 & 0.4984 \tabularnewline
132 & 0.2762 & 0.0614 & 0.0784 & 0.0083 & 0.2284 & 0.4779 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200755&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]121[/C][C]0.1667[/C][C]0.0417[/C][C]0[/C][C]0.0089[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]122[/C][C]0.2205[/C][C]-0.0427[/C][C]0.0422[/C][C]0.006[/C][C]0.0075[/C][C]0.0864[/C][/ROW]
[ROW][C]123[/C][C]0.1306[/C][C]-0.0496[/C][C]0.0447[/C][C]0.0232[/C][C]0.0127[/C][C]0.1127[/C][/ROW]
[ROW][C]124[/C][C]0.0744[/C][C]0.1401[/C][C]0.0685[/C][C]0.5894[/C][C]0.1569[/C][C]0.3961[/C][/ROW]
[ROW][C]125[/C][C]0.0698[/C][C]-0.0152[/C][C]0.0579[/C][C]0.0079[/C][C]0.1271[/C][C]0.3565[/C][/ROW]
[ROW][C]126[/C][C]0.0818[/C][C]0.2517[/C][C]0.0902[/C][C]1.5796[/C][C]0.3692[/C][C]0.6076[/C][/ROW]
[ROW][C]127[/C][C]0.0752[/C][C]-0.0565[/C][C]0.0854[/C][C]0.0945[/C][C]0.3299[/C][C]0.5744[/C][/ROW]
[ROW][C]128[/C][C]0.0892[/C][C]0.0516[/C][C]0.0811[/C][C]0.0562[/C][C]0.2957[/C][C]0.5438[/C][/ROW]
[ROW][C]129[/C][C]0.1326[/C][C]0.1949[/C][C]0.0938[/C][C]0.3634[/C][C]0.3032[/C][C]0.5507[/C][/ROW]
[ROW][C]130[/C][C]0.1648[/C][C]-0.011[/C][C]0.0855[/C][C]8e-04[/C][C]0.273[/C][C]0.5225[/C][/ROW]
[ROW][C]131[/C][C]0.196[/C][C]0.0241[/C][C]0.0799[/C][C]0.0026[/C][C]0.2484[/C][C]0.4984[/C][/ROW]
[ROW][C]132[/C][C]0.2762[/C][C]0.0614[/C][C]0.0784[/C][C]0.0083[/C][C]0.2284[/C][C]0.4779[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200755&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200755&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
1210.16670.041700.008900
1220.2205-0.04270.04220.0060.00750.0864
1230.1306-0.04960.04470.02320.01270.1127
1240.07440.14010.06850.58940.15690.3961
1250.0698-0.01520.05790.00790.12710.3565
1260.08180.25170.09021.57960.36920.6076
1270.0752-0.05650.08540.09450.32990.5744
1280.08920.05160.08110.05620.29570.5438
1290.13260.19490.09380.36340.30320.5507
1300.1648-0.0110.08558e-040.2730.5225
1310.1960.02410.07990.00260.24840.4984
1320.27620.06140.07840.00830.22840.4779



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