Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 21 Dec 2008 12:00:35 -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/21/t1229886092dkewm44dvr9umjj.htm/, Retrieved Fri, 17 May 2024 05:15:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35759, Retrieved Fri, 17 May 2024 05:15:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact160
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Forecasting] [paper arima forec...] [2008-12-14 19:17:18] [85134b6edb9973b9193450dd2306c65b]
-   P     [ARIMA Forecasting] [paper arima forec...] [2008-12-21 19:00:35] [4940af498c7c54f3992f17142bd40069] [Current]
Feedback Forum

Post a new message
Dataseries X:
111078
150739
159129
157928
147768
137507
136919
136151
133001
125554
119647
114158
116193
152803
161761
160942
149470
139208
134588
130322
126611
122401
117352
112135
112879
148729
157230
157221
146681
136524
132111
125326
122716
116615
113719
110737
112093
143565
149946
149147
134339
122683
115614
116566
111272
104609
101802
94542
93051
124129
130374
123946
114971
105531
104919
104782
101281
94545
93248
84031
87486




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35759&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]1 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=35759&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35759&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 time1 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[49])
37112093-------
38143565-------
39149946-------
40149147-------
41134339-------
42122683-------
43115614-------
44116566-------
45111272-------
46104609-------
47101802-------
4894542-------
4993051-------
50124129125824.1838121125.1472130523.22030.2398101
51130374132835.2682126189.827139480.70940.23390.994901
52123946132271.0638124132.0938140410.03390.02250.676101
53114971118731.5545109333.4814128129.62760.21640.13846e-041
54105531107521.071897013.7066118028.43690.35520.08230.00230.9965
55104919101241.460689731.2187112751.70240.26560.23260.00720.9184
5610478299893.949687461.4675112326.43170.22050.21410.00430.8597
5710128195397.660382106.7778108688.54270.19280.08320.00960.6354
589454588901.692174804.5824102998.80180.21630.04260.01450.282
599324886068.240471208.5821100927.89880.17180.13180.0190.1785
608403180079.703364494.762195664.64440.30960.04890.03450.0514
618748679434.859163156.91995712.79920.16620.290.05060.0506

