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, 08 Dec 2010 15:46:25 +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/08/t1291823136aqlpuzh2292m6gh.htm/, Retrieved Sun, 28 Apr 2024 22:23:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106966, Retrieved Sun, 28 Apr 2024 22:23:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact165
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       [Standard Deviation-Mean Plot] [Identifying Integ...] [2009-11-22 12:50:05] [b98453cac15ba1066b407e146608df68]
-    D        [Standard Deviation-Mean Plot] [standard deviatio...] [2009-11-24 21:20:13] [8b1aef4e7013bd33fbc2a5833375c5f5]
- R  D          [Standard Deviation-Mean Plot] [paper Fase 2: SDMP 2] [2010-12-07 16:54:09] [814f53995537cd15c528d8efbf1cf544]
- RMP               [ARIMA Forecasting] [Paper ARIMA Forecast] [2010-12-08 15:46:25] [da925928e5a77063c5ecc7b801d712e1] [Current]
Feedback Forum

Post a new message
Dataseries X:
194.9
195.5
196
196.2
196.2
196.2
196.2
197
197.7
198
198.2
198.5
198.6
199.5
200
201.3
202.2
202.9
203.5
203.5
204
204.1
204.3
204.5
204.8
205.1
205.7
206.5
206.9
207.1
207.8
208
208.5
208.6
209
209.1
209.7
209.8
209.9
210
210.8
211.4
211.7
212
212.2
212.4
212.9
213.4
213.7
214
214.3
214.8
215
215.9
216.4
216.9
217.2
217.5
217.9
218.1
218.6
218.9
219.3
220.4
220.9
221
221.8
222
222.2
222.5
222.9
223.1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106966&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106966&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106966&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'George Udny Yule' @ 72.249.76.132







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[60])
48213.4-------
49213.7-------
50214-------
51214.3-------
52214.8-------
53215-------
54215.9-------
55216.4-------
56216.9-------
57217.2-------
58217.5-------
59217.9-------
60218.1-------
61218.6218.4914217.8405219.14220.37180.880710.8807
62218.9218.7305217.81219.65090.3590.609410.9103
63219.3219.0691217.9417220.19640.3440.615610.954
64220.4219.5467218.245220.84850.09940.644910.9853
65220.9219.9958218.5404221.45120.11170.293110.9947
66221220.5723218.978222.16650.29950.343510.9988
67221.8221.0777219.3557222.79970.20550.535210.9996
68222221.4173219.5764223.25820.26750.341810.9998
69222.2221.7532219.8006223.70570.32690.402210.9999
70222.5221.9564219.8982224.01460.30230.408310.9999
71222.9222.3868220.2282224.54550.32060.459111
72223.1222.645220.3904224.89970.34620.412311

