Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 09 Jan 2008 07:45:11 -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/2008/Jan/09/t1199889906achpno4kzeawv95.htm/, Retrieved Wed, 15 May 2024 05:24:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7939, Retrieved Wed, 15 May 2024 05:24:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordss0650921, s0650125
Estimated Impact288
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper_arimaforeca...] [2008-01-09 14:45:11] [1232d415564adb2a600743f77b12553a] [Current]
Feedback Forum

Post a new message
Dataseries X:
102,7
103,2
105,6
103,9
107,2
100,7
92,1
90,3
93,4
98,5
100,8
102,3
104,7
101,1
101,4
99,5
98,4
96,3
100,7
101,2
100,3
97,8
97,4
98,6
99,7
99,0
98,1
97,0
98,5
103,8
114,4
124,5
134,2
131,8
125,6
119,9
114,9
115,5
112,5
111,4
115,3
110,8
103,7
111,1
113,0
111,2
117,6
121,7
127,3
129,8
137,1
141,4
137,4
130,7
117,2
110,8
111,4
108,2
108,8
110,2
109,5
109,5
116,0
111,2
112,1
114,0
119,1
114,1
115,1
115,4
110,8
116,0
119,2
126,5
127,8
131,3
140,3
137,3
143,0
134,5
139,9
159,3
170,4
175,0
175,8
180,9
180,3
169,6
172,3
184,8
177,7
184,6
211,4
215,3
215,9




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7939&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'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[83])
71110.8-------
72116-------
73119.2-------
74126.5-------
75127.8-------
76131.3-------
77140.3-------
78137.3-------
79143-------
80134.5-------
81139.9-------
82159.3-------
83170.4-------
84175172.3094162.6548181.9640.29250.650910.6509
85175.8172.3094156.0823188.53640.33670.372610.5912
86180.9172.3094151.4906193.12810.20930.371210.5713
87180.3172.3094147.7426196.87610.26190.24660.99980.5605
88169.6172.3094144.4952200.12360.42430.28670.99810.5535
89172.3172.3094141.5891203.02960.49980.56860.97940.5485
90184.8172.3094138.9351205.68360.23160.50020.98010.5446
91177.7172.3094136.4772208.14150.3840.24720.94560.5416
92184.6172.3094134.1774210.44140.26380.39090.9740.5391
93211.4172.3094132.0086212.61020.02860.2750.94250.537
94215.3172.3094129.9507214.66810.02330.03520.72640.5352
95215.9172.3094127.9882216.63050.02690.02860.53360.5336

