Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 22 Dec 2008 07:20:27 -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/Dec/22/t1229955655y0224ggyav66i9n.htm/, Retrieved Mon, 13 May 2024 04:22:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36080, Retrieved Mon, 13 May 2024 04:22:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact200
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [forecast] [2007-12-21 07:44:35] [9fd02a4fb76a6860fd38131ad7f5d02f]
-    D  [ARIMA Forecasting] [] [2008-12-18 14:29:18] [b53e8d20687f12ca59f39c9b7c3a629a]
-   PD      [ARIMA Forecasting] [cwx] [2008-12-22 14:20:27] [7a2afff08a618fdf6611a1bb6e1c3da4] [Current]
Feedback Forum

Post a new message
Dataseries X:
130,3
130,9
104,7
115,2
124,5
112,3
127,5
120,6
117,5
117,7
120,4
125
131,6
121,1
114,2
112,1
127
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 computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36080&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]4 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=36080&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36080&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 time4 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[82])
70110.6-------
71100.8-------
72103.8-------
73117-------
74108.4-------
7595.5-------
7696.9-------
77103.9-------
78101.1-------
79100.6-------
80104.3-------
8198-------
8299.5-------
8397.4100.33391.718108.94790.25230.57520.45770.5752
84105.6106.183397.5238114.84280.44750.97660.70520.9348
85117.5106.957498.0784115.83650.010.61780.01330.9501
86107.4108.063397.3653118.76120.45160.04190.47540.9417
8797.893.93183.1024104.75970.24190.00740.38820.1567
8891.587.830876.623499.03820.26050.04060.05640.0206
89107.7108.606696.4941120.7190.44170.99720.77690.9297
90100.198.019985.7022110.33760.37030.06170.3120.4069
9196.695.833883.1031108.56440.4530.25560.23150.2862
92106.8108.558595.2597121.85740.39780.9610.73490.9091
939893.700480.1525107.24830.2670.0290.2670.2007
9498.692.134378.1909106.07780.18170.20480.15020.1502

