Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 12 Dec 2007 02:16:08 -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/12/t11974500929pl2ucb08v6anpd.htm/, Retrieved Thu, 02 May 2024 20:22:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3181, Retrieved Thu, 02 May 2024 20:22:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact210
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [voorspelling export] [2007-12-12 09:16:08] [c34baf302affc2b9b7cce5b975b1f71e] [Current]
Feedback Forum

Post a new message
Dataseries X:
733.6
844.9
864.3
833.5
814.9
820.4
710.8
773.1
801.2
832.9
808.3
817.2
745.5
932.6
1057.0
879.9
1089.5
903.0
846.1
959.1
952.0
1092.5
1188.9
996.7
1034.3
898.2
1111.6
900.5
1049.2
1010.9
875.9
849.9
713.4
918.6
912.5
767.0
902.2
891.9
874.0
930.9
944.2
935.9
937.1
885.1
892.4
987.3
946.3
799.6
875.4
846.2
880.6
885.7
868.9
882.5
789.6
773.3
804.3
817.8
836.7
721.8




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3181&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 time15 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])
36767-------
37902.2-------
38891.9-------
39874-------
40930.9-------
41944.2-------
42935.9-------
43937.1-------
44885.1-------
45892.4-------
46987.3-------
47946.3-------
48799.6-------
49875.4870.5629707.55211033.57380.47680.80320.35180.8032
50846.2851.4231671.81861031.02760.47730.39680.32930.7141
51880.6894.3556679.83751108.87360.450.670.57380.8067
52885.7869.2142623.73151114.69690.44760.46380.31120.7108
53868.9893.8536633.37091154.33630.42550.52450.35240.7609
54882.5874.6828590.52761158.83790.47850.51590.33640.6977
55789.6833.9841532.80681135.16140.38640.37610.25110.5885
56773.3828.3465513.16531143.52770.36610.59520.36210.5709
57804.3821.0392489.55081152.52750.46060.61110.33650.5504
58817.8887.1895543.39331230.98570.34620.68170.28410.6912
59836.7879.4032523.5581235.24840.4070.63280.35630.6699
60721.8796.0574428.33451163.78020.34610.41420.49250.4925

