Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 05:41:26 -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/07/t1197030496ynxhrwp93i55h70.htm/, Retrieved Sun, 28 Apr 2024 23:16:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2781, Retrieved Sun, 28 Apr 2024 23:16:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWorkshop 9 question 1, intermediaire goederen
Estimated Impact189
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Workshop 9 questi...] [2007-12-07 12:41:26] [181c187d2008ac66a37ecc12859b08c5] [Current]
Feedback Forum

Post a new message
Dataseries X:
99
115,4
106,9
107,1
99,3
99,2
108,3
105,6
99,5
107,4
93,1
88,1
110,7
113,1
99,6
93,6
98,6
99,6
114,3
107,8
101,2
112,5
100,5
93,9
116,2
112
106,4
95,7
96
95,8
103
102,2
98,4
111,4
86,6
91,3
107,9
101,8
104,4
93,4
100,1
98,5
112,9
101,4
107,1
110,8
90,3
95,5
111,4
113
107,5
95,9
106,3
105,2
117,2
106,9
108,2
110
96,1
100,6




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=2781&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=2781&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2781&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])
3691.3-------
37107.9-------
38101.8-------
39104.4-------
4093.4-------
41100.1-------
4298.5-------
43112.9-------
44101.4-------
45107.1-------
46110.8-------
4790.3-------
4895.5-------
49111.4111.4123100.7727122.05190.49910.99830.74120.9983
50113103.254791.9203114.5890.0460.07950.59930.91
51107.5105.829793.6703117.98910.39390.12390.59110.952
5295.993.873281.6557106.09060.37250.01440.53030.3971
53106.3100.69988.3373113.06080.18730.77660.53780.7951
54105.298.634686.2696110.99970.1490.11220.50850.6904
55117.2113.1602100.7668125.55350.26140.8960.51640.9974
56106.9101.425489.032113.81880.19330.00630.50160.8256
57108.2107.217794.8182119.61720.43830.520.50740.968
58110110.794998.3953123.19450.450.65920.49970.9922
5996.190.355777.9546102.75670.1820.0010.50350.2081
60100.695.489683.0885107.89080.20960.46160.49930.4993