\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[83]) \tabularnewline
71 & 110.8 & - & - & - & - & - & - & - \tabularnewline
72 & 116 & - & - & - & - & - & - & - \tabularnewline
73 & 119.2 & - & - & - & - & - & - & - \tabularnewline
74 & 126.5 & - & - & - & - & - & - & - \tabularnewline
75 & 127.8 & - & - & - & - & - & - & - \tabularnewline
76 & 131.3 & - & - & - & - & - & - & - \tabularnewline
77 & 140.3 & - & - & - & - & - & - & - \tabularnewline
78 & 137.3 & - & - & - & - & - & - & - \tabularnewline
79 & 143 & - & - & - & - & - & - & - \tabularnewline
80 & 134.5 & - & - & - & - & - & - & - \tabularnewline
81 & 139.9 & - & - & - & - & - & - & - \tabularnewline
82 & 159.3 & - & - & - & - & - & - & - \tabularnewline
83 & 170.4 & - & - & - & - & - & - & - \tabularnewline
84 & 175 & 172.3094 & 162.6548 & 181.964 & 0.2925 & 0.6509 & 1 & 0.6509 \tabularnewline
85 & 175.8 & 172.3094 & 156.0823 & 188.5364 & 0.3367 & 0.3726 & 1 & 0.5912 \tabularnewline
86 & 180.9 & 172.3094 & 151.4906 & 193.1281 & 0.2093 & 0.3712 & 1 & 0.5713 \tabularnewline
87 & 180.3 & 172.3094 & 147.7426 & 196.8761 & 0.2619 & 0.2466 & 0.9998 & 0.5605 \tabularnewline
88 & 169.6 & 172.3094 & 144.4952 & 200.1236 & 0.4243 & 0.2867 & 0.9981 & 0.5535 \tabularnewline
89 & 172.3 & 172.3094 & 141.5891 & 203.0296 & 0.4998 & 0.5686 & 0.9794 & 0.5485 \tabularnewline
90 & 184.8 & 172.3094 & 138.9351 & 205.6836 & 0.2316 & 0.5002 & 0.9801 & 0.5446 \tabularnewline
91 & 177.7 & 172.3094 & 136.4772 & 208.1415 & 0.384 & 0.2472 & 0.9456 & 0.5416 \tabularnewline
92 & 184.6 & 172.3094 & 134.1774 & 210.4414 & 0.2638 & 0.3909 & 0.974 & 0.5391 \tabularnewline
93 & 211.4 & 172.3094 & 132.0086 & 212.6102 & 0.0286 & 0.275 & 0.9425 & 0.537 \tabularnewline
94 & 215.3 & 172.3094 & 129.9507 & 214.6681 & 0.0233 & 0.0352 & 0.7264 & 0.5352 \tabularnewline
95 & 215.9 & 172.3094 & 127.9882 & 216.6305 & 0.0269 & 0.0286 & 0.5336 & 0.5336 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7939&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[83])[/C][/ROW]
[ROW][C]71[/C][C]110.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]116[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]119.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]126.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]127.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]131.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]140.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]137.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]143[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]134.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]139.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]159.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]170.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]175[/C][C]172.3094[/C][C]162.6548[/C][C]181.964[/C][C]0.2925[/C][C]0.6509[/C][C]1[/C][C]0.6509[/C][/ROW]
[ROW][C]85[/C][C]175.8[/C][C]172.3094[/C][C]156.0823[/C][C]188.5364[/C][C]0.3367[/C][C]0.3726[/C][C]1[/C][C]0.5912[/C][/ROW]
[ROW][C]86[/C][C]180.9[/C][C]172.3094[/C][C]151.4906[/C][C]193.1281[/C][C]0.2093[/C][C]0.3712[/C][C]1[/C][C]0.5713[/C][/ROW]
[ROW][C]87[/C][C]180.3[/C][C]172.3094[/C][C]147.7426[/C][C]196.8761[/C][C]0.2619[/C][C]0.2466[/C][C]0.9998[/C][C]0.5605[/C][/ROW]
[ROW][C]88[/C][C]169.6[/C][C]172.3094[/C][C]144.4952[/C][C]200.1236[/C][C]0.4243[/C][C]0.2867[/C][C]0.9981[/C][C]0.5535[/C][/ROW]
[ROW][C]89[/C][C]172.3[/C][C]172.3094[/C][C]141.5891[/C][C]203.0296[/C][C]0.4998[/C][C]0.5686[/C][C]0.9794[/C][C]0.5485[/C][/ROW]
[ROW][C]90[/C][C]184.8[/C][C]172.3094[/C][C]138.9351[/C][C]205.6836[/C][C]0.2316[/C][C]0.5002[/C][C]0.9801[/C][C]0.5446[/C][/ROW]
[ROW][C]91[/C][C]177.7[/C][C]172.3094[/C][C]136.4772[/C][C]208.1415[/C][C]0.384[/C][C]0.2472[/C][C]0.9456[/C][C]0.5416[/C][/ROW]
[ROW][C]92[/C][C]184.6[/C][C]172.3094[/C][C]134.1774[/C][C]210.4414[/C][C]0.2638[/C][C]0.3909[/C][C]0.974[/C][C]0.5391[/C][/ROW]
[ROW][C]93[/C][C]211.4[/C][C]172.3094[/C][C]132.0086[/C][C]212.6102[/C][C]0.0286[/C][C]0.275[/C][C]0.9425[/C][C]0.537[/C][/ROW]
[ROW][C]94[/C][C]215.3[/C][C]172.3094[/C][C]129.9507[/C][C]214.6681[/C][C]0.0233[/C][C]0.0352[/C][C]0.7264[/C][C]0.5352[/C][/ROW]
[ROW][C]95[/C][C]215.9[/C][C]172.3094[/C][C]127.9882[/C][C]216.6305[/C][C]0.0269[/C][C]0.0286[/C][C]0.5336[/C][C]0.5336[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7939&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7939&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[83])
71110.8-------
72116-------
73119.2-------
74126.5-------
75127.8-------
76131.3-------
77140.3-------
78137.3-------
79143-------
80134.5-------
81139.9-------
82159.3-------
83170.4-------
84175172.3094162.6548181.9640.29250.650910.6509
85175.8172.3094156.0823188.53640.33670.372610.5912
86180.9172.3094151.4906193.12810.20930.371210.5713
87180.3172.3094147.7426196.87610.26190.24660.99980.5605
88169.6172.3094144.4952200.12360.42430.28670.99810.5535
89172.3172.3094141.5891203.02960.49980.56860.97940.5485
90184.8172.3094138.9351205.68360.23160.50020.98010.5446
91177.7172.3094136.4772208.14150.3840.24720.94560.5416
92184.6172.3094134.1774210.44140.26380.39090.9740.5391
93211.4172.3094132.0086212.61020.02860.2750.94250.537
94215.3172.3094129.9507214.66810.02330.03520.72640.5352
95215.9172.3094127.9882216.63050.02690.02860.53360.5336







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
840.02860.01560.00137.23950.60330.7767
850.0480.02030.001712.18451.01541.0077
860.06160.04990.004273.7996.14992.4799
870.07270.04640.003963.85035.32092.3067
880.0824-0.01570.00137.34070.61170.7821
890.091-1e-0401e-0400.0027
900.09880.07250.006156.01613.00133.6057
910.10610.03130.002629.0592.42161.5561
920.11290.07130.0059151.059712.58833.548
930.11930.22690.01891528.0778127.339811.2845
940.12540.24950.02081848.1947154.016212.4103
950.13120.2530.02111900.1435158.345312.5835

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
84 & 0.0286 & 0.0156 & 0.0013 & 7.2395 & 0.6033 & 0.7767 \tabularnewline
85 & 0.048 & 0.0203 & 0.0017 & 12.1845 & 1.0154 & 1.0077 \tabularnewline
86 & 0.0616 & 0.0499 & 0.0042 & 73.799 & 6.1499 & 2.4799 \tabularnewline
87 & 0.0727 & 0.0464 & 0.0039 & 63.8503 & 5.3209 & 2.3067 \tabularnewline
88 & 0.0824 & -0.0157 & 0.0013 & 7.3407 & 0.6117 & 0.7821 \tabularnewline
89 & 0.091 & -1e-04 & 0 & 1e-04 & 0 & 0.0027 \tabularnewline
90 & 0.0988 & 0.0725 & 0.006 & 156.016 & 13.0013 & 3.6057 \tabularnewline
91 & 0.1061 & 0.0313 & 0.0026 & 29.059 & 2.4216 & 1.5561 \tabularnewline
92 & 0.1129 & 0.0713 & 0.0059 & 151.0597 & 12.5883 & 3.548 \tabularnewline
93 & 0.1193 & 0.2269 & 0.0189 & 1528.0778 & 127.3398 & 11.2845 \tabularnewline
94 & 0.1254 & 0.2495 & 0.0208 & 1848.1947 & 154.0162 & 12.4103 \tabularnewline
95 & 0.1312 & 0.253 & 0.0211 & 1900.1435 & 158.3453 & 12.5835 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7939&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]84[/C][C]0.0286[/C][C]0.0156[/C][C]0.0013[/C][C]7.2395[/C][C]0.6033[/C][C]0.7767[/C][/ROW]
[ROW][C]85[/C][C]0.048[/C][C]0.0203[/C][C]0.0017[/C][C]12.1845[/C][C]1.0154[/C][C]1.0077[/C][/ROW]
[ROW][C]86[/C][C]0.0616[/C][C]0.0499[/C][C]0.0042[/C][C]73.799[/C][C]6.1499[/C][C]2.4799[/C][/ROW]
[ROW][C]87[/C][C]0.0727[/C][C]0.0464[/C][C]0.0039[/C][C]63.8503[/C][C]5.3209[/C][C]2.3067[/C][/ROW]
[ROW][C]88[/C][C]0.0824[/C][C]-0.0157[/C][C]0.0013[/C][C]7.3407[/C][C]0.6117[/C][C]0.7821[/C][/ROW]
[ROW][C]89[/C][C]0.091[/C][C]-1e-04[/C][C]0[/C][C]1e-04[/C][C]0[/C][C]0.0027[/C][/ROW]
[ROW][C]90[/C][C]0.0988[/C][C]0.0725[/C][C]0.006[/C][C]156.016[/C][C]13.0013[/C][C]3.6057[/C][/ROW]
[ROW][C]91[/C][C]0.1061[/C][C]0.0313[/C][C]0.0026[/C][C]29.059[/C][C]2.4216[/C][C]1.5561[/C][/ROW]
[ROW][C]92[/C][C]0.1129[/C][C]0.0713[/C][C]0.0059[/C][C]151.0597[/C][C]12.5883[/C][C]3.548[/C][/ROW]
[ROW][C]93[/C][C]0.1193[/C][C]0.2269[/C][C]0.0189[/C][C]1528.0778[/C][C]127.3398[/C][C]11.2845[/C][/ROW]
[ROW][C]94[/C][C]0.1254[/C][C]0.2495[/C][C]0.0208[/C][C]1848.1947[/C][C]154.0162[/C][C]12.4103[/C][/ROW]
[ROW][C]95[/C][C]0.1312[/C][C]0.253[/C][C]0.0211[/C][C]1900.1435[/C][C]158.3453[/C][C]12.5835[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7939&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7939&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
840.02860.01560.00137.23950.60330.7767
850.0480.02030.001712.18451.01541.0077
860.06160.04990.004273.7996.14992.4799
870.07270.04640.003963.85035.32092.3067
880.0824-0.01570.00137.34070.61170.7821
890.091-1e-0401e-0400.0027
900.09880.07250.006156.01613.00133.6057
910.10610.03130.002629.0592.42161.5561
920.11290.07130.0059151.059712.58833.548
930.11930.22690.01891528.0778127.339811.2845
940.12540.24950.02081848.1947154.016212.4103
950.13120.2530.02111900.1435158.345312.5835



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