\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[60]) \tabularnewline
48 & 213.4 & - & - & - & - & - & - & - \tabularnewline
49 & 213.7 & - & - & - & - & - & - & - \tabularnewline
50 & 214 & - & - & - & - & - & - & - \tabularnewline
51 & 214.3 & - & - & - & - & - & - & - \tabularnewline
52 & 214.8 & - & - & - & - & - & - & - \tabularnewline
53 & 215 & - & - & - & - & - & - & - \tabularnewline
54 & 215.9 & - & - & - & - & - & - & - \tabularnewline
55 & 216.4 & - & - & - & - & - & - & - \tabularnewline
56 & 216.9 & - & - & - & - & - & - & - \tabularnewline
57 & 217.2 & - & - & - & - & - & - & - \tabularnewline
58 & 217.5 & - & - & - & - & - & - & - \tabularnewline
59 & 217.9 & - & - & - & - & - & - & - \tabularnewline
60 & 218.1 & - & - & - & - & - & - & - \tabularnewline
61 & 218.6 & 218.4914 & 217.8405 & 219.1422 & 0.3718 & 0.8807 & 1 & 0.8807 \tabularnewline
62 & 218.9 & 218.7305 & 217.81 & 219.6509 & 0.359 & 0.6094 & 1 & 0.9103 \tabularnewline
63 & 219.3 & 219.0691 & 217.9417 & 220.1964 & 0.344 & 0.6156 & 1 & 0.954 \tabularnewline
64 & 220.4 & 219.5467 & 218.245 & 220.8485 & 0.0994 & 0.6449 & 1 & 0.9853 \tabularnewline
65 & 220.9 & 219.9958 & 218.5404 & 221.4512 & 0.1117 & 0.2931 & 1 & 0.9947 \tabularnewline
66 & 221 & 220.5723 & 218.978 & 222.1665 & 0.2995 & 0.3435 & 1 & 0.9988 \tabularnewline
67 & 221.8 & 221.0777 & 219.3557 & 222.7997 & 0.2055 & 0.5352 & 1 & 0.9996 \tabularnewline
68 & 222 & 221.4173 & 219.5764 & 223.2582 & 0.2675 & 0.3418 & 1 & 0.9998 \tabularnewline
69 & 222.2 & 221.7532 & 219.8006 & 223.7057 & 0.3269 & 0.4022 & 1 & 0.9999 \tabularnewline
70 & 222.5 & 221.9564 & 219.8982 & 224.0146 & 0.3023 & 0.4083 & 1 & 0.9999 \tabularnewline
71 & 222.9 & 222.3868 & 220.2282 & 224.5455 & 0.3206 & 0.4591 & 1 & 1 \tabularnewline
72 & 223.1 & 222.645 & 220.3904 & 224.8997 & 0.3462 & 0.4123 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106966&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[60])[/C][/ROW]
[ROW][C]48[/C][C]213.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]213.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]214.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]214.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]215[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]215.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]216.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]216.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]217.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]217.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]217.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]218.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]218.6[/C][C]218.4914[/C][C]217.8405[/C][C]219.1422[/C][C]0.3718[/C][C]0.8807[/C][C]1[/C][C]0.8807[/C][/ROW]
[ROW][C]62[/C][C]218.9[/C][C]218.7305[/C][C]217.81[/C][C]219.6509[/C][C]0.359[/C][C]0.6094[/C][C]1[/C][C]0.9103[/C][/ROW]
[ROW][C]63[/C][C]219.3[/C][C]219.0691[/C][C]217.9417[/C][C]220.1964[/C][C]0.344[/C][C]0.6156[/C][C]1[/C][C]0.954[/C][/ROW]
[ROW][C]64[/C][C]220.4[/C][C]219.5467[/C][C]218.245[/C][C]220.8485[/C][C]0.0994[/C][C]0.6449[/C][C]1[/C][C]0.9853[/C][/ROW]
[ROW][C]65[/C][C]220.9[/C][C]219.9958[/C][C]218.5404[/C][C]221.4512[/C][C]0.1117[/C][C]0.2931[/C][C]1[/C][C]0.9947[/C][/ROW]
[ROW][C]66[/C][C]221[/C][C]220.5723[/C][C]218.978[/C][C]222.1665[/C][C]0.2995[/C][C]0.3435[/C][C]1[/C][C]0.9988[/C][/ROW]
[ROW][C]67[/C][C]221.8[/C][C]221.0777[/C][C]219.3557[/C][C]222.7997[/C][C]0.2055[/C][C]0.5352[/C][C]1[/C][C]0.9996[/C][/ROW]
[ROW][C]68[/C][C]222[/C][C]221.4173[/C][C]219.5764[/C][C]223.2582[/C][C]0.2675[/C][C]0.3418[/C][C]1[/C][C]0.9998[/C][/ROW]
[ROW][C]69[/C][C]222.2[/C][C]221.7532[/C][C]219.8006[/C][C]223.7057[/C][C]0.3269[/C][C]0.4022[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]70[/C][C]222.5[/C][C]221.9564[/C][C]219.8982[/C][C]224.0146[/C][C]0.3023[/C][C]0.4083[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]71[/C][C]222.9[/C][C]222.3868[/C][C]220.2282[/C][C]224.5455[/C][C]0.3206[/C][C]0.4591[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]72[/C][C]223.1[/C][C]222.645[/C][C]220.3904[/C][C]224.8997[/C][C]0.3462[/C][C]0.4123[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106966&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106966&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[60])
48213.4-------
49213.7-------
50214-------
51214.3-------
52214.8-------
53215-------
54215.9-------
55216.4-------
56216.9-------
57217.2-------
58217.5-------
59217.9-------
60218.1-------
61218.6218.4914217.8405219.14220.37180.880710.8807
62218.9218.7305217.81219.65090.3590.609410.9103
63219.3219.0691217.9417220.19640.3440.615610.954
64220.4219.5467218.245220.84850.09940.644910.9853
65220.9219.9958218.5404221.45120.11170.293110.9947
66221220.5723218.978222.16650.29950.343510.9988
67221.8221.0777219.3557222.79970.20550.535210.9996
68222221.4173219.5764223.25820.26750.341810.9998
69222.2221.7532219.8006223.70570.32690.402210.9999
70222.5221.9564219.8982224.01460.30230.408310.9999
71222.9222.3868220.2282224.54550.32060.459111
72223.1222.645220.3904224.89970.34620.412311







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.00155e-0400.011800
620.00218e-046e-040.02870.02030.1424
630.00260.00118e-040.05330.03130.1769
640.0030.00390.00160.7280.20550.4533
650.00340.00410.00210.81760.32790.5726
660.00370.00190.0020.1830.30370.5511
670.0040.00330.00220.52170.33490.5787
680.00420.00260.00230.33960.33550.5792
690.00450.0020.00220.19970.32040.566
700.00470.00240.00230.29550.31790.5638
710.0050.00230.00230.26330.31290.5594
720.00520.0020.00220.2070.30410.5515

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0015 & 5e-04 & 0 & 0.0118 & 0 & 0 \tabularnewline
62 & 0.0021 & 8e-04 & 6e-04 & 0.0287 & 0.0203 & 0.1424 \tabularnewline
63 & 0.0026 & 0.0011 & 8e-04 & 0.0533 & 0.0313 & 0.1769 \tabularnewline
64 & 0.003 & 0.0039 & 0.0016 & 0.728 & 0.2055 & 0.4533 \tabularnewline
65 & 0.0034 & 0.0041 & 0.0021 & 0.8176 & 0.3279 & 0.5726 \tabularnewline
66 & 0.0037 & 0.0019 & 0.002 & 0.183 & 0.3037 & 0.5511 \tabularnewline
67 & 0.004 & 0.0033 & 0.0022 & 0.5217 & 0.3349 & 0.5787 \tabularnewline
68 & 0.0042 & 0.0026 & 0.0023 & 0.3396 & 0.3355 & 0.5792 \tabularnewline
69 & 0.0045 & 0.002 & 0.0022 & 0.1997 & 0.3204 & 0.566 \tabularnewline
70 & 0.0047 & 0.0024 & 0.0023 & 0.2955 & 0.3179 & 0.5638 \tabularnewline
71 & 0.005 & 0.0023 & 0.0023 & 0.2633 & 0.3129 & 0.5594 \tabularnewline
72 & 0.0052 & 0.002 & 0.0022 & 0.207 & 0.3041 & 0.5515 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106966&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]61[/C][C]0.0015[/C][C]5e-04[/C][C]0[/C][C]0.0118[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0021[/C][C]8e-04[/C][C]6e-04[/C][C]0.0287[/C][C]0.0203[/C][C]0.1424[/C][/ROW]
[ROW][C]63[/C][C]0.0026[/C][C]0.0011[/C][C]8e-04[/C][C]0.0533[/C][C]0.0313[/C][C]0.1769[/C][/ROW]
[ROW][C]64[/C][C]0.003[/C][C]0.0039[/C][C]0.0016[/C][C]0.728[/C][C]0.2055[/C][C]0.4533[/C][/ROW]
[ROW][C]65[/C][C]0.0034[/C][C]0.0041[/C][C]0.0021[/C][C]0.8176[/C][C]0.3279[/C][C]0.5726[/C][/ROW]
[ROW][C]66[/C][C]0.0037[/C][C]0.0019[/C][C]0.002[/C][C]0.183[/C][C]0.3037[/C][C]0.5511[/C][/ROW]
[ROW][C]67[/C][C]0.004[/C][C]0.0033[/C][C]0.0022[/C][C]0.5217[/C][C]0.3349[/C][C]0.5787[/C][/ROW]
[ROW][C]68[/C][C]0.0042[/C][C]0.0026[/C][C]0.0023[/C][C]0.3396[/C][C]0.3355[/C][C]0.5792[/C][/ROW]
[ROW][C]69[/C][C]0.0045[/C][C]0.002[/C][C]0.0022[/C][C]0.1997[/C][C]0.3204[/C][C]0.566[/C][/ROW]
[ROW][C]70[/C][C]0.0047[/C][C]0.0024[/C][C]0.0023[/C][C]0.2955[/C][C]0.3179[/C][C]0.5638[/C][/ROW]
[ROW][C]71[/C][C]0.005[/C][C]0.0023[/C][C]0.0023[/C][C]0.2633[/C][C]0.3129[/C][C]0.5594[/C][/ROW]
[ROW][C]72[/C][C]0.0052[/C][C]0.002[/C][C]0.0022[/C][C]0.207[/C][C]0.3041[/C][C]0.5515[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106966&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106966&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
610.00155e-0400.011800
620.00218e-046e-040.02870.02030.1424
630.00260.00118e-040.05330.03130.1769
640.0030.00390.00160.7280.20550.4533
650.00340.00410.00210.81760.32790.5726
660.00370.00190.0020.1830.30370.5511
670.0040.00330.00220.52170.33490.5787
680.00420.00260.00230.33960.33550.5792
690.00450.0020.00220.19970.32040.566
700.00470.00240.00230.29550.31790.5638
710.0050.00230.00230.26330.31290.5594
720.00520.0020.00220.2070.30410.5515



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