Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 04:06:29 -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/13/t1197543090hd4wrfqig0g1ayh.htm/, Retrieved Sun, 05 May 2024 12:11:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3434, Retrieved Sun, 05 May 2024 12:11:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper voorspellin...] [2007-12-13 11:06:29] [cb172450b25aceeff04d58e88e905157] [Current]
Feedback Forum

Post a new message
Dataseries X:
0,8833
0,87
0,8758
0,8858
0,917
0,9554
0,9922
0,9778
0,9808
0,9811
1,0014
1,0183
1,0622
1,0773
1,0807
1,0848
1,1582
1,1663
1,1372
1,1139
1,1222
1,1692
1,1702
1,2286
1,2613
1,2646
1,2262
1,1985
1,2007
1,2138
1,2266
1,2176
1,2218
1,249
1,2991
1,3408
1,3119
1,3014
1,3201
1,2938
1,2694
1,2165
1,2037
1,2292
1,2256
1,2015
1,1786
1,1856
1,2103
1,1938
1,202
1,2271
1,277
1,265
1,2684
1,2811
1,2727
1,2611
1,2881
1,3213




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3434&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3434&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3434&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
361.3408-------
371.3119-------
381.3014-------
391.3201-------
401.2938-------
411.2694-------
421.2165-------
431.2037-------
441.2292-------
451.2256-------
461.2015-------
471.1786-------
481.1856-------
491.21031.18791.13841.23740.18780.536700.5367
501.19381.18721.10251.27190.43920.29640.00410.5146
511.2021.18871.07961.29780.40550.46350.00910.5222
521.22711.1871.0581.3160.27120.40990.05230.5086
531.2771.18531.03921.33150.10950.28770.12980.4986
541.2651.18161.02011.34310.15570.12340.33590.4805
551.26841.18061.00511.35620.16350.1730.39830.4778
561.28111.18240.99391.3710.15250.18570.31340.4868
571.27271.18210.98151.38280.18820.16690.33560.4866
581.26111.18030.96821.39250.22780.19670.42250.4806
591.28811.17850.95551.40150.16770.23390.49960.475
601.32131.17880.94541.41210.11560.17920.47710.4771

