Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 16 Dec 2007 07:32:19 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/16/t1197814597ia4j5qyo6gfdfps.htm/, Retrieved Thu, 02 May 2024 08:32:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4187, Retrieved Thu, 02 May 2024 08:32:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact186
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-16 14:32:19] [2cdb7403ed3391afb545b8c0d20da37e] [Current]
Feedback Forum

Post a new message
Dataseries X:
115.9
112.9
126.3
116.8
112
129.7
113.6
115.7
119.5
125.8
129.6
128
112.8
101.6
123.9
118.8
109.1
130.6
112.4
111
116.2
119.8
117.2
127.3
107.7
97.5
120.1
110.6
111.3
119.8
105.5
108.7
128.7
119.5
121.1
128.4
108.8
107.5
125.6
102.9
107.5
120.4
104.3
100.6
121.9
112.7
124.9
123.9
102.2
104.9
109.8
98.9
107.3
112.6
104
110.6
100.8
103.8
117
108.4
95.5
96.9
103.9
101.1
100.6
104.3
98
99.5
97.4
105.6
117.5
107.4
97.8
91.5
107.7
100.1
96.6
106.8
98
98.6




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4187&T=0

[TABLE]
[ROW][C]Summary of compuational 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]3 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=4187&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4187&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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[68])
56110.6-------
57100.8-------
58103.8-------
59117-------
60108.4-------
6195.5-------
6296.9-------
63103.9-------
64101.1-------
65100.6-------
66104.3-------
6798-------
6899.5-------
6997.4106.435797.0765115.55380.02610.9320.88710.932
70105.6105.446496.0125114.63320.48690.9570.63730.8977
71117.5108.689299.1406117.99220.03170.74240.040.9736
72107.4110.896799.5912121.8660.2660.1190.67220.9791
7397.895.726983.7537107.26550.36240.02370.51540.2608
7491.593.910281.5497105.79920.34560.26070.3110.1784
75107.7110.160297.6262122.27920.34540.99870.84430.9577
76100.195.431682.1372108.19030.23660.02970.19190.266
7796.696.404282.8563109.40150.48820.28870.26350.3203
78106.8106.955693.4219119.99250.49070.94030.65510.8688
799894.433380.1614108.08290.30430.03790.30430.2334
8098.691.283776.5925105.29410.1530.17370.12520.1252