\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 & 767 & - & - & - & - & - & - & - \tabularnewline
37 & 902.2 & - & - & - & - & - & - & - \tabularnewline
38 & 891.9 & - & - & - & - & - & - & - \tabularnewline
39 & 874 & - & - & - & - & - & - & - \tabularnewline
40 & 930.9 & - & - & - & - & - & - & - \tabularnewline
41 & 944.2 & - & - & - & - & - & - & - \tabularnewline
42 & 935.9 & - & - & - & - & - & - & - \tabularnewline
43 & 937.1 & - & - & - & - & - & - & - \tabularnewline
44 & 885.1 & - & - & - & - & - & - & - \tabularnewline
45 & 892.4 & - & - & - & - & - & - & - \tabularnewline
46 & 987.3 & - & - & - & - & - & - & - \tabularnewline
47 & 946.3 & - & - & - & - & - & - & - \tabularnewline
48 & 799.6 & - & - & - & - & - & - & - \tabularnewline
49 & 875.4 & 870.5629 & 707.5521 & 1033.5738 & 0.4768 & 0.8032 & 0.3518 & 0.8032 \tabularnewline
50 & 846.2 & 851.4231 & 671.8186 & 1031.0276 & 0.4773 & 0.3968 & 0.3293 & 0.7141 \tabularnewline
51 & 880.6 & 894.3556 & 679.8375 & 1108.8736 & 0.45 & 0.67 & 0.5738 & 0.8067 \tabularnewline
52 & 885.7 & 869.2142 & 623.7315 & 1114.6969 & 0.4476 & 0.4638 & 0.3112 & 0.7108 \tabularnewline
53 & 868.9 & 893.8536 & 633.3709 & 1154.3363 & 0.4255 & 0.5245 & 0.3524 & 0.7609 \tabularnewline
54 & 882.5 & 874.6828 & 590.5276 & 1158.8379 & 0.4785 & 0.5159 & 0.3364 & 0.6977 \tabularnewline
55 & 789.6 & 833.9841 & 532.8068 & 1135.1614 & 0.3864 & 0.3761 & 0.2511 & 0.5885 \tabularnewline
56 & 773.3 & 828.3465 & 513.1653 & 1143.5277 & 0.3661 & 0.5952 & 0.3621 & 0.5709 \tabularnewline
57 & 804.3 & 821.0392 & 489.5508 & 1152.5275 & 0.4606 & 0.6111 & 0.3365 & 0.5504 \tabularnewline
58 & 817.8 & 887.1895 & 543.3933 & 1230.9857 & 0.3462 & 0.6817 & 0.2841 & 0.6912 \tabularnewline
59 & 836.7 & 879.4032 & 523.558 & 1235.2484 & 0.407 & 0.6328 & 0.3563 & 0.6699 \tabularnewline
60 & 721.8 & 796.0574 & 428.3345 & 1163.7802 & 0.3461 & 0.4142 & 0.4925 & 0.4925 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3181&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]767[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]902.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]891.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]874[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]930.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]944.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]935.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]937.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]885.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]892.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]987.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]946.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]799.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]875.4[/C][C]870.5629[/C][C]707.5521[/C][C]1033.5738[/C][C]0.4768[/C][C]0.8032[/C][C]0.3518[/C][C]0.8032[/C][/ROW]
[ROW][C]50[/C][C]846.2[/C][C]851.4231[/C][C]671.8186[/C][C]1031.0276[/C][C]0.4773[/C][C]0.3968[/C][C]0.3293[/C][C]0.7141[/C][/ROW]
[ROW][C]51[/C][C]880.6[/C][C]894.3556[/C][C]679.8375[/C][C]1108.8736[/C][C]0.45[/C][C]0.67[/C][C]0.5738[/C][C]0.8067[/C][/ROW]
[ROW][C]52[/C][C]885.7[/C][C]869.2142[/C][C]623.7315[/C][C]1114.6969[/C][C]0.4476[/C][C]0.4638[/C][C]0.3112[/C][C]0.7108[/C][/ROW]
[ROW][C]53[/C][C]868.9[/C][C]893.8536[/C][C]633.3709[/C][C]1154.3363[/C][C]0.4255[/C][C]0.5245[/C][C]0.3524[/C][C]0.7609[/C][/ROW]
[ROW][C]54[/C][C]882.5[/C][C]874.6828[/C][C]590.5276[/C][C]1158.8379[/C][C]0.4785[/C][C]0.5159[/C][C]0.3364[/C][C]0.6977[/C][/ROW]
[ROW][C]55[/C][C]789.6[/C][C]833.9841[/C][C]532.8068[/C][C]1135.1614[/C][C]0.3864[/C][C]0.3761[/C][C]0.2511[/C][C]0.5885[/C][/ROW]
[ROW][C]56[/C][C]773.3[/C][C]828.3465[/C][C]513.1653[/C][C]1143.5277[/C][C]0.3661[/C][C]0.5952[/C][C]0.3621[/C][C]0.5709[/C][/ROW]
[ROW][C]57[/C][C]804.3[/C][C]821.0392[/C][C]489.5508[/C][C]1152.5275[/C][C]0.4606[/C][C]0.6111[/C][C]0.3365[/C][C]0.5504[/C][/ROW]
[ROW][C]58[/C][C]817.8[/C][C]887.1895[/C][C]543.3933[/C][C]1230.9857[/C][C]0.3462[/C][C]0.6817[/C][C]0.2841[/C][C]0.6912[/C][/ROW]
[ROW][C]59[/C][C]836.7[/C][C]879.4032[/C][C]523.558[/C][C]1235.2484[/C][C]0.407[/C][C]0.6328[/C][C]0.3563[/C][C]0.6699[/C][/ROW]
[ROW][C]60[/C][C]721.8[/C][C]796.0574[/C][C]428.3345[/C][C]1163.7802[/C][C]0.3461[/C][C]0.4142[/C][C]0.4925[/C][C]0.4925[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3181&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3181&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])
36767-------
37902.2-------
38891.9-------
39874-------
40930.9-------
41944.2-------
42935.9-------
43937.1-------
44885.1-------
45892.4-------
46987.3-------
47946.3-------
48799.6-------
49875.4870.5629707.55211033.57380.47680.80320.35180.8032
50846.2851.4231671.81861031.02760.47730.39680.32930.7141
51880.6894.3556679.83751108.87360.450.670.57380.8067
52885.7869.2142623.73151114.69690.44760.46380.31120.7108
53868.9893.8536633.37091154.33630.42550.52450.35240.7609
54882.5874.6828590.52761158.83790.47850.51590.33640.6977
55789.6833.9841532.80681135.16140.38640.37610.25110.5885
56773.3828.3465513.16531143.52770.36610.59520.36210.5709
57804.3821.0392489.55081152.52750.46060.61110.33650.5504
58817.8887.1895543.39331230.98570.34620.68170.28410.6912
59836.7879.4032523.5581235.24840.4070.63280.35630.6699
60721.8796.0574428.33451163.78020.34610.41420.49250.4925







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.09550.00565e-0423.39711.94981.3963
500.1076-0.00615e-0427.28082.27341.5078
510.1224-0.01540.0013189.215915.7683.9709
520.14410.0190.0016271.78122.64844.759
530.1487-0.02790.0023622.683251.89037.2035
540.16570.00897e-0461.10925.09242.2566
550.1843-0.05320.00441969.9501164.162512.8126
560.1941-0.06650.00553030.1169252.509715.8906
570.206-0.02040.0017280.199223.34994.8322
580.1977-0.07820.00654814.9043401.24220.031
590.2065-0.04860.0041823.5648151.963712.3274
600.2357-0.09330.00785514.155459.512921.4363

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0955 & 0.0056 & 5e-04 & 23.3971 & 1.9498 & 1.3963 \tabularnewline
50 & 0.1076 & -0.0061 & 5e-04 & 27.2808 & 2.2734 & 1.5078 \tabularnewline
51 & 0.1224 & -0.0154 & 0.0013 & 189.2159 & 15.768 & 3.9709 \tabularnewline
52 & 0.1441 & 0.019 & 0.0016 & 271.781 & 22.6484 & 4.759 \tabularnewline
53 & 0.1487 & -0.0279 & 0.0023 & 622.6832 & 51.8903 & 7.2035 \tabularnewline
54 & 0.1657 & 0.0089 & 7e-04 & 61.1092 & 5.0924 & 2.2566 \tabularnewline
55 & 0.1843 & -0.0532 & 0.0044 & 1969.9501 & 164.1625 & 12.8126 \tabularnewline
56 & 0.1941 & -0.0665 & 0.0055 & 3030.1169 & 252.5097 & 15.8906 \tabularnewline
57 & 0.206 & -0.0204 & 0.0017 & 280.1992 & 23.3499 & 4.8322 \tabularnewline
58 & 0.1977 & -0.0782 & 0.0065 & 4814.9043 & 401.242 & 20.031 \tabularnewline
59 & 0.2065 & -0.0486 & 0.004 & 1823.5648 & 151.9637 & 12.3274 \tabularnewline
60 & 0.2357 & -0.0933 & 0.0078 & 5514.155 & 459.5129 & 21.4363 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3181&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.0955[/C][C]0.0056[/C][C]5e-04[/C][C]23.3971[/C][C]1.9498[/C][C]1.3963[/C][/ROW]
[ROW][C]50[/C][C]0.1076[/C][C]-0.0061[/C][C]5e-04[/C][C]27.2808[/C][C]2.2734[/C][C]1.5078[/C][/ROW]
[ROW][C]51[/C][C]0.1224[/C][C]-0.0154[/C][C]0.0013[/C][C]189.2159[/C][C]15.768[/C][C]3.9709[/C][/ROW]
[ROW][C]52[/C][C]0.1441[/C][C]0.019[/C][C]0.0016[/C][C]271.781[/C][C]22.6484[/C][C]4.759[/C][/ROW]
[ROW][C]53[/C][C]0.1487[/C][C]-0.0279[/C][C]0.0023[/C][C]622.6832[/C][C]51.8903[/C][C]7.2035[/C][/ROW]
[ROW][C]54[/C][C]0.1657[/C][C]0.0089[/C][C]7e-04[/C][C]61.1092[/C][C]5.0924[/C][C]2.2566[/C][/ROW]
[ROW][C]55[/C][C]0.1843[/C][C]-0.0532[/C][C]0.0044[/C][C]1969.9501[/C][C]164.1625[/C][C]12.8126[/C][/ROW]
[ROW][C]56[/C][C]0.1941[/C][C]-0.0665[/C][C]0.0055[/C][C]3030.1169[/C][C]252.5097[/C][C]15.8906[/C][/ROW]
[ROW][C]57[/C][C]0.206[/C][C]-0.0204[/C][C]0.0017[/C][C]280.1992[/C][C]23.3499[/C][C]4.8322[/C][/ROW]
[ROW][C]58[/C][C]0.1977[/C][C]-0.0782[/C][C]0.0065[/C][C]4814.9043[/C][C]401.242[/C][C]20.031[/C][/ROW]
[ROW][C]59[/C][C]0.2065[/C][C]-0.0486[/C][C]0.004[/C][C]1823.5648[/C][C]151.9637[/C][C]12.3274[/C][/ROW]
[ROW][C]60[/C][C]0.2357[/C][C]-0.0933[/C][C]0.0078[/C][C]5514.155[/C][C]459.5129[/C][C]21.4363[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3181&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3181&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.09550.00565e-0423.39711.94981.3963
500.1076-0.00615e-0427.28082.27341.5078
510.1224-0.01540.0013189.215915.7683.9709
520.14410.0190.0016271.78122.64844.759
530.1487-0.02790.0023622.683251.89037.2035
540.16570.00897e-0461.10925.09242.2566
550.1843-0.05320.00441969.9501164.162512.8126
560.1941-0.06650.00553030.1169252.509715.8906
570.206-0.02040.0017280.199223.34994.8322
580.1977-0.07820.00654814.9043401.24220.031
590.2065-0.04860.0041823.5648151.963712.3274
600.2357-0.09330.00785514.155459.512921.4363



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