\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[49]) \tabularnewline
37 & 112093 & - & - & - & - & - & - & - \tabularnewline
38 & 143565 & - & - & - & - & - & - & - \tabularnewline
39 & 149946 & - & - & - & - & - & - & - \tabularnewline
40 & 149147 & - & - & - & - & - & - & - \tabularnewline
41 & 134339 & - & - & - & - & - & - & - \tabularnewline
42 & 122683 & - & - & - & - & - & - & - \tabularnewline
43 & 115614 & - & - & - & - & - & - & - \tabularnewline
44 & 116566 & - & - & - & - & - & - & - \tabularnewline
45 & 111272 & - & - & - & - & - & - & - \tabularnewline
46 & 104609 & - & - & - & - & - & - & - \tabularnewline
47 & 101802 & - & - & - & - & - & - & - \tabularnewline
48 & 94542 & - & - & - & - & - & - & - \tabularnewline
49 & 93051 & - & - & - & - & - & - & - \tabularnewline
50 & 124129 & 125824.1838 & 121125.1472 & 130523.2203 & 0.2398 & 1 & 0 & 1 \tabularnewline
51 & 130374 & 132835.2682 & 126189.827 & 139480.7094 & 0.2339 & 0.9949 & 0 & 1 \tabularnewline
52 & 123946 & 132271.0638 & 124132.0938 & 140410.0339 & 0.0225 & 0.6761 & 0 & 1 \tabularnewline
53 & 114971 & 118731.5545 & 109333.4814 & 128129.6276 & 0.2164 & 0.1384 & 6e-04 & 1 \tabularnewline
54 & 105531 & 107521.0718 & 97013.7066 & 118028.4369 & 0.3552 & 0.0823 & 0.0023 & 0.9965 \tabularnewline
55 & 104919 & 101241.4606 & 89731.2187 & 112751.7024 & 0.2656 & 0.2326 & 0.0072 & 0.9184 \tabularnewline
56 & 104782 & 99893.9496 & 87461.4675 & 112326.4317 & 0.2205 & 0.2141 & 0.0043 & 0.8597 \tabularnewline
57 & 101281 & 95397.6603 & 82106.7778 & 108688.5427 & 0.1928 & 0.0832 & 0.0096 & 0.6354 \tabularnewline
58 & 94545 & 88901.6921 & 74804.5824 & 102998.8018 & 0.2163 & 0.0426 & 0.0145 & 0.282 \tabularnewline
59 & 93248 & 86068.2404 & 71208.5821 & 100927.8988 & 0.1718 & 0.1318 & 0.019 & 0.1785 \tabularnewline
60 & 84031 & 80079.7033 & 64494.7621 & 95664.6444 & 0.3096 & 0.0489 & 0.0345 & 0.0514 \tabularnewline
61 & 87486 & 79434.8591 & 63156.919 & 95712.7992 & 0.1662 & 0.29 & 0.0506 & 0.0506 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35759&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[49])[/C][/ROW]
[ROW][C]37[/C][C]112093[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]143565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]149946[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]149147[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]134339[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]122683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]115614[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]116566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]111272[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]104609[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]101802[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]94542[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]93051[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]124129[/C][C]125824.1838[/C][C]121125.1472[/C][C]130523.2203[/C][C]0.2398[/C][C]1[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]130374[/C][C]132835.2682[/C][C]126189.827[/C][C]139480.7094[/C][C]0.2339[/C][C]0.9949[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]123946[/C][C]132271.0638[/C][C]124132.0938[/C][C]140410.0339[/C][C]0.0225[/C][C]0.6761[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]114971[/C][C]118731.5545[/C][C]109333.4814[/C][C]128129.6276[/C][C]0.2164[/C][C]0.1384[/C][C]6e-04[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]105531[/C][C]107521.0718[/C][C]97013.7066[/C][C]118028.4369[/C][C]0.3552[/C][C]0.0823[/C][C]0.0023[/C][C]0.9965[/C][/ROW]
[ROW][C]55[/C][C]104919[/C][C]101241.4606[/C][C]89731.2187[/C][C]112751.7024[/C][C]0.2656[/C][C]0.2326[/C][C]0.0072[/C][C]0.9184[/C][/ROW]
[ROW][C]56[/C][C]104782[/C][C]99893.9496[/C][C]87461.4675[/C][C]112326.4317[/C][C]0.2205[/C][C]0.2141[/C][C]0.0043[/C][C]0.8597[/C][/ROW]
[ROW][C]57[/C][C]101281[/C][C]95397.6603[/C][C]82106.7778[/C][C]108688.5427[/C][C]0.1928[/C][C]0.0832[/C][C]0.0096[/C][C]0.6354[/C][/ROW]
[ROW][C]58[/C][C]94545[/C][C]88901.6921[/C][C]74804.5824[/C][C]102998.8018[/C][C]0.2163[/C][C]0.0426[/C][C]0.0145[/C][C]0.282[/C][/ROW]
[ROW][C]59[/C][C]93248[/C][C]86068.2404[/C][C]71208.5821[/C][C]100927.8988[/C][C]0.1718[/C][C]0.1318[/C][C]0.019[/C][C]0.1785[/C][/ROW]
[ROW][C]60[/C][C]84031[/C][C]80079.7033[/C][C]64494.7621[/C][C]95664.6444[/C][C]0.3096[/C][C]0.0489[/C][C]0.0345[/C][C]0.0514[/C][/ROW]
[ROW][C]61[/C][C]87486[/C][C]79434.8591[/C][C]63156.919[/C][C]95712.7992[/C][C]0.1662[/C][C]0.29[/C][C]0.0506[/C][C]0.0506[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35759&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35759&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[49])
37112093-------
38143565-------
39149946-------
40149147-------
41134339-------
42122683-------
43115614-------
44116566-------
45111272-------
46104609-------
47101802-------
4894542-------
4993051-------
50124129125824.1838121125.1472130523.22030.2398101
51130374132835.2682126189.827139480.70940.23390.994901
52123946132271.0638124132.0938140410.03390.02250.676101
53114971118731.5545109333.4814128129.62760.21640.13846e-041
54105531107521.071897013.7066118028.43690.35520.08230.00230.9965
55104919101241.460689731.2187112751.70240.26560.23260.00720.9184
5610478299893.949687461.4675112326.43170.22050.21410.00430.8597
5710128195397.660382106.7778108688.54270.19280.08320.00960.6354
589454588901.692174804.5824102998.80180.21630.04260.01450.282
599324886068.240471208.5821100927.89880.17180.13180.0190.1785
608403180079.703364494.762195664.64440.30960.04890.03450.0514
618748679434.859163156.91995712.79920.16620.290.05060.0506







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0191-0.01350.00112873648.0398239470.67489.3574
510.0255-0.01850.00156057841.1605504820.0967710.5069
520.0314-0.06290.005269306687.48245775557.29022403.2389
530.0404-0.03170.002614141770.37591178480.86471085.5786
540.0499-0.01850.00153960385.6566330032.1381574.4842
550.0580.03630.00313524296.33571127024.69461061.6142
560.06350.04890.004123893036.50351991086.37531411.0586
570.07110.06170.005134613686.27212884473.8561698.3739
580.08090.06350.005331846924.12922653910.34411629.0827
590.08810.08340.00751548947.39794295745.61652072.6181
600.09930.04930.004115612746.00551301062.16711140.6411
610.10460.10140.008464820870.14435401739.17872324.1642

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0191 & -0.0135 & 0.0011 & 2873648.0398 & 239470.67 & 489.3574 \tabularnewline
51 & 0.0255 & -0.0185 & 0.0015 & 6057841.1605 & 504820.0967 & 710.5069 \tabularnewline
52 & 0.0314 & -0.0629 & 0.0052 & 69306687.4824 & 5775557.2902 & 2403.2389 \tabularnewline
53 & 0.0404 & -0.0317 & 0.0026 & 14141770.3759 & 1178480.8647 & 1085.5786 \tabularnewline
54 & 0.0499 & -0.0185 & 0.0015 & 3960385.6566 & 330032.1381 & 574.4842 \tabularnewline
55 & 0.058 & 0.0363 & 0.003 & 13524296.3357 & 1127024.6946 & 1061.6142 \tabularnewline
56 & 0.0635 & 0.0489 & 0.0041 & 23893036.5035 & 1991086.3753 & 1411.0586 \tabularnewline
57 & 0.0711 & 0.0617 & 0.0051 & 34613686.2721 & 2884473.856 & 1698.3739 \tabularnewline
58 & 0.0809 & 0.0635 & 0.0053 & 31846924.1292 & 2653910.3441 & 1629.0827 \tabularnewline
59 & 0.0881 & 0.0834 & 0.007 & 51548947.3979 & 4295745.6165 & 2072.6181 \tabularnewline
60 & 0.0993 & 0.0493 & 0.0041 & 15612746.0055 & 1301062.1671 & 1140.6411 \tabularnewline
61 & 0.1046 & 0.1014 & 0.0084 & 64820870.1443 & 5401739.1787 & 2324.1642 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35759&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]50[/C][C]0.0191[/C][C]-0.0135[/C][C]0.0011[/C][C]2873648.0398[/C][C]239470.67[/C][C]489.3574[/C][/ROW]
[ROW][C]51[/C][C]0.0255[/C][C]-0.0185[/C][C]0.0015[/C][C]6057841.1605[/C][C]504820.0967[/C][C]710.5069[/C][/ROW]
[ROW][C]52[/C][C]0.0314[/C][C]-0.0629[/C][C]0.0052[/C][C]69306687.4824[/C][C]5775557.2902[/C][C]2403.2389[/C][/ROW]
[ROW][C]53[/C][C]0.0404[/C][C]-0.0317[/C][C]0.0026[/C][C]14141770.3759[/C][C]1178480.8647[/C][C]1085.5786[/C][/ROW]
[ROW][C]54[/C][C]0.0499[/C][C]-0.0185[/C][C]0.0015[/C][C]3960385.6566[/C][C]330032.1381[/C][C]574.4842[/C][/ROW]
[ROW][C]55[/C][C]0.058[/C][C]0.0363[/C][C]0.003[/C][C]13524296.3357[/C][C]1127024.6946[/C][C]1061.6142[/C][/ROW]
[ROW][C]56[/C][C]0.0635[/C][C]0.0489[/C][C]0.0041[/C][C]23893036.5035[/C][C]1991086.3753[/C][C]1411.0586[/C][/ROW]
[ROW][C]57[/C][C]0.0711[/C][C]0.0617[/C][C]0.0051[/C][C]34613686.2721[/C][C]2884473.856[/C][C]1698.3739[/C][/ROW]
[ROW][C]58[/C][C]0.0809[/C][C]0.0635[/C][C]0.0053[/C][C]31846924.1292[/C][C]2653910.3441[/C][C]1629.0827[/C][/ROW]
[ROW][C]59[/C][C]0.0881[/C][C]0.0834[/C][C]0.007[/C][C]51548947.3979[/C][C]4295745.6165[/C][C]2072.6181[/C][/ROW]
[ROW][C]60[/C][C]0.0993[/C][C]0.0493[/C][C]0.0041[/C][C]15612746.0055[/C][C]1301062.1671[/C][C]1140.6411[/C][/ROW]
[ROW][C]61[/C][C]0.1046[/C][C]0.1014[/C][C]0.0084[/C][C]64820870.1443[/C][C]5401739.1787[/C][C]2324.1642[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35759&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35759&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
500.0191-0.01350.00112873648.0398239470.67489.3574
510.0255-0.01850.00156057841.1605504820.0967710.5069
520.0314-0.06290.005269306687.48245775557.29022403.2389
530.0404-0.03170.002614141770.37591178480.86471085.5786
540.0499-0.01850.00153960385.6566330032.1381574.4842
550.0580.03630.00313524296.33571127024.69461061.6142
560.06350.04890.004123893036.50351991086.37531411.0586
570.07110.06170.005134613686.27212884473.8561698.3739
580.08090.06350.005331846924.12922653910.34411629.0827
590.08810.08340.00751548947.39794295745.61652072.6181
600.09930.04930.004115612746.00551301062.16711140.6411
610.10460.10140.008464820870.14435401739.17872324.1642



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