Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 00:52:45 -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/14/t1197617877hu588yc5fmsj1n4.htm/, Retrieved Thu, 02 May 2024 19:17:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3763, Retrieved Thu, 02 May 2024 19:17:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact204
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [voorspelling goud] [2007-12-14 07:52:45] [e24e91da8d334fb8882bf413603fde71] [Current]
Feedback Forum

Post a new message
Dataseries X:
10.244
10.511
10.812
10.738
10.171
9.721
9.897
9.828
9.924
10.371
10.846
10.413
10.709
10.662
10.57
10.297
10.635
10.872
10.296
10.383
10.431
10.574
10.653
10.805
10.872
10.625
10.407
10.463
10.556
10.646
10.702
11.353
11.346
11.451
11.964
12.574
13.031
13.812
14.544
14.931
14.886
16.005
17.064
15.168
16.05
15.839
15.137
14.954
15.648
15.305
15.579
16.348
15.928
16.171
15.937
15.713
15.594
15.683
16.438
17.032




Summary of compuational 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 compuational 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=3763&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]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=3763&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3763&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 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[48])
3612.574-------
3713.031-------
3813.812-------
3914.544-------
4014.931-------
4114.886-------
4216.005-------
4317.064-------
4415.168-------
4516.05-------
4615.839-------
4715.137-------
4814.954-------
4915.64814.888413.89915.94820.080.45170.99970.4517
5015.30514.671513.286416.2010.20840.10540.86460.3587
5115.57914.606312.928916.50120.15720.23490.52570.3595
5216.34814.584712.509517.0040.07660.21030.38950.3824
5315.92814.515612.119117.38580.16740.10540.40010.3823
5416.17114.492211.820817.76730.15750.19510.18260.3911
5515.93714.484911.534818.18950.22120.18620.08620.402
5615.71314.462711.266118.56620.27520.24070.36810.4072
5715.59414.454411.034418.93430.3090.29090.24260.4135
5815.68314.451910.818319.30590.30960.32230.28770.4197
5916.43814.444710.614819.65640.22670.32070.39730.4241
6017.03214.441810.429319.99790.18040.24070.42830.4283

