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 computationThu, 17 Dec 2009 11:25:36 -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/2009/Dec/17/t12610743748td9phv4kid22fa.htm/, Retrieved Tue, 30 Apr 2024 05:51:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69037, Retrieved Tue, 30 Apr 2024 05:51:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact116
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Scatterplot prijs...] [2009-12-12 17:13:39] [8733f8ed033058987ec00f5e71b74854]
- RMP     [ARIMA Forecasting] [ARIMA Forecasting] [2009-12-17 18:25:36] [c6e373ff11c42d4585d53e9e88ed5606] [Current]
Feedback Forum

Post a new message
Dataseries X:
96.8
87.0
96.3
107.1
115.2
106.1
89.5
91.3
97.6
100.7
104.6
94.7
101.8
102.5
105.3
110.3
109.8
117.3
118.8
131.3
125.9
133.1
147.0
145.8
164.4
149.8
137.7
151.7
156.8
180.0
180.4
170.4
191.6
199.5
218.2
217.5
205.0
194.0
199.3
219.3
211.1
215.2
240.2
242.2
240.7
255.4
253.0
218.2
203.7
205.6
215.6
188.5
202.9
214.0
230.3
230.0
241.0
259.6
247.8
270.3
289.7
322.7
315.0
320.2
329.5
360.6
382.2
435.4
464.0
468.8
403.0
351.6
252.0
188.0
146.5
152.9
148.1
165.1
177.0
206.1
244.9
228.6
253.4
241.1




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69037&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'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[72])
60270.3-------
61289.7-------
62322.7-------
63315-------
64320.2-------
65329.5-------
66360.6-------
67382.2-------
68435.4-------
69464-------
70468.8-------
71403-------
72351.6-------
73252356.4111297.9488430.70670.00290.55050.96080.5505
74188364.2015280.6697483.15550.00180.96780.7530.5822
75146.5372.3754269.4816532.76810.00290.98790.75840.6002
76152.9380.7983261.1511582.6740.01350.98850.72180.6116
77148.1389.471254.5164634.32660.02670.97090.68440.6191
78165.1398.4023249.0147688.63840.05760.95450.60070.624
79177407.6016244.3267746.32330.0910.91970.55840.6271
80206.1417.0791240.2525808.02510.14510.88560.46340.6286
81244.9426.845236.6578874.37880.21280.83320.43540.6291
82228.6436.9103233.4481946.04460.21130.77010.45110.6287
83253.4447.2864230.55421023.73310.25490.77140.55980.6275
84241.1457.9851227.92381108.22470.25660.73130.62580.6258