\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[82]) \tabularnewline
70 & 110.6 & - & - & - & - & - & - & - \tabularnewline
71 & 100.8 & - & - & - & - & - & - & - \tabularnewline
72 & 103.8 & - & - & - & - & - & - & - \tabularnewline
73 & 117 & - & - & - & - & - & - & - \tabularnewline
74 & 108.4 & - & - & - & - & - & - & - \tabularnewline
75 & 95.5 & - & - & - & - & - & - & - \tabularnewline
76 & 96.9 & - & - & - & - & - & - & - \tabularnewline
77 & 103.9 & - & - & - & - & - & - & - \tabularnewline
78 & 101.1 & - & - & - & - & - & - & - \tabularnewline
79 & 100.6 & - & - & - & - & - & - & - \tabularnewline
80 & 104.3 & - & - & - & - & - & - & - \tabularnewline
81 & 98 & - & - & - & - & - & - & - \tabularnewline
82 & 99.5 & - & - & - & - & - & - & - \tabularnewline
83 & 97.4 & 100.333 & 91.718 & 108.9479 & 0.2523 & 0.5752 & 0.4577 & 0.5752 \tabularnewline
84 & 105.6 & 106.1833 & 97.5238 & 114.8428 & 0.4475 & 0.9766 & 0.7052 & 0.9348 \tabularnewline
85 & 117.5 & 106.9574 & 98.0784 & 115.8365 & 0.01 & 0.6178 & 0.0133 & 0.9501 \tabularnewline
86 & 107.4 & 108.0633 & 97.3653 & 118.7612 & 0.4516 & 0.0419 & 0.4754 & 0.9417 \tabularnewline
87 & 97.8 & 93.931 & 83.1024 & 104.7597 & 0.2419 & 0.0074 & 0.3882 & 0.1567 \tabularnewline
88 & 91.5 & 87.8308 & 76.6234 & 99.0382 & 0.2605 & 0.0406 & 0.0564 & 0.0206 \tabularnewline
89 & 107.7 & 108.6066 & 96.4941 & 120.719 & 0.4417 & 0.9972 & 0.7769 & 0.9297 \tabularnewline
90 & 100.1 & 98.0199 & 85.7022 & 110.3376 & 0.3703 & 0.0617 & 0.312 & 0.4069 \tabularnewline
91 & 96.6 & 95.8338 & 83.1031 & 108.5644 & 0.453 & 0.2556 & 0.2315 & 0.2862 \tabularnewline
92 & 106.8 & 108.5585 & 95.2597 & 121.8574 & 0.3978 & 0.961 & 0.7349 & 0.9091 \tabularnewline
93 & 98 & 93.7004 & 80.1525 & 107.2483 & 0.267 & 0.029 & 0.267 & 0.2007 \tabularnewline
94 & 98.6 & 92.1343 & 78.1909 & 106.0778 & 0.1817 & 0.2048 & 0.1502 & 0.1502 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36080&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[82])[/C][/ROW]
[ROW][C]70[/C][C]110.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]103.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]96.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]103.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]100.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]99.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]97.4[/C][C]100.333[/C][C]91.718[/C][C]108.9479[/C][C]0.2523[/C][C]0.5752[/C][C]0.4577[/C][C]0.5752[/C][/ROW]
[ROW][C]84[/C][C]105.6[/C][C]106.1833[/C][C]97.5238[/C][C]114.8428[/C][C]0.4475[/C][C]0.9766[/C][C]0.7052[/C][C]0.9348[/C][/ROW]
[ROW][C]85[/C][C]117.5[/C][C]106.9574[/C][C]98.0784[/C][C]115.8365[/C][C]0.01[/C][C]0.6178[/C][C]0.0133[/C][C]0.9501[/C][/ROW]
[ROW][C]86[/C][C]107.4[/C][C]108.0633[/C][C]97.3653[/C][C]118.7612[/C][C]0.4516[/C][C]0.0419[/C][C]0.4754[/C][C]0.9417[/C][/ROW]
[ROW][C]87[/C][C]97.8[/C][C]93.931[/C][C]83.1024[/C][C]104.7597[/C][C]0.2419[/C][C]0.0074[/C][C]0.3882[/C][C]0.1567[/C][/ROW]
[ROW][C]88[/C][C]91.5[/C][C]87.8308[/C][C]76.6234[/C][C]99.0382[/C][C]0.2605[/C][C]0.0406[/C][C]0.0564[/C][C]0.0206[/C][/ROW]
[ROW][C]89[/C][C]107.7[/C][C]108.6066[/C][C]96.4941[/C][C]120.719[/C][C]0.4417[/C][C]0.9972[/C][C]0.7769[/C][C]0.9297[/C][/ROW]
[ROW][C]90[/C][C]100.1[/C][C]98.0199[/C][C]85.7022[/C][C]110.3376[/C][C]0.3703[/C][C]0.0617[/C][C]0.312[/C][C]0.4069[/C][/ROW]
[ROW][C]91[/C][C]96.6[/C][C]95.8338[/C][C]83.1031[/C][C]108.5644[/C][C]0.453[/C][C]0.2556[/C][C]0.2315[/C][C]0.2862[/C][/ROW]
[ROW][C]92[/C][C]106.8[/C][C]108.5585[/C][C]95.2597[/C][C]121.8574[/C][C]0.3978[/C][C]0.961[/C][C]0.7349[/C][C]0.9091[/C][/ROW]
[ROW][C]93[/C][C]98[/C][C]93.7004[/C][C]80.1525[/C][C]107.2483[/C][C]0.267[/C][C]0.029[/C][C]0.267[/C][C]0.2007[/C][/ROW]
[ROW][C]94[/C][C]98.6[/C][C]92.1343[/C][C]78.1909[/C][C]106.0778[/C][C]0.1817[/C][C]0.2048[/C][C]0.1502[/C][C]0.1502[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36080&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36080&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[82])
70110.6-------
71100.8-------
72103.8-------
73117-------
74108.4-------
7595.5-------
7696.9-------
77103.9-------
78101.1-------
79100.6-------
80104.3-------
8198-------
8299.5-------
8397.4100.33391.718108.94790.25230.57520.45770.5752
84105.6106.183397.5238114.84280.44750.97660.70520.9348
85117.5106.957498.0784115.83650.010.61780.01330.9501
86107.4108.063397.3653118.76120.45160.04190.47540.9417
8797.893.93183.1024104.75970.24190.00740.38820.1567
8891.587.830876.623499.03820.26050.04060.05640.0206
89107.7108.606696.4941120.7190.44170.99720.77690.9297
90100.198.019985.7022110.33760.37030.06170.3120.4069
9196.695.833883.1031108.56440.4530.25560.23150.2862
92106.8108.558595.2597121.85740.39780.9610.73490.9091
939893.700480.1525107.24830.2670.0290.2670.2007
9498.692.134378.1909106.07780.18170.20480.15020.1502







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
830.0438-0.02920.00248.60220.71690.8467
840.0416-0.00555e-040.34020.02840.1684
850.04240.09860.0082111.14559.26213.0434
860.0505-0.00615e-040.43990.03670.1915
870.05880.04120.003414.9691.24741.1169
880.06510.04180.003513.46291.12191.0592
890.0569-0.00837e-040.82190.06850.2617
900.06410.02120.00184.32660.36060.6005
910.06780.0087e-040.58710.04890.2212
920.0625-0.01620.00133.09240.25770.5076
930.07380.04590.003818.48631.54051.2412
940.07720.07020.005841.80473.48371.8665

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
83 & 0.0438 & -0.0292 & 0.0024 & 8.6022 & 0.7169 & 0.8467 \tabularnewline
84 & 0.0416 & -0.0055 & 5e-04 & 0.3402 & 0.0284 & 0.1684 \tabularnewline
85 & 0.0424 & 0.0986 & 0.0082 & 111.1455 & 9.2621 & 3.0434 \tabularnewline
86 & 0.0505 & -0.0061 & 5e-04 & 0.4399 & 0.0367 & 0.1915 \tabularnewline
87 & 0.0588 & 0.0412 & 0.0034 & 14.969 & 1.2474 & 1.1169 \tabularnewline
88 & 0.0651 & 0.0418 & 0.0035 & 13.4629 & 1.1219 & 1.0592 \tabularnewline
89 & 0.0569 & -0.0083 & 7e-04 & 0.8219 & 0.0685 & 0.2617 \tabularnewline
90 & 0.0641 & 0.0212 & 0.0018 & 4.3266 & 0.3606 & 0.6005 \tabularnewline
91 & 0.0678 & 0.008 & 7e-04 & 0.5871 & 0.0489 & 0.2212 \tabularnewline
92 & 0.0625 & -0.0162 & 0.0013 & 3.0924 & 0.2577 & 0.5076 \tabularnewline
93 & 0.0738 & 0.0459 & 0.0038 & 18.4863 & 1.5405 & 1.2412 \tabularnewline
94 & 0.0772 & 0.0702 & 0.0058 & 41.8047 & 3.4837 & 1.8665 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36080&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]83[/C][C]0.0438[/C][C]-0.0292[/C][C]0.0024[/C][C]8.6022[/C][C]0.7169[/C][C]0.8467[/C][/ROW]
[ROW][C]84[/C][C]0.0416[/C][C]-0.0055[/C][C]5e-04[/C][C]0.3402[/C][C]0.0284[/C][C]0.1684[/C][/ROW]
[ROW][C]85[/C][C]0.0424[/C][C]0.0986[/C][C]0.0082[/C][C]111.1455[/C][C]9.2621[/C][C]3.0434[/C][/ROW]
[ROW][C]86[/C][C]0.0505[/C][C]-0.0061[/C][C]5e-04[/C][C]0.4399[/C][C]0.0367[/C][C]0.1915[/C][/ROW]
[ROW][C]87[/C][C]0.0588[/C][C]0.0412[/C][C]0.0034[/C][C]14.969[/C][C]1.2474[/C][C]1.1169[/C][/ROW]
[ROW][C]88[/C][C]0.0651[/C][C]0.0418[/C][C]0.0035[/C][C]13.4629[/C][C]1.1219[/C][C]1.0592[/C][/ROW]
[ROW][C]89[/C][C]0.0569[/C][C]-0.0083[/C][C]7e-04[/C][C]0.8219[/C][C]0.0685[/C][C]0.2617[/C][/ROW]
[ROW][C]90[/C][C]0.0641[/C][C]0.0212[/C][C]0.0018[/C][C]4.3266[/C][C]0.3606[/C][C]0.6005[/C][/ROW]
[ROW][C]91[/C][C]0.0678[/C][C]0.008[/C][C]7e-04[/C][C]0.5871[/C][C]0.0489[/C][C]0.2212[/C][/ROW]
[ROW][C]92[/C][C]0.0625[/C][C]-0.0162[/C][C]0.0013[/C][C]3.0924[/C][C]0.2577[/C][C]0.5076[/C][/ROW]
[ROW][C]93[/C][C]0.0738[/C][C]0.0459[/C][C]0.0038[/C][C]18.4863[/C][C]1.5405[/C][C]1.2412[/C][/ROW]
[ROW][C]94[/C][C]0.0772[/C][C]0.0702[/C][C]0.0058[/C][C]41.8047[/C][C]3.4837[/C][C]1.8665[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36080&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36080&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
830.0438-0.02920.00248.60220.71690.8467
840.0416-0.00555e-040.34020.02840.1684
850.04240.09860.0082111.14559.26213.0434
860.0505-0.00615e-040.43990.03670.1915
870.05880.04120.003414.9691.24741.1169
880.06510.04180.003513.46291.12191.0592
890.0569-0.00837e-040.82190.06850.2617
900.06410.02120.00184.32660.36060.6005
910.06780.0087e-040.58710.04890.2212
920.0625-0.01620.00133.09240.25770.5076
930.07380.04590.003818.48631.54051.2412
940.07720.07020.005841.80473.48371.8665



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