\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[68]) \tabularnewline
56 & 110.6 & - & - & - & - & - & - & - \tabularnewline
57 & 100.8 & - & - & - & - & - & - & - \tabularnewline
58 & 103.8 & - & - & - & - & - & - & - \tabularnewline
59 & 117 & - & - & - & - & - & - & - \tabularnewline
60 & 108.4 & - & - & - & - & - & - & - \tabularnewline
61 & 95.5 & - & - & - & - & - & - & - \tabularnewline
62 & 96.9 & - & - & - & - & - & - & - \tabularnewline
63 & 103.9 & - & - & - & - & - & - & - \tabularnewline
64 & 101.1 & - & - & - & - & - & - & - \tabularnewline
65 & 100.6 & - & - & - & - & - & - & - \tabularnewline
66 & 104.3 & - & - & - & - & - & - & - \tabularnewline
67 & 98 & - & - & - & - & - & - & - \tabularnewline
68 & 99.5 & - & - & - & - & - & - & - \tabularnewline
69 & 97.4 & 106.4357 & 97.0765 & 115.5538 & 0.0261 & 0.932 & 0.8871 & 0.932 \tabularnewline
70 & 105.6 & 105.4464 & 96.0125 & 114.6332 & 0.4869 & 0.957 & 0.6373 & 0.8977 \tabularnewline
71 & 117.5 & 108.6892 & 99.1406 & 117.9922 & 0.0317 & 0.7424 & 0.04 & 0.9736 \tabularnewline
72 & 107.4 & 110.8967 & 99.5912 & 121.866 & 0.266 & 0.119 & 0.6722 & 0.9791 \tabularnewline
73 & 97.8 & 95.7269 & 83.7537 & 107.2655 & 0.3624 & 0.0237 & 0.5154 & 0.2608 \tabularnewline
74 & 91.5 & 93.9102 & 81.5497 & 105.7992 & 0.3456 & 0.2607 & 0.311 & 0.1784 \tabularnewline
75 & 107.7 & 110.1602 & 97.6262 & 122.2792 & 0.3454 & 0.9987 & 0.8443 & 0.9577 \tabularnewline
76 & 100.1 & 95.4316 & 82.1372 & 108.1903 & 0.2366 & 0.0297 & 0.1919 & 0.266 \tabularnewline
77 & 96.6 & 96.4042 & 82.8563 & 109.4015 & 0.4882 & 0.2887 & 0.2635 & 0.3203 \tabularnewline
78 & 106.8 & 106.9556 & 93.4219 & 119.9925 & 0.4907 & 0.9403 & 0.6551 & 0.8688 \tabularnewline
79 & 98 & 94.4333 & 80.1614 & 108.0829 & 0.3043 & 0.0379 & 0.3043 & 0.2334 \tabularnewline
80 & 98.6 & 91.2837 & 76.5925 & 105.2941 & 0.153 & 0.1737 & 0.1252 & 0.1252 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4187&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[68])[/C][/ROW]
[ROW][C]56[/C][C]110.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]103.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]96.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]103.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]100.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]99.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]97.4[/C][C]106.4357[/C][C]97.0765[/C][C]115.5538[/C][C]0.0261[/C][C]0.932[/C][C]0.8871[/C][C]0.932[/C][/ROW]
[ROW][C]70[/C][C]105.6[/C][C]105.4464[/C][C]96.0125[/C][C]114.6332[/C][C]0.4869[/C][C]0.957[/C][C]0.6373[/C][C]0.8977[/C][/ROW]
[ROW][C]71[/C][C]117.5[/C][C]108.6892[/C][C]99.1406[/C][C]117.9922[/C][C]0.0317[/C][C]0.7424[/C][C]0.04[/C][C]0.9736[/C][/ROW]
[ROW][C]72[/C][C]107.4[/C][C]110.8967[/C][C]99.5912[/C][C]121.866[/C][C]0.266[/C][C]0.119[/C][C]0.6722[/C][C]0.9791[/C][/ROW]
[ROW][C]73[/C][C]97.8[/C][C]95.7269[/C][C]83.7537[/C][C]107.2655[/C][C]0.3624[/C][C]0.0237[/C][C]0.5154[/C][C]0.2608[/C][/ROW]
[ROW][C]74[/C][C]91.5[/C][C]93.9102[/C][C]81.5497[/C][C]105.7992[/C][C]0.3456[/C][C]0.2607[/C][C]0.311[/C][C]0.1784[/C][/ROW]
[ROW][C]75[/C][C]107.7[/C][C]110.1602[/C][C]97.6262[/C][C]122.2792[/C][C]0.3454[/C][C]0.9987[/C][C]0.8443[/C][C]0.9577[/C][/ROW]
[ROW][C]76[/C][C]100.1[/C][C]95.4316[/C][C]82.1372[/C][C]108.1903[/C][C]0.2366[/C][C]0.0297[/C][C]0.1919[/C][C]0.266[/C][/ROW]
[ROW][C]77[/C][C]96.6[/C][C]96.4042[/C][C]82.8563[/C][C]109.4015[/C][C]0.4882[/C][C]0.2887[/C][C]0.2635[/C][C]0.3203[/C][/ROW]
[ROW][C]78[/C][C]106.8[/C][C]106.9556[/C][C]93.4219[/C][C]119.9925[/C][C]0.4907[/C][C]0.9403[/C][C]0.6551[/C][C]0.8688[/C][/ROW]
[ROW][C]79[/C][C]98[/C][C]94.4333[/C][C]80.1614[/C][C]108.0829[/C][C]0.3043[/C][C]0.0379[/C][C]0.3043[/C][C]0.2334[/C][/ROW]
[ROW][C]80[/C][C]98.6[/C][C]91.2837[/C][C]76.5925[/C][C]105.2941[/C][C]0.153[/C][C]0.1737[/C][C]0.1252[/C][C]0.1252[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4187&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4187&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[68])
56110.6-------
57100.8-------
58103.8-------
59117-------
60108.4-------
6195.5-------
6296.9-------
63103.9-------
64101.1-------
65100.6-------
66104.3-------
6798-------
6899.5-------
6997.4106.435797.0765115.55380.02610.9320.88710.932
70105.6105.446496.0125114.63320.48690.9570.63730.8977
71117.5108.689299.1406117.99220.03170.74240.040.9736
72107.4110.896799.5912121.8660.2660.1190.67220.9791
7397.895.726983.7537107.26550.36240.02370.51540.2608
7491.593.910281.5497105.79920.34560.26070.3110.1784
75107.7110.160297.6262122.27920.34540.99870.84430.9577
76100.195.431682.1372108.19030.23660.02970.19190.266
7796.696.404282.8563109.40150.48820.28870.26350.3203
78106.8106.955693.4219119.99250.49070.94030.65510.8688
799894.433380.1614108.08290.30430.03790.30430.2334
8098.691.283776.5925105.29410.1530.17370.12520.1252







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0437-0.08490.007181.64376.80362.6084
700.04450.00151e-040.02360.0020.0444
710.04370.08110.006877.62986.46922.5435
720.0505-0.03150.002612.22721.01891.0094
730.06150.02170.00184.29770.35810.5985
740.0646-0.02570.00215.80890.48410.6958
750.0561-0.02230.00196.05250.50440.7102
760.06820.04890.004121.79361.81611.3476
770.06880.0022e-040.03830.00320.0565
780.0622-0.00151e-040.02420.0020.0449
790.07370.03780.003112.72151.06011.0296
800.07830.08010.006753.52884.46072.112

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0437 & -0.0849 & 0.0071 & 81.6437 & 6.8036 & 2.6084 \tabularnewline
70 & 0.0445 & 0.0015 & 1e-04 & 0.0236 & 0.002 & 0.0444 \tabularnewline
71 & 0.0437 & 0.0811 & 0.0068 & 77.6298 & 6.4692 & 2.5435 \tabularnewline
72 & 0.0505 & -0.0315 & 0.0026 & 12.2272 & 1.0189 & 1.0094 \tabularnewline
73 & 0.0615 & 0.0217 & 0.0018 & 4.2977 & 0.3581 & 0.5985 \tabularnewline
74 & 0.0646 & -0.0257 & 0.0021 & 5.8089 & 0.4841 & 0.6958 \tabularnewline
75 & 0.0561 & -0.0223 & 0.0019 & 6.0525 & 0.5044 & 0.7102 \tabularnewline
76 & 0.0682 & 0.0489 & 0.0041 & 21.7936 & 1.8161 & 1.3476 \tabularnewline
77 & 0.0688 & 0.002 & 2e-04 & 0.0383 & 0.0032 & 0.0565 \tabularnewline
78 & 0.0622 & -0.0015 & 1e-04 & 0.0242 & 0.002 & 0.0449 \tabularnewline
79 & 0.0737 & 0.0378 & 0.0031 & 12.7215 & 1.0601 & 1.0296 \tabularnewline
80 & 0.0783 & 0.0801 & 0.0067 & 53.5288 & 4.4607 & 2.112 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4187&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]69[/C][C]0.0437[/C][C]-0.0849[/C][C]0.0071[/C][C]81.6437[/C][C]6.8036[/C][C]2.6084[/C][/ROW]
[ROW][C]70[/C][C]0.0445[/C][C]0.0015[/C][C]1e-04[/C][C]0.0236[/C][C]0.002[/C][C]0.0444[/C][/ROW]
[ROW][C]71[/C][C]0.0437[/C][C]0.0811[/C][C]0.0068[/C][C]77.6298[/C][C]6.4692[/C][C]2.5435[/C][/ROW]
[ROW][C]72[/C][C]0.0505[/C][C]-0.0315[/C][C]0.0026[/C][C]12.2272[/C][C]1.0189[/C][C]1.0094[/C][/ROW]
[ROW][C]73[/C][C]0.0615[/C][C]0.0217[/C][C]0.0018[/C][C]4.2977[/C][C]0.3581[/C][C]0.5985[/C][/ROW]
[ROW][C]74[/C][C]0.0646[/C][C]-0.0257[/C][C]0.0021[/C][C]5.8089[/C][C]0.4841[/C][C]0.6958[/C][/ROW]
[ROW][C]75[/C][C]0.0561[/C][C]-0.0223[/C][C]0.0019[/C][C]6.0525[/C][C]0.5044[/C][C]0.7102[/C][/ROW]
[ROW][C]76[/C][C]0.0682[/C][C]0.0489[/C][C]0.0041[/C][C]21.7936[/C][C]1.8161[/C][C]1.3476[/C][/ROW]
[ROW][C]77[/C][C]0.0688[/C][C]0.002[/C][C]2e-04[/C][C]0.0383[/C][C]0.0032[/C][C]0.0565[/C][/ROW]
[ROW][C]78[/C][C]0.0622[/C][C]-0.0015[/C][C]1e-04[/C][C]0.0242[/C][C]0.002[/C][C]0.0449[/C][/ROW]
[ROW][C]79[/C][C]0.0737[/C][C]0.0378[/C][C]0.0031[/C][C]12.7215[/C][C]1.0601[/C][C]1.0296[/C][/ROW]
[ROW][C]80[/C][C]0.0783[/C][C]0.0801[/C][C]0.0067[/C][C]53.5288[/C][C]4.4607[/C][C]2.112[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4187&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4187&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
690.0437-0.08490.007181.64376.80362.6084
700.04450.00151e-040.02360.0020.0444
710.04370.08110.006877.62986.46922.5435
720.0505-0.03150.002612.22721.01891.0094
730.06150.02170.00184.29770.35810.5985
740.0646-0.02570.00215.80890.48410.6958
750.0561-0.02230.00196.05250.50440.7102
760.06820.04890.004121.79361.81611.3476
770.06880.0022e-040.03830.00320.0565
780.0622-0.00151e-040.02420.0020.0449
790.07370.03780.003112.72151.06011.0296
800.07830.08010.006753.52884.46072.112



Parameters (Session):
par1 = 12 ; par2 = 1.3 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1.3 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')