\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[72]) \tabularnewline
60 & 270.3 & - & - & - & - & - & - & - \tabularnewline
61 & 289.7 & - & - & - & - & - & - & - \tabularnewline
62 & 322.7 & - & - & - & - & - & - & - \tabularnewline
63 & 315 & - & - & - & - & - & - & - \tabularnewline
64 & 320.2 & - & - & - & - & - & - & - \tabularnewline
65 & 329.5 & - & - & - & - & - & - & - \tabularnewline
66 & 360.6 & - & - & - & - & - & - & - \tabularnewline
67 & 382.2 & - & - & - & - & - & - & - \tabularnewline
68 & 435.4 & - & - & - & - & - & - & - \tabularnewline
69 & 464 & - & - & - & - & - & - & - \tabularnewline
70 & 468.8 & - & - & - & - & - & - & - \tabularnewline
71 & 403 & - & - & - & - & - & - & - \tabularnewline
72 & 351.6 & - & - & - & - & - & - & - \tabularnewline
73 & 252 & 356.4111 & 297.9488 & 430.7067 & 0.0029 & 0.5505 & 0.9608 & 0.5505 \tabularnewline
74 & 188 & 364.2015 & 280.6697 & 483.1555 & 0.0018 & 0.9678 & 0.753 & 0.5822 \tabularnewline
75 & 146.5 & 372.3754 & 269.4816 & 532.7681 & 0.0029 & 0.9879 & 0.7584 & 0.6002 \tabularnewline
76 & 152.9 & 380.7983 & 261.1511 & 582.674 & 0.0135 & 0.9885 & 0.7218 & 0.6116 \tabularnewline
77 & 148.1 & 389.471 & 254.5164 & 634.3266 & 0.0267 & 0.9709 & 0.6844 & 0.6191 \tabularnewline
78 & 165.1 & 398.4023 & 249.0147 & 688.6384 & 0.0576 & 0.9545 & 0.6007 & 0.624 \tabularnewline
79 & 177 & 407.6016 & 244.3267 & 746.3233 & 0.091 & 0.9197 & 0.5584 & 0.6271 \tabularnewline
80 & 206.1 & 417.0791 & 240.2525 & 808.0251 & 0.1451 & 0.8856 & 0.4634 & 0.6286 \tabularnewline
81 & 244.9 & 426.845 & 236.6578 & 874.3788 & 0.2128 & 0.8332 & 0.4354 & 0.6291 \tabularnewline
82 & 228.6 & 436.9103 & 233.4481 & 946.0446 & 0.2113 & 0.7701 & 0.4511 & 0.6287 \tabularnewline
83 & 253.4 & 447.2864 & 230.5542 & 1023.7331 & 0.2549 & 0.7714 & 0.5598 & 0.6275 \tabularnewline
84 & 241.1 & 457.9851 & 227.9238 & 1108.2247 & 0.2566 & 0.7313 & 0.6258 & 0.6258 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69037&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[72])[/C][/ROW]
[ROW][C]60[/C][C]270.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]289.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]322.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]315[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]320.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]329.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]360.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]382.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]435.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]464[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]468.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]403[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]351.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]252[/C][C]356.4111[/C][C]297.9488[/C][C]430.7067[/C][C]0.0029[/C][C]0.5505[/C][C]0.9608[/C][C]0.5505[/C][/ROW]
[ROW][C]74[/C][C]188[/C][C]364.2015[/C][C]280.6697[/C][C]483.1555[/C][C]0.0018[/C][C]0.9678[/C][C]0.753[/C][C]0.5822[/C][/ROW]
[ROW][C]75[/C][C]146.5[/C][C]372.3754[/C][C]269.4816[/C][C]532.7681[/C][C]0.0029[/C][C]0.9879[/C][C]0.7584[/C][C]0.6002[/C][/ROW]
[ROW][C]76[/C][C]152.9[/C][C]380.7983[/C][C]261.1511[/C][C]582.674[/C][C]0.0135[/C][C]0.9885[/C][C]0.7218[/C][C]0.6116[/C][/ROW]
[ROW][C]77[/C][C]148.1[/C][C]389.471[/C][C]254.5164[/C][C]634.3266[/C][C]0.0267[/C][C]0.9709[/C][C]0.6844[/C][C]0.6191[/C][/ROW]
[ROW][C]78[/C][C]165.1[/C][C]398.4023[/C][C]249.0147[/C][C]688.6384[/C][C]0.0576[/C][C]0.9545[/C][C]0.6007[/C][C]0.624[/C][/ROW]
[ROW][C]79[/C][C]177[/C][C]407.6016[/C][C]244.3267[/C][C]746.3233[/C][C]0.091[/C][C]0.9197[/C][C]0.5584[/C][C]0.6271[/C][/ROW]
[ROW][C]80[/C][C]206.1[/C][C]417.0791[/C][C]240.2525[/C][C]808.0251[/C][C]0.1451[/C][C]0.8856[/C][C]0.4634[/C][C]0.6286[/C][/ROW]
[ROW][C]81[/C][C]244.9[/C][C]426.845[/C][C]236.6578[/C][C]874.3788[/C][C]0.2128[/C][C]0.8332[/C][C]0.4354[/C][C]0.6291[/C][/ROW]
[ROW][C]82[/C][C]228.6[/C][C]436.9103[/C][C]233.4481[/C][C]946.0446[/C][C]0.2113[/C][C]0.7701[/C][C]0.4511[/C][C]0.6287[/C][/ROW]
[ROW][C]83[/C][C]253.4[/C][C]447.2864[/C][C]230.5542[/C][C]1023.7331[/C][C]0.2549[/C][C]0.7714[/C][C]0.5598[/C][C]0.6275[/C][/ROW]
[ROW][C]84[/C][C]241.1[/C][C]457.9851[/C][C]227.9238[/C][C]1108.2247[/C][C]0.2566[/C][C]0.7313[/C][C]0.6258[/C][C]0.6258[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69037&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69037&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[72])
60270.3-------
61289.7-------
62322.7-------
63315-------
64320.2-------
65329.5-------
66360.6-------
67382.2-------
68435.4-------
69464-------
70468.8-------
71403-------
72351.6-------
73252356.4111297.9488430.70670.00290.55050.96080.5505
74188364.2015280.6697483.15550.00180.96780.7530.5822
75146.5372.3754269.4816532.76810.00290.98790.75840.6002
76152.9380.7983261.1511582.6740.01350.98850.72180.6116
77148.1389.471254.5164634.32660.02670.97090.68440.6191
78165.1398.4023249.0147688.63840.05760.95450.60070.624
79177407.6016244.3267746.32330.0910.91970.55840.6271
80206.1417.0791240.2525808.02510.14510.88560.46340.6286
81244.9426.845236.6578874.37880.21280.83320.43540.6291
82228.6436.9103233.4481946.04460.21130.77010.45110.6287
83253.4447.2864230.55421023.73310.25490.77140.55980.6275
84241.1457.9851227.92381108.22470.25660.73130.62580.6258







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.1064-0.293010901.671700
740.1666-0.48380.388431046.977120974.3244144.8252
750.2198-0.60660.461151019.700930989.4499176.0382
760.2705-0.59850.495551937.621236226.4927190.3326
770.3208-0.61970.520358259.951840633.1845201.5767
780.3717-0.58560.531254429.948142932.6451207.2019
790.424-0.56580.536153177.120444396.1416210.7039
800.4782-0.50580.532344512.180544410.6465210.7383
810.5349-0.42630.520633103.996843154.3521207.7363
820.5945-0.47680.516243393.200743178.2369207.7937
830.6575-0.43350.508737591.937242670.3915206.5681
840.7244-0.47360.505747039.145543034.4543207.4475

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.1064 & -0.293 & 0 & 10901.6717 & 0 & 0 \tabularnewline
74 & 0.1666 & -0.4838 & 0.3884 & 31046.9771 & 20974.3244 & 144.8252 \tabularnewline
75 & 0.2198 & -0.6066 & 0.4611 & 51019.7009 & 30989.4499 & 176.0382 \tabularnewline
76 & 0.2705 & -0.5985 & 0.4955 & 51937.6212 & 36226.4927 & 190.3326 \tabularnewline
77 & 0.3208 & -0.6197 & 0.5203 & 58259.9518 & 40633.1845 & 201.5767 \tabularnewline
78 & 0.3717 & -0.5856 & 0.5312 & 54429.9481 & 42932.6451 & 207.2019 \tabularnewline
79 & 0.424 & -0.5658 & 0.5361 & 53177.1204 & 44396.1416 & 210.7039 \tabularnewline
80 & 0.4782 & -0.5058 & 0.5323 & 44512.1805 & 44410.6465 & 210.7383 \tabularnewline
81 & 0.5349 & -0.4263 & 0.5206 & 33103.9968 & 43154.3521 & 207.7363 \tabularnewline
82 & 0.5945 & -0.4768 & 0.5162 & 43393.2007 & 43178.2369 & 207.7937 \tabularnewline
83 & 0.6575 & -0.4335 & 0.5087 & 37591.9372 & 42670.3915 & 206.5681 \tabularnewline
84 & 0.7244 & -0.4736 & 0.5057 & 47039.1455 & 43034.4543 & 207.4475 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69037&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]73[/C][C]0.1064[/C][C]-0.293[/C][C]0[/C][C]10901.6717[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.1666[/C][C]-0.4838[/C][C]0.3884[/C][C]31046.9771[/C][C]20974.3244[/C][C]144.8252[/C][/ROW]
[ROW][C]75[/C][C]0.2198[/C][C]-0.6066[/C][C]0.4611[/C][C]51019.7009[/C][C]30989.4499[/C][C]176.0382[/C][/ROW]
[ROW][C]76[/C][C]0.2705[/C][C]-0.5985[/C][C]0.4955[/C][C]51937.6212[/C][C]36226.4927[/C][C]190.3326[/C][/ROW]
[ROW][C]77[/C][C]0.3208[/C][C]-0.6197[/C][C]0.5203[/C][C]58259.9518[/C][C]40633.1845[/C][C]201.5767[/C][/ROW]
[ROW][C]78[/C][C]0.3717[/C][C]-0.5856[/C][C]0.5312[/C][C]54429.9481[/C][C]42932.6451[/C][C]207.2019[/C][/ROW]
[ROW][C]79[/C][C]0.424[/C][C]-0.5658[/C][C]0.5361[/C][C]53177.1204[/C][C]44396.1416[/C][C]210.7039[/C][/ROW]
[ROW][C]80[/C][C]0.4782[/C][C]-0.5058[/C][C]0.5323[/C][C]44512.1805[/C][C]44410.6465[/C][C]210.7383[/C][/ROW]
[ROW][C]81[/C][C]0.5349[/C][C]-0.4263[/C][C]0.5206[/C][C]33103.9968[/C][C]43154.3521[/C][C]207.7363[/C][/ROW]
[ROW][C]82[/C][C]0.5945[/C][C]-0.4768[/C][C]0.5162[/C][C]43393.2007[/C][C]43178.2369[/C][C]207.7937[/C][/ROW]
[ROW][C]83[/C][C]0.6575[/C][C]-0.4335[/C][C]0.5087[/C][C]37591.9372[/C][C]42670.3915[/C][C]206.5681[/C][/ROW]
[ROW][C]84[/C][C]0.7244[/C][C]-0.4736[/C][C]0.5057[/C][C]47039.1455[/C][C]43034.4543[/C][C]207.4475[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69037&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69037&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
730.1064-0.293010901.671700
740.1666-0.48380.388431046.977120974.3244144.8252
750.2198-0.60660.461151019.700930989.4499176.0382
760.2705-0.59850.495551937.621236226.4927190.3326
770.3208-0.61970.520358259.951840633.1845201.5767
780.3717-0.58560.531254429.948142932.6451207.2019
790.424-0.56580.536153177.120444396.1416210.7039
800.4782-0.50580.532344512.180544410.6465210.7383
810.5349-0.42630.520633103.996843154.3521207.7363
820.5945-0.47680.516243393.200743178.2369207.7937
830.6575-0.43350.508737591.937242670.3915206.5681
840.7244-0.47360.505747039.145543034.4543207.4475



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