Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 15 Dec 2007 10:52:55 -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/15/t1197740326bayi0n6sbv5r27u.htm/, Retrieved Thu, 02 May 2024 15:31:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4088, Retrieved Thu, 02 May 2024 15:31:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast re...] [2007-12-15 17:52:55] [fef19078983b9fa83d10cb717d6f9786] [Current]
Feedback Forum

Post a new message
Dataseries X:
88,8
93,4
92,6
90,7
81,6
84,1
88,1
85,3
82,9
84,8
71,2
68,9
94,3
97,6
85,6
91,9
75,8
79,8
99
88,5
86,7
97,9
94,3
72,9
91,8
93,2
86,5
98,9
77,2
79,4
90,4
81,4
85,8
103,6
73,6
75,7
99,2
88,7
94,6
98,7
84,2
87,7
103,3
88,2
93,4
106,3
73,1
78,6
101,6
101,4
98,5
99
89,5
83,5
97,4
87,8
90,4
97,1
79,4
85




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4088&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 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[48])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.6100.393285.8165114.970.43550.99830.56370.9983
50101.488.89673.8486103.94350.05170.0490.51020.9101
5198.595.117780.0479110.18750.330.20690.52680.9842
529999.027783.7385114.3170.49860.5270.51680.9956
5389.584.311568.969599.65340.25370.03030.50570.7672
5483.587.810972.4628103.15910.2910.41460.50570.8803
5597.4103.381588.0243118.73860.22260.99440.50410.9992
5687.888.238272.8773103.59920.47770.12120.50190.8906
5790.493.427378.0657108.7890.34970.76360.50140.9707
5897.1106.320190.9579121.68230.11970.97890.5010.9998
5979.473.111257.748888.47360.21120.00110.50060.2419
608578.607263.244793.96970.20740.45970.50040.5004