\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[48]) \tabularnewline
36 & 12.574 & - & - & - & - & - & - & - \tabularnewline
37 & 13.031 & - & - & - & - & - & - & - \tabularnewline
38 & 13.812 & - & - & - & - & - & - & - \tabularnewline
39 & 14.544 & - & - & - & - & - & - & - \tabularnewline
40 & 14.931 & - & - & - & - & - & - & - \tabularnewline
41 & 14.886 & - & - & - & - & - & - & - \tabularnewline
42 & 16.005 & - & - & - & - & - & - & - \tabularnewline
43 & 17.064 & - & - & - & - & - & - & - \tabularnewline
44 & 15.168 & - & - & - & - & - & - & - \tabularnewline
45 & 16.05 & - & - & - & - & - & - & - \tabularnewline
46 & 15.839 & - & - & - & - & - & - & - \tabularnewline
47 & 15.137 & - & - & - & - & - & - & - \tabularnewline
48 & 14.954 & - & - & - & - & - & - & - \tabularnewline
49 & 15.648 & 14.8884 & 13.899 & 15.9482 & 0.08 & 0.4517 & 0.9997 & 0.4517 \tabularnewline
50 & 15.305 & 14.6715 & 13.2864 & 16.201 & 0.2084 & 0.1054 & 0.8646 & 0.3587 \tabularnewline
51 & 15.579 & 14.6063 & 12.9289 & 16.5012 & 0.1572 & 0.2349 & 0.5257 & 0.3595 \tabularnewline
52 & 16.348 & 14.5847 & 12.5095 & 17.004 & 0.0766 & 0.2103 & 0.3895 & 0.3824 \tabularnewline
53 & 15.928 & 14.5156 & 12.1191 & 17.3858 & 0.1674 & 0.1054 & 0.4001 & 0.3823 \tabularnewline
54 & 16.171 & 14.4922 & 11.8208 & 17.7673 & 0.1575 & 0.1951 & 0.1826 & 0.3911 \tabularnewline
55 & 15.937 & 14.4849 & 11.5348 & 18.1895 & 0.2212 & 0.1862 & 0.0862 & 0.402 \tabularnewline
56 & 15.713 & 14.4627 & 11.2661 & 18.5662 & 0.2752 & 0.2407 & 0.3681 & 0.4072 \tabularnewline
57 & 15.594 & 14.4544 & 11.0344 & 18.9343 & 0.309 & 0.2909 & 0.2426 & 0.4135 \tabularnewline
58 & 15.683 & 14.4519 & 10.8183 & 19.3059 & 0.3096 & 0.3223 & 0.2877 & 0.4197 \tabularnewline
59 & 16.438 & 14.4447 & 10.6148 & 19.6564 & 0.2267 & 0.3207 & 0.3973 & 0.4241 \tabularnewline
60 & 17.032 & 14.4418 & 10.4293 & 19.9979 & 0.1804 & 0.2407 & 0.4283 & 0.4283 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3763&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[48])[/C][/ROW]
[ROW][C]36[/C][C]12.574[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]13.031[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]13.812[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]14.544[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]14.931[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]14.886[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]16.005[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]17.064[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]15.168[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]16.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]15.839[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]15.137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]14.954[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]15.648[/C][C]14.8884[/C][C]13.899[/C][C]15.9482[/C][C]0.08[/C][C]0.4517[/C][C]0.9997[/C][C]0.4517[/C][/ROW]
[ROW][C]50[/C][C]15.305[/C][C]14.6715[/C][C]13.2864[/C][C]16.201[/C][C]0.2084[/C][C]0.1054[/C][C]0.8646[/C][C]0.3587[/C][/ROW]
[ROW][C]51[/C][C]15.579[/C][C]14.6063[/C][C]12.9289[/C][C]16.5012[/C][C]0.1572[/C][C]0.2349[/C][C]0.5257[/C][C]0.3595[/C][/ROW]
[ROW][C]52[/C][C]16.348[/C][C]14.5847[/C][C]12.5095[/C][C]17.004[/C][C]0.0766[/C][C]0.2103[/C][C]0.3895[/C][C]0.3824[/C][/ROW]
[ROW][C]53[/C][C]15.928[/C][C]14.5156[/C][C]12.1191[/C][C]17.3858[/C][C]0.1674[/C][C]0.1054[/C][C]0.4001[/C][C]0.3823[/C][/ROW]
[ROW][C]54[/C][C]16.171[/C][C]14.4922[/C][C]11.8208[/C][C]17.7673[/C][C]0.1575[/C][C]0.1951[/C][C]0.1826[/C][C]0.3911[/C][/ROW]
[ROW][C]55[/C][C]15.937[/C][C]14.4849[/C][C]11.5348[/C][C]18.1895[/C][C]0.2212[/C][C]0.1862[/C][C]0.0862[/C][C]0.402[/C][/ROW]
[ROW][C]56[/C][C]15.713[/C][C]14.4627[/C][C]11.2661[/C][C]18.5662[/C][C]0.2752[/C][C]0.2407[/C][C]0.3681[/C][C]0.4072[/C][/ROW]
[ROW][C]57[/C][C]15.594[/C][C]14.4544[/C][C]11.0344[/C][C]18.9343[/C][C]0.309[/C][C]0.2909[/C][C]0.2426[/C][C]0.4135[/C][/ROW]
[ROW][C]58[/C][C]15.683[/C][C]14.4519[/C][C]10.8183[/C][C]19.3059[/C][C]0.3096[/C][C]0.3223[/C][C]0.2877[/C][C]0.4197[/C][/ROW]
[ROW][C]59[/C][C]16.438[/C][C]14.4447[/C][C]10.6148[/C][C]19.6564[/C][C]0.2267[/C][C]0.3207[/C][C]0.3973[/C][C]0.4241[/C][/ROW]
[ROW][C]60[/C][C]17.032[/C][C]14.4418[/C][C]10.4293[/C][C]19.9979[/C][C]0.1804[/C][C]0.2407[/C][C]0.4283[/C][C]0.4283[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3763&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3763&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[48])
3612.574-------
3713.031-------
3813.812-------
3914.544-------
4014.931-------
4114.886-------
4216.005-------
4317.064-------
4415.168-------
4516.05-------
4615.839-------
4715.137-------
4814.954-------
4915.64814.888413.89915.94820.080.45170.99970.4517
5015.30514.671513.286416.2010.20840.10540.86460.3587
5115.57914.606312.928916.50120.15720.23490.52570.3595
5216.34814.584712.509517.0040.07660.21030.38950.3824
5315.92814.515612.119117.38580.16740.10540.40010.3823
5416.17114.492211.820817.76730.15750.19510.18260.3911
5515.93714.484911.534818.18950.22120.18620.08620.402
5615.71314.462711.266118.56620.27520.24070.36810.4072
5715.59414.454411.034418.93430.3090.29090.24260.4135
5815.68314.451910.818319.30590.30960.32230.28770.4197
5916.43814.444710.614819.65640.22670.32070.39730.4241
6017.03214.441810.429319.99790.18040.24070.42830.4283







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03630.0510.00430.5770.04810.2193
500.05320.04320.00360.40130.03340.1829
510.06620.06660.00550.94620.07890.2808
520.08460.12090.01013.10930.25910.509
530.10090.09730.00811.9950.16620.4077
540.11530.11580.00972.81830.23490.4846
550.13050.10020.00842.10850.17570.4192
560.14480.08650.00721.56330.13030.3609
570.15810.07880.00661.29870.10820.329
580.17140.08520.00711.51570.12630.3554
590.18410.1380.01153.97330.33110.5754
600.19630.17940.01496.70940.55910.7477

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0363 & 0.051 & 0.0043 & 0.577 & 0.0481 & 0.2193 \tabularnewline
50 & 0.0532 & 0.0432 & 0.0036 & 0.4013 & 0.0334 & 0.1829 \tabularnewline
51 & 0.0662 & 0.0666 & 0.0055 & 0.9462 & 0.0789 & 0.2808 \tabularnewline
52 & 0.0846 & 0.1209 & 0.0101 & 3.1093 & 0.2591 & 0.509 \tabularnewline
53 & 0.1009 & 0.0973 & 0.0081 & 1.995 & 0.1662 & 0.4077 \tabularnewline
54 & 0.1153 & 0.1158 & 0.0097 & 2.8183 & 0.2349 & 0.4846 \tabularnewline
55 & 0.1305 & 0.1002 & 0.0084 & 2.1085 & 0.1757 & 0.4192 \tabularnewline
56 & 0.1448 & 0.0865 & 0.0072 & 1.5633 & 0.1303 & 0.3609 \tabularnewline
57 & 0.1581 & 0.0788 & 0.0066 & 1.2987 & 0.1082 & 0.329 \tabularnewline
58 & 0.1714 & 0.0852 & 0.0071 & 1.5157 & 0.1263 & 0.3554 \tabularnewline
59 & 0.1841 & 0.138 & 0.0115 & 3.9733 & 0.3311 & 0.5754 \tabularnewline
60 & 0.1963 & 0.1794 & 0.0149 & 6.7094 & 0.5591 & 0.7477 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3763&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]49[/C][C]0.0363[/C][C]0.051[/C][C]0.0043[/C][C]0.577[/C][C]0.0481[/C][C]0.2193[/C][/ROW]
[ROW][C]50[/C][C]0.0532[/C][C]0.0432[/C][C]0.0036[/C][C]0.4013[/C][C]0.0334[/C][C]0.1829[/C][/ROW]
[ROW][C]51[/C][C]0.0662[/C][C]0.0666[/C][C]0.0055[/C][C]0.9462[/C][C]0.0789[/C][C]0.2808[/C][/ROW]
[ROW][C]52[/C][C]0.0846[/C][C]0.1209[/C][C]0.0101[/C][C]3.1093[/C][C]0.2591[/C][C]0.509[/C][/ROW]
[ROW][C]53[/C][C]0.1009[/C][C]0.0973[/C][C]0.0081[/C][C]1.995[/C][C]0.1662[/C][C]0.4077[/C][/ROW]
[ROW][C]54[/C][C]0.1153[/C][C]0.1158[/C][C]0.0097[/C][C]2.8183[/C][C]0.2349[/C][C]0.4846[/C][/ROW]
[ROW][C]55[/C][C]0.1305[/C][C]0.1002[/C][C]0.0084[/C][C]2.1085[/C][C]0.1757[/C][C]0.4192[/C][/ROW]
[ROW][C]56[/C][C]0.1448[/C][C]0.0865[/C][C]0.0072[/C][C]1.5633[/C][C]0.1303[/C][C]0.3609[/C][/ROW]
[ROW][C]57[/C][C]0.1581[/C][C]0.0788[/C][C]0.0066[/C][C]1.2987[/C][C]0.1082[/C][C]0.329[/C][/ROW]
[ROW][C]58[/C][C]0.1714[/C][C]0.0852[/C][C]0.0071[/C][C]1.5157[/C][C]0.1263[/C][C]0.3554[/C][/ROW]
[ROW][C]59[/C][C]0.1841[/C][C]0.138[/C][C]0.0115[/C][C]3.9733[/C][C]0.3311[/C][C]0.5754[/C][/ROW]
[ROW][C]60[/C][C]0.1963[/C][C]0.1794[/C][C]0.0149[/C][C]6.7094[/C][C]0.5591[/C][C]0.7477[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3763&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3763&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
490.03630.0510.00430.5770.04810.2193
500.05320.04320.00360.40130.03340.1829
510.06620.06660.00550.94620.07890.2808
520.08460.12090.01013.10930.25910.509
530.10090.09730.00811.9950.16620.4077
540.11530.11580.00972.81830.23490.4846
550.13050.10020.00842.10850.17570.4192
560.14480.08650.00721.56330.13030.3609
570.15810.07880.00661.29870.10820.329
580.17140.08520.00711.51570.12630.3554
590.18410.1380.01153.97330.33110.5754
600.19630.17940.01496.70940.55910.7477



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