\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 & 1.3408 & - & - & - & - & - & - & - \tabularnewline
37 & 1.3119 & - & - & - & - & - & - & - \tabularnewline
38 & 1.3014 & - & - & - & - & - & - & - \tabularnewline
39 & 1.3201 & - & - & - & - & - & - & - \tabularnewline
40 & 1.2938 & - & - & - & - & - & - & - \tabularnewline
41 & 1.2694 & - & - & - & - & - & - & - \tabularnewline
42 & 1.2165 & - & - & - & - & - & - & - \tabularnewline
43 & 1.2037 & - & - & - & - & - & - & - \tabularnewline
44 & 1.2292 & - & - & - & - & - & - & - \tabularnewline
45 & 1.2256 & - & - & - & - & - & - & - \tabularnewline
46 & 1.2015 & - & - & - & - & - & - & - \tabularnewline
47 & 1.1786 & - & - & - & - & - & - & - \tabularnewline
48 & 1.1856 & - & - & - & - & - & - & - \tabularnewline
49 & 1.2103 & 1.1879 & 1.1384 & 1.2374 & 0.1878 & 0.5367 & 0 & 0.5367 \tabularnewline
50 & 1.1938 & 1.1872 & 1.1025 & 1.2719 & 0.4392 & 0.2964 & 0.0041 & 0.5146 \tabularnewline
51 & 1.202 & 1.1887 & 1.0796 & 1.2978 & 0.4055 & 0.4635 & 0.0091 & 0.5222 \tabularnewline
52 & 1.2271 & 1.187 & 1.058 & 1.316 & 0.2712 & 0.4099 & 0.0523 & 0.5086 \tabularnewline
53 & 1.277 & 1.1853 & 1.0392 & 1.3315 & 0.1095 & 0.2877 & 0.1298 & 0.4986 \tabularnewline
54 & 1.265 & 1.1816 & 1.0201 & 1.3431 & 0.1557 & 0.1234 & 0.3359 & 0.4805 \tabularnewline
55 & 1.2684 & 1.1806 & 1.0051 & 1.3562 & 0.1635 & 0.173 & 0.3983 & 0.4778 \tabularnewline
56 & 1.2811 & 1.1824 & 0.9939 & 1.371 & 0.1525 & 0.1857 & 0.3134 & 0.4868 \tabularnewline
57 & 1.2727 & 1.1821 & 0.9815 & 1.3828 & 0.1882 & 0.1669 & 0.3356 & 0.4866 \tabularnewline
58 & 1.2611 & 1.1803 & 0.9682 & 1.3925 & 0.2278 & 0.1967 & 0.4225 & 0.4806 \tabularnewline
59 & 1.2881 & 1.1785 & 0.9555 & 1.4015 & 0.1677 & 0.2339 & 0.4996 & 0.475 \tabularnewline
60 & 1.3213 & 1.1788 & 0.9454 & 1.4121 & 0.1156 & 0.1792 & 0.4771 & 0.4771 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3434&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]1.3408[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1.3119[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.3014[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.3201[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.2938[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.2694[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.2165[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1.2037[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.2292[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.2256[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.2015[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.1786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.1856[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.2103[/C][C]1.1879[/C][C]1.1384[/C][C]1.2374[/C][C]0.1878[/C][C]0.5367[/C][C]0[/C][C]0.5367[/C][/ROW]
[ROW][C]50[/C][C]1.1938[/C][C]1.1872[/C][C]1.1025[/C][C]1.2719[/C][C]0.4392[/C][C]0.2964[/C][C]0.0041[/C][C]0.5146[/C][/ROW]
[ROW][C]51[/C][C]1.202[/C][C]1.1887[/C][C]1.0796[/C][C]1.2978[/C][C]0.4055[/C][C]0.4635[/C][C]0.0091[/C][C]0.5222[/C][/ROW]
[ROW][C]52[/C][C]1.2271[/C][C]1.187[/C][C]1.058[/C][C]1.316[/C][C]0.2712[/C][C]0.4099[/C][C]0.0523[/C][C]0.5086[/C][/ROW]
[ROW][C]53[/C][C]1.277[/C][C]1.1853[/C][C]1.0392[/C][C]1.3315[/C][C]0.1095[/C][C]0.2877[/C][C]0.1298[/C][C]0.4986[/C][/ROW]
[ROW][C]54[/C][C]1.265[/C][C]1.1816[/C][C]1.0201[/C][C]1.3431[/C][C]0.1557[/C][C]0.1234[/C][C]0.3359[/C][C]0.4805[/C][/ROW]
[ROW][C]55[/C][C]1.2684[/C][C]1.1806[/C][C]1.0051[/C][C]1.3562[/C][C]0.1635[/C][C]0.173[/C][C]0.3983[/C][C]0.4778[/C][/ROW]
[ROW][C]56[/C][C]1.2811[/C][C]1.1824[/C][C]0.9939[/C][C]1.371[/C][C]0.1525[/C][C]0.1857[/C][C]0.3134[/C][C]0.4868[/C][/ROW]
[ROW][C]57[/C][C]1.2727[/C][C]1.1821[/C][C]0.9815[/C][C]1.3828[/C][C]0.1882[/C][C]0.1669[/C][C]0.3356[/C][C]0.4866[/C][/ROW]
[ROW][C]58[/C][C]1.2611[/C][C]1.1803[/C][C]0.9682[/C][C]1.3925[/C][C]0.2278[/C][C]0.1967[/C][C]0.4225[/C][C]0.4806[/C][/ROW]
[ROW][C]59[/C][C]1.2881[/C][C]1.1785[/C][C]0.9555[/C][C]1.4015[/C][C]0.1677[/C][C]0.2339[/C][C]0.4996[/C][C]0.475[/C][/ROW]
[ROW][C]60[/C][C]1.3213[/C][C]1.1788[/C][C]0.9454[/C][C]1.4121[/C][C]0.1156[/C][C]0.1792[/C][C]0.4771[/C][C]0.4771[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3434&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3434&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])
361.3408-------
371.3119-------
381.3014-------
391.3201-------
401.2938-------
411.2694-------
421.2165-------
431.2037-------
441.2292-------
451.2256-------
461.2015-------
471.1786-------
481.1856-------
491.21031.18791.13841.23740.18780.536700.5367
501.19381.18721.10251.27190.43920.29640.00410.5146
511.2021.18871.07961.29780.40550.46350.00910.5222
521.22711.1871.0581.3160.27120.40990.05230.5086
531.2771.18531.03921.33150.10950.28770.12980.4986
541.2651.18161.02011.34310.15570.12340.33590.4805
551.26841.18061.00511.35620.16350.1730.39830.4778
561.28111.18240.99391.3710.15250.18570.31340.4868
571.27271.18210.98151.38280.18820.16690.33560.4866
581.26111.18030.96821.39250.22780.19670.42250.4806
591.28811.17850.95551.40150.16770.23390.49960.475
601.32131.17880.94541.41210.11560.17920.47710.4771







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.02130.01880.00165e-0400.0065
500.03640.00565e-04000.0019
510.04680.01129e-042e-0400.0038
520.05540.03380.00280.00161e-040.0116
530.06290.07730.00640.00847e-040.0265
540.06970.07060.00590.0076e-040.0241
550.07590.07440.00620.00776e-040.0253
560.08140.08350.0070.00978e-040.0285
570.08660.07660.00640.00827e-040.0261
580.09170.06840.00570.00655e-040.0233
590.09650.0930.00780.0120.0010.0316
600.1010.12090.01010.02030.00170.0411

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0213 & 0.0188 & 0.0016 & 5e-04 & 0 & 0.0065 \tabularnewline
50 & 0.0364 & 0.0056 & 5e-04 & 0 & 0 & 0.0019 \tabularnewline
51 & 0.0468 & 0.0112 & 9e-04 & 2e-04 & 0 & 0.0038 \tabularnewline
52 & 0.0554 & 0.0338 & 0.0028 & 0.0016 & 1e-04 & 0.0116 \tabularnewline
53 & 0.0629 & 0.0773 & 0.0064 & 0.0084 & 7e-04 & 0.0265 \tabularnewline
54 & 0.0697 & 0.0706 & 0.0059 & 0.007 & 6e-04 & 0.0241 \tabularnewline
55 & 0.0759 & 0.0744 & 0.0062 & 0.0077 & 6e-04 & 0.0253 \tabularnewline
56 & 0.0814 & 0.0835 & 0.007 & 0.0097 & 8e-04 & 0.0285 \tabularnewline
57 & 0.0866 & 0.0766 & 0.0064 & 0.0082 & 7e-04 & 0.0261 \tabularnewline
58 & 0.0917 & 0.0684 & 0.0057 & 0.0065 & 5e-04 & 0.0233 \tabularnewline
59 & 0.0965 & 0.093 & 0.0078 & 0.012 & 0.001 & 0.0316 \tabularnewline
60 & 0.101 & 0.1209 & 0.0101 & 0.0203 & 0.0017 & 0.0411 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3434&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.0213[/C][C]0.0188[/C][C]0.0016[/C][C]5e-04[/C][C]0[/C][C]0.0065[/C][/ROW]
[ROW][C]50[/C][C]0.0364[/C][C]0.0056[/C][C]5e-04[/C][C]0[/C][C]0[/C][C]0.0019[/C][/ROW]
[ROW][C]51[/C][C]0.0468[/C][C]0.0112[/C][C]9e-04[/C][C]2e-04[/C][C]0[/C][C]0.0038[/C][/ROW]
[ROW][C]52[/C][C]0.0554[/C][C]0.0338[/C][C]0.0028[/C][C]0.0016[/C][C]1e-04[/C][C]0.0116[/C][/ROW]
[ROW][C]53[/C][C]0.0629[/C][C]0.0773[/C][C]0.0064[/C][C]0.0084[/C][C]7e-04[/C][C]0.0265[/C][/ROW]
[ROW][C]54[/C][C]0.0697[/C][C]0.0706[/C][C]0.0059[/C][C]0.007[/C][C]6e-04[/C][C]0.0241[/C][/ROW]
[ROW][C]55[/C][C]0.0759[/C][C]0.0744[/C][C]0.0062[/C][C]0.0077[/C][C]6e-04[/C][C]0.0253[/C][/ROW]
[ROW][C]56[/C][C]0.0814[/C][C]0.0835[/C][C]0.007[/C][C]0.0097[/C][C]8e-04[/C][C]0.0285[/C][/ROW]
[ROW][C]57[/C][C]0.0866[/C][C]0.0766[/C][C]0.0064[/C][C]0.0082[/C][C]7e-04[/C][C]0.0261[/C][/ROW]
[ROW][C]58[/C][C]0.0917[/C][C]0.0684[/C][C]0.0057[/C][C]0.0065[/C][C]5e-04[/C][C]0.0233[/C][/ROW]
[ROW][C]59[/C][C]0.0965[/C][C]0.093[/C][C]0.0078[/C][C]0.012[/C][C]0.001[/C][C]0.0316[/C][/ROW]
[ROW][C]60[/C][C]0.101[/C][C]0.1209[/C][C]0.0101[/C][C]0.0203[/C][C]0.0017[/C][C]0.0411[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3434&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3434&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.02130.01880.00165e-0400.0065
500.03640.00565e-04000.0019
510.04680.01129e-042e-0400.0038
520.05540.03380.00280.00161e-040.0116
530.06290.07730.00640.00847e-040.0265
540.06970.07060.00590.0076e-040.0241
550.07590.07440.00620.00776e-040.0253
560.08140.08350.0070.00978e-040.0285
570.08660.07660.00640.00827e-040.0261
580.09170.06840.00570.00655e-040.0233
590.09650.0930.00780.0120.0010.0316
600.1010.12090.01010.02030.00170.0411



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