\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 & 91.3 & - & - & - & - & - & - & - \tabularnewline
37 & 107.9 & - & - & - & - & - & - & - \tabularnewline
38 & 101.8 & - & - & - & - & - & - & - \tabularnewline
39 & 104.4 & - & - & - & - & - & - & - \tabularnewline
40 & 93.4 & - & - & - & - & - & - & - \tabularnewline
41 & 100.1 & - & - & - & - & - & - & - \tabularnewline
42 & 98.5 & - & - & - & - & - & - & - \tabularnewline
43 & 112.9 & - & - & - & - & - & - & - \tabularnewline
44 & 101.4 & - & - & - & - & - & - & - \tabularnewline
45 & 107.1 & - & - & - & - & - & - & - \tabularnewline
46 & 110.8 & - & - & - & - & - & - & - \tabularnewline
47 & 90.3 & - & - & - & - & - & - & - \tabularnewline
48 & 95.5 & - & - & - & - & - & - & - \tabularnewline
49 & 111.4 & 111.4123 & 100.7727 & 122.0519 & 0.4991 & 0.9983 & 0.7412 & 0.9983 \tabularnewline
50 & 113 & 103.2547 & 91.9203 & 114.589 & 0.046 & 0.0795 & 0.5993 & 0.91 \tabularnewline
51 & 107.5 & 105.8297 & 93.6703 & 117.9891 & 0.3939 & 0.1239 & 0.5911 & 0.952 \tabularnewline
52 & 95.9 & 93.8732 & 81.6557 & 106.0906 & 0.3725 & 0.0144 & 0.5303 & 0.3971 \tabularnewline
53 & 106.3 & 100.699 & 88.3373 & 113.0608 & 0.1873 & 0.7766 & 0.5378 & 0.7951 \tabularnewline
54 & 105.2 & 98.6346 & 86.2696 & 110.9997 & 0.149 & 0.1122 & 0.5085 & 0.6904 \tabularnewline
55 & 117.2 & 113.1602 & 100.7668 & 125.5535 & 0.2614 & 0.896 & 0.5164 & 0.9974 \tabularnewline
56 & 106.9 & 101.4254 & 89.032 & 113.8188 & 0.1933 & 0.0063 & 0.5016 & 0.8256 \tabularnewline
57 & 108.2 & 107.2177 & 94.8182 & 119.6172 & 0.4383 & 0.52 & 0.5074 & 0.968 \tabularnewline
58 & 110 & 110.7949 & 98.3953 & 123.1945 & 0.45 & 0.6592 & 0.4997 & 0.9922 \tabularnewline
59 & 96.1 & 90.3557 & 77.9546 & 102.7567 & 0.182 & 0.001 & 0.5035 & 0.2081 \tabularnewline
60 & 100.6 & 95.4896 & 83.0885 & 107.8908 & 0.2096 & 0.4616 & 0.4993 & 0.4993 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2781&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]91.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]107.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]101.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]100.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]98.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]101.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]110.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]90.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]111.4[/C][C]111.4123[/C][C]100.7727[/C][C]122.0519[/C][C]0.4991[/C][C]0.9983[/C][C]0.7412[/C][C]0.9983[/C][/ROW]
[ROW][C]50[/C][C]113[/C][C]103.2547[/C][C]91.9203[/C][C]114.589[/C][C]0.046[/C][C]0.0795[/C][C]0.5993[/C][C]0.91[/C][/ROW]
[ROW][C]51[/C][C]107.5[/C][C]105.8297[/C][C]93.6703[/C][C]117.9891[/C][C]0.3939[/C][C]0.1239[/C][C]0.5911[/C][C]0.952[/C][/ROW]
[ROW][C]52[/C][C]95.9[/C][C]93.8732[/C][C]81.6557[/C][C]106.0906[/C][C]0.3725[/C][C]0.0144[/C][C]0.5303[/C][C]0.3971[/C][/ROW]
[ROW][C]53[/C][C]106.3[/C][C]100.699[/C][C]88.3373[/C][C]113.0608[/C][C]0.1873[/C][C]0.7766[/C][C]0.5378[/C][C]0.7951[/C][/ROW]
[ROW][C]54[/C][C]105.2[/C][C]98.6346[/C][C]86.2696[/C][C]110.9997[/C][C]0.149[/C][C]0.1122[/C][C]0.5085[/C][C]0.6904[/C][/ROW]
[ROW][C]55[/C][C]117.2[/C][C]113.1602[/C][C]100.7668[/C][C]125.5535[/C][C]0.2614[/C][C]0.896[/C][C]0.5164[/C][C]0.9974[/C][/ROW]
[ROW][C]56[/C][C]106.9[/C][C]101.4254[/C][C]89.032[/C][C]113.8188[/C][C]0.1933[/C][C]0.0063[/C][C]0.5016[/C][C]0.8256[/C][/ROW]
[ROW][C]57[/C][C]108.2[/C][C]107.2177[/C][C]94.8182[/C][C]119.6172[/C][C]0.4383[/C][C]0.52[/C][C]0.5074[/C][C]0.968[/C][/ROW]
[ROW][C]58[/C][C]110[/C][C]110.7949[/C][C]98.3953[/C][C]123.1945[/C][C]0.45[/C][C]0.6592[/C][C]0.4997[/C][C]0.9922[/C][/ROW]
[ROW][C]59[/C][C]96.1[/C][C]90.3557[/C][C]77.9546[/C][C]102.7567[/C][C]0.182[/C][C]0.001[/C][C]0.5035[/C][C]0.2081[/C][/ROW]
[ROW][C]60[/C][C]100.6[/C][C]95.4896[/C][C]83.0885[/C][C]107.8908[/C][C]0.2096[/C][C]0.4616[/C][C]0.4993[/C][C]0.4993[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2781&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2781&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])
3691.3-------
37107.9-------
38101.8-------
39104.4-------
4093.4-------
41100.1-------
4298.5-------
43112.9-------
44101.4-------
45107.1-------
46110.8-------
4790.3-------
4895.5-------
49111.4111.4123100.7727122.05190.49910.99830.74120.9983
50113103.254791.9203114.5890.0460.07950.59930.91
51107.5105.829793.6703117.98910.39390.12390.59110.952
5295.993.873281.6557106.09060.37250.01440.53030.3971
53106.3100.69988.3373113.06080.18730.77660.53780.7951
54105.298.634686.2696110.99970.1490.11220.50850.6904
55117.2113.1602100.7668125.55350.26140.8960.51640.9974
56106.9101.425489.032113.81880.19330.00630.50160.8256
57108.2107.217794.8182119.61720.43830.520.50740.968
58110110.794998.3953123.19450.450.65920.49970.9922
5996.190.355777.9546102.75670.1820.0010.50350.2081
60100.695.489683.0885107.89080.20960.46160.49930.4993







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0487-1e-0402e-0400.0036
500.0560.09440.007994.97157.91432.8132
510.05860.01580.00132.790.23250.4822
520.06640.02160.00184.1080.34230.5851
530.06260.05560.004631.37072.61421.6169
540.0640.06660.005543.10393.5921.8953
550.05590.03570.00316.32041.361.1662
560.06230.0540.004529.97112.49761.5804
570.0590.00928e-040.96490.08040.2836
580.0571-0.00726e-040.63190.05270.2295
590.070.06360.005332.99742.74981.6582
600.06630.05350.004526.11592.17631.4752

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0487 & -1e-04 & 0 & 2e-04 & 0 & 0.0036 \tabularnewline
50 & 0.056 & 0.0944 & 0.0079 & 94.9715 & 7.9143 & 2.8132 \tabularnewline
51 & 0.0586 & 0.0158 & 0.0013 & 2.79 & 0.2325 & 0.4822 \tabularnewline
52 & 0.0664 & 0.0216 & 0.0018 & 4.108 & 0.3423 & 0.5851 \tabularnewline
53 & 0.0626 & 0.0556 & 0.0046 & 31.3707 & 2.6142 & 1.6169 \tabularnewline
54 & 0.064 & 0.0666 & 0.0055 & 43.1039 & 3.592 & 1.8953 \tabularnewline
55 & 0.0559 & 0.0357 & 0.003 & 16.3204 & 1.36 & 1.1662 \tabularnewline
56 & 0.0623 & 0.054 & 0.0045 & 29.9711 & 2.4976 & 1.5804 \tabularnewline
57 & 0.059 & 0.0092 & 8e-04 & 0.9649 & 0.0804 & 0.2836 \tabularnewline
58 & 0.0571 & -0.0072 & 6e-04 & 0.6319 & 0.0527 & 0.2295 \tabularnewline
59 & 0.07 & 0.0636 & 0.0053 & 32.9974 & 2.7498 & 1.6582 \tabularnewline
60 & 0.0663 & 0.0535 & 0.0045 & 26.1159 & 2.1763 & 1.4752 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2781&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.0487[/C][C]-1e-04[/C][C]0[/C][C]2e-04[/C][C]0[/C][C]0.0036[/C][/ROW]
[ROW][C]50[/C][C]0.056[/C][C]0.0944[/C][C]0.0079[/C][C]94.9715[/C][C]7.9143[/C][C]2.8132[/C][/ROW]
[ROW][C]51[/C][C]0.0586[/C][C]0.0158[/C][C]0.0013[/C][C]2.79[/C][C]0.2325[/C][C]0.4822[/C][/ROW]
[ROW][C]52[/C][C]0.0664[/C][C]0.0216[/C][C]0.0018[/C][C]4.108[/C][C]0.3423[/C][C]0.5851[/C][/ROW]
[ROW][C]53[/C][C]0.0626[/C][C]0.0556[/C][C]0.0046[/C][C]31.3707[/C][C]2.6142[/C][C]1.6169[/C][/ROW]
[ROW][C]54[/C][C]0.064[/C][C]0.0666[/C][C]0.0055[/C][C]43.1039[/C][C]3.592[/C][C]1.8953[/C][/ROW]
[ROW][C]55[/C][C]0.0559[/C][C]0.0357[/C][C]0.003[/C][C]16.3204[/C][C]1.36[/C][C]1.1662[/C][/ROW]
[ROW][C]56[/C][C]0.0623[/C][C]0.054[/C][C]0.0045[/C][C]29.9711[/C][C]2.4976[/C][C]1.5804[/C][/ROW]
[ROW][C]57[/C][C]0.059[/C][C]0.0092[/C][C]8e-04[/C][C]0.9649[/C][C]0.0804[/C][C]0.2836[/C][/ROW]
[ROW][C]58[/C][C]0.0571[/C][C]-0.0072[/C][C]6e-04[/C][C]0.6319[/C][C]0.0527[/C][C]0.2295[/C][/ROW]
[ROW][C]59[/C][C]0.07[/C][C]0.0636[/C][C]0.0053[/C][C]32.9974[/C][C]2.7498[/C][C]1.6582[/C][/ROW]
[ROW][C]60[/C][C]0.0663[/C][C]0.0535[/C][C]0.0045[/C][C]26.1159[/C][C]2.1763[/C][C]1.4752[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2781&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2781&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.0487-1e-0402e-0400.0036
500.0560.09440.007994.97157.91432.8132
510.05860.01580.00132.790.23250.4822
520.06640.02160.00184.1080.34230.5851
530.06260.05560.004631.37072.61421.6169
540.0640.06660.005543.10393.5921.8953
550.05590.03570.00316.32041.361.1662
560.06230.0540.004529.97112.49761.5804
570.0590.00928e-040.96490.08040.2836
580.0571-0.00726e-040.63190.05270.2295
590.070.06360.005332.99742.74981.6582
600.06630.05350.004526.11592.17631.4752



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