\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 & 75.7 & - & - & - & - & - & - & - \tabularnewline
37 & 99.2 & - & - & - & - & - & - & - \tabularnewline
38 & 88.7 & - & - & - & - & - & - & - \tabularnewline
39 & 94.6 & - & - & - & - & - & - & - \tabularnewline
40 & 98.7 & - & - & - & - & - & - & - \tabularnewline
41 & 84.2 & - & - & - & - & - & - & - \tabularnewline
42 & 87.7 & - & - & - & - & - & - & - \tabularnewline
43 & 103.3 & - & - & - & - & - & - & - \tabularnewline
44 & 88.2 & - & - & - & - & - & - & - \tabularnewline
45 & 93.4 & - & - & - & - & - & - & - \tabularnewline
46 & 106.3 & - & - & - & - & - & - & - \tabularnewline
47 & 73.1 & - & - & - & - & - & - & - \tabularnewline
48 & 78.6 & - & - & - & - & - & - & - \tabularnewline
49 & 101.6 & 100.3932 & 85.8165 & 114.97 & 0.4355 & 0.9983 & 0.5637 & 0.9983 \tabularnewline
50 & 101.4 & 88.896 & 73.8486 & 103.9435 & 0.0517 & 0.049 & 0.5102 & 0.9101 \tabularnewline
51 & 98.5 & 95.1177 & 80.0479 & 110.1875 & 0.33 & 0.2069 & 0.5268 & 0.9842 \tabularnewline
52 & 99 & 99.0277 & 83.7385 & 114.317 & 0.4986 & 0.527 & 0.5168 & 0.9956 \tabularnewline
53 & 89.5 & 84.3115 & 68.9695 & 99.6534 & 0.2537 & 0.0303 & 0.5057 & 0.7672 \tabularnewline
54 & 83.5 & 87.8109 & 72.4628 & 103.1591 & 0.291 & 0.4146 & 0.5057 & 0.8803 \tabularnewline
55 & 97.4 & 103.3815 & 88.0243 & 118.7386 & 0.2226 & 0.9944 & 0.5041 & 0.9992 \tabularnewline
56 & 87.8 & 88.2382 & 72.8773 & 103.5992 & 0.4777 & 0.1212 & 0.5019 & 0.8906 \tabularnewline
57 & 90.4 & 93.4273 & 78.0657 & 108.789 & 0.3497 & 0.7636 & 0.5014 & 0.9707 \tabularnewline
58 & 97.1 & 106.3201 & 90.9579 & 121.6823 & 0.1197 & 0.9789 & 0.501 & 0.9998 \tabularnewline
59 & 79.4 & 73.1112 & 57.7488 & 88.4736 & 0.2112 & 0.0011 & 0.5006 & 0.2419 \tabularnewline
60 & 85 & 78.6072 & 63.2447 & 93.9697 & 0.2074 & 0.4597 & 0.5004 & 0.5004 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4088&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]75.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]99.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]88.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]94.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]98.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]84.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]87.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]88.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]78.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]101.6[/C][C]100.3932[/C][C]85.8165[/C][C]114.97[/C][C]0.4355[/C][C]0.9983[/C][C]0.5637[/C][C]0.9983[/C][/ROW]
[ROW][C]50[/C][C]101.4[/C][C]88.896[/C][C]73.8486[/C][C]103.9435[/C][C]0.0517[/C][C]0.049[/C][C]0.5102[/C][C]0.9101[/C][/ROW]
[ROW][C]51[/C][C]98.5[/C][C]95.1177[/C][C]80.0479[/C][C]110.1875[/C][C]0.33[/C][C]0.2069[/C][C]0.5268[/C][C]0.9842[/C][/ROW]
[ROW][C]52[/C][C]99[/C][C]99.0277[/C][C]83.7385[/C][C]114.317[/C][C]0.4986[/C][C]0.527[/C][C]0.5168[/C][C]0.9956[/C][/ROW]
[ROW][C]53[/C][C]89.5[/C][C]84.3115[/C][C]68.9695[/C][C]99.6534[/C][C]0.2537[/C][C]0.0303[/C][C]0.5057[/C][C]0.7672[/C][/ROW]
[ROW][C]54[/C][C]83.5[/C][C]87.8109[/C][C]72.4628[/C][C]103.1591[/C][C]0.291[/C][C]0.4146[/C][C]0.5057[/C][C]0.8803[/C][/ROW]
[ROW][C]55[/C][C]97.4[/C][C]103.3815[/C][C]88.0243[/C][C]118.7386[/C][C]0.2226[/C][C]0.9944[/C][C]0.5041[/C][C]0.9992[/C][/ROW]
[ROW][C]56[/C][C]87.8[/C][C]88.2382[/C][C]72.8773[/C][C]103.5992[/C][C]0.4777[/C][C]0.1212[/C][C]0.5019[/C][C]0.8906[/C][/ROW]
[ROW][C]57[/C][C]90.4[/C][C]93.4273[/C][C]78.0657[/C][C]108.789[/C][C]0.3497[/C][C]0.7636[/C][C]0.5014[/C][C]0.9707[/C][/ROW]
[ROW][C]58[/C][C]97.1[/C][C]106.3201[/C][C]90.9579[/C][C]121.6823[/C][C]0.1197[/C][C]0.9789[/C][C]0.501[/C][C]0.9998[/C][/ROW]
[ROW][C]59[/C][C]79.4[/C][C]73.1112[/C][C]57.7488[/C][C]88.4736[/C][C]0.2112[/C][C]0.0011[/C][C]0.5006[/C][C]0.2419[/C][/ROW]
[ROW][C]60[/C][C]85[/C][C]78.6072[/C][C]63.2447[/C][C]93.9697[/C][C]0.2074[/C][C]0.4597[/C][C]0.5004[/C][C]0.5004[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4088&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4088&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])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.6100.393285.8165114.970.43550.99830.56370.9983
50101.488.89673.8486103.94350.05170.0490.51020.9101
5198.595.117780.0479110.18750.330.20690.52680.9842
529999.027783.7385114.3170.49860.5270.51680.9956
5389.584.311568.969599.65340.25370.03030.50570.7672
5483.587.810972.4628103.15910.2910.41460.50570.8803
5597.4103.381588.0243118.73860.22260.99440.50410.9992
5687.888.238272.8773103.59920.47770.12120.50190.8906
5790.493.427378.0657108.7890.34970.76360.50140.9707
5897.1106.320190.9579121.68230.11970.97890.5010.9998
5979.473.111257.748888.47360.21120.00110.50060.2419
608578.607263.244793.96970.20740.45970.50040.5004







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.07410.0120.0011.45630.12140.3484
500.08640.14070.0117156.349313.02913.6096
510.08080.03560.00311.43980.95330.9764
520.0788-3e-0408e-041e-040.008
530.09280.06150.005126.92082.24341.4978
540.0892-0.04910.004118.58431.54871.2445
550.0758-0.05790.004835.77812.98151.7267
560.0888-0.0054e-040.1920.0160.1265
570.0839-0.03240.00279.16480.76370.8739
580.0737-0.08670.007285.01027.08422.6616
590.10720.0860.007239.5493.29571.8154
600.09970.08130.006840.86793.40571.8454

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0741 & 0.012 & 0.001 & 1.4563 & 0.1214 & 0.3484 \tabularnewline
50 & 0.0864 & 0.1407 & 0.0117 & 156.3493 & 13.0291 & 3.6096 \tabularnewline
51 & 0.0808 & 0.0356 & 0.003 & 11.4398 & 0.9533 & 0.9764 \tabularnewline
52 & 0.0788 & -3e-04 & 0 & 8e-04 & 1e-04 & 0.008 \tabularnewline
53 & 0.0928 & 0.0615 & 0.0051 & 26.9208 & 2.2434 & 1.4978 \tabularnewline
54 & 0.0892 & -0.0491 & 0.0041 & 18.5843 & 1.5487 & 1.2445 \tabularnewline
55 & 0.0758 & -0.0579 & 0.0048 & 35.7781 & 2.9815 & 1.7267 \tabularnewline
56 & 0.0888 & -0.005 & 4e-04 & 0.192 & 0.016 & 0.1265 \tabularnewline
57 & 0.0839 & -0.0324 & 0.0027 & 9.1648 & 0.7637 & 0.8739 \tabularnewline
58 & 0.0737 & -0.0867 & 0.0072 & 85.0102 & 7.0842 & 2.6616 \tabularnewline
59 & 0.1072 & 0.086 & 0.0072 & 39.549 & 3.2957 & 1.8154 \tabularnewline
60 & 0.0997 & 0.0813 & 0.0068 & 40.8679 & 3.4057 & 1.8454 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4088&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.0741[/C][C]0.012[/C][C]0.001[/C][C]1.4563[/C][C]0.1214[/C][C]0.3484[/C][/ROW]
[ROW][C]50[/C][C]0.0864[/C][C]0.1407[/C][C]0.0117[/C][C]156.3493[/C][C]13.0291[/C][C]3.6096[/C][/ROW]
[ROW][C]51[/C][C]0.0808[/C][C]0.0356[/C][C]0.003[/C][C]11.4398[/C][C]0.9533[/C][C]0.9764[/C][/ROW]
[ROW][C]52[/C][C]0.0788[/C][C]-3e-04[/C][C]0[/C][C]8e-04[/C][C]1e-04[/C][C]0.008[/C][/ROW]
[ROW][C]53[/C][C]0.0928[/C][C]0.0615[/C][C]0.0051[/C][C]26.9208[/C][C]2.2434[/C][C]1.4978[/C][/ROW]
[ROW][C]54[/C][C]0.0892[/C][C]-0.0491[/C][C]0.0041[/C][C]18.5843[/C][C]1.5487[/C][C]1.2445[/C][/ROW]
[ROW][C]55[/C][C]0.0758[/C][C]-0.0579[/C][C]0.0048[/C][C]35.7781[/C][C]2.9815[/C][C]1.7267[/C][/ROW]
[ROW][C]56[/C][C]0.0888[/C][C]-0.005[/C][C]4e-04[/C][C]0.192[/C][C]0.016[/C][C]0.1265[/C][/ROW]
[ROW][C]57[/C][C]0.0839[/C][C]-0.0324[/C][C]0.0027[/C][C]9.1648[/C][C]0.7637[/C][C]0.8739[/C][/ROW]
[ROW][C]58[/C][C]0.0737[/C][C]-0.0867[/C][C]0.0072[/C][C]85.0102[/C][C]7.0842[/C][C]2.6616[/C][/ROW]
[ROW][C]59[/C][C]0.1072[/C][C]0.086[/C][C]0.0072[/C][C]39.549[/C][C]3.2957[/C][C]1.8154[/C][/ROW]
[ROW][C]60[/C][C]0.0997[/C][C]0.0813[/C][C]0.0068[/C][C]40.8679[/C][C]3.4057[/C][C]1.8454[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4088&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4088&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.07410.0120.0011.45630.12140.3484
500.08640.14070.0117156.349313.02913.6096
510.08080.03560.00311.43980.95330.9764
520.0788-3e-0408e-041e-040.008
530.09280.06150.005126.92082.24341.4978
540.0892-0.04910.004118.58431.54871.2445
550.0758-0.05790.004835.77812.98151.7267
560.0888-0.0054e-040.1920.0160.1265
570.0839-0.03240.00279.16480.76370.8739
580.0737-0.08670.007285.01027.08422.6616
590.10720.0860.007239.5493.29571.8154
600.09970.08130.006840.86793.40571.8454



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