Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 08:52:05 -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/10/t1197301112t8p80j4ydxtb82g.htm/, Retrieved Mon, 06 May 2024 13:45:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2990, Retrieved Mon, 06 May 2024 13:45:38 +0000
QR Codes:

Original text written by user:Extrapolation Forecast, Q1 voor reeks 1 lambda =1 d=0 D=1 p=3 Q=1 q=0 p=0
IsPrivate?No (this computation is public)
User-defined keywordsExtrapolation Forecast
Estimated Impact234
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Workshop 5 Q1] [2007-12-10 15:52:05] [e38ae300fa323c405e42b78372d772d6] [Current]
- R  D    [ARIMA Forecasting] [ARIMA FORECASTING] [2008-12-22 13:59:19] [072df11bdb18ed8d65d8164df87f26f2]
- RMPD      [ARIMA Forecasting] [] [2009-12-17 12:11:03] [a9a33b1951d9ae87ed6d7d9055d41c93]
Feedback Forum

Post a new message
Dataseries X:
101,5
99,2
107,8
92,3
99,2
101,6
87,0
71,4
104,7
115,1
102,5
75,3
96,7
94,6
98,6
99,5
92,0
93,6
89,3
66,9
108,8
113,2
105,5
77,8
102,1
97,0
95,5
99,3
86,4
92,4
85,7
61,9
104,9
107,9
95,6
79,8
94,8
93,7
108,1
96,9
88,8
106,7
86,8
69,8
110,9
105,4
99,2
84,4
87,2
91,9
97,9
94,5
85,0
100,3
78,7
65,8
104,8
96,0
103,3
82,9
91,4
94,5
109,3
92,1
99,3
109,6
87,5
73,1
110,7
111,6
110,7
84,0
101,6
102,1
113,9
99,0
100,4
109,5
93,0
76,8
105,3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2990&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[69])
57104.8-------
5896-------
59103.3-------
6082.9-------
6191.4-------
6294.5-------
63109.3-------
6492.1-------
6599.3-------
66109.6-------
6787.5-------
6873.1-------
69110.7-------
70111.6106.378397.4364115.32030.12620.17170.98850.1717
71110.7105.6796.7186114.62130.13540.09710.69810.1354
728485.012875.796694.2290.414700.67340
73101.695.078984.754105.40390.10790.98230.75750.0015
74102.196.950386.6249107.27570.16420.18870.67910.0045
75113.9106.914996.3318117.4980.09790.81370.32930.2417
769996.420485.5574107.28330.32088e-040.78220.005
77100.495.047784.1732105.92230.16740.23810.22170.0024
78109.5106.319295.2908117.34750.28590.85360.27990.2181
799386.779475.666397.89250.136300.44940
8076.871.117859.985382.25030.15861e-040.36350
81105.3109.813498.6052121.02170.21510.43840.4384

\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[69]) \tabularnewline
57 & 104.8 & - & - & - & - & - & - & - \tabularnewline
58 & 96 & - & - & - & - & - & - & - \tabularnewline
59 & 103.3 & - & - & - & - & - & - & - \tabularnewline
60 & 82.9 & - & - & - & - & - & - & - \tabularnewline
61 & 91.4 & - & - & - & - & - & - & - \tabularnewline
62 & 94.5 & - & - & - & - & - & - & - \tabularnewline
63 & 109.3 & - & - & - & - & - & - & - \tabularnewline
64 & 92.1 & - & - & - & - & - & - & - \tabularnewline
65 & 99.3 & - & - & - & - & - & - & - \tabularnewline
66 & 109.6 & - & - & - & - & - & - & - \tabularnewline
67 & 87.5 & - & - & - & - & - & - & - \tabularnewline
68 & 73.1 & - & - & - & - & - & - & - \tabularnewline
69 & 110.7 & - & - & - & - & - & - & - \tabularnewline
70 & 111.6 & 106.3783 & 97.4364 & 115.3203 & 0.1262 & 0.1717 & 0.9885 & 0.1717 \tabularnewline
71 & 110.7 & 105.67 & 96.7186 & 114.6213 & 0.1354 & 0.0971 & 0.6981 & 0.1354 \tabularnewline
72 & 84 & 85.0128 & 75.7966 & 94.229 & 0.4147 & 0 & 0.6734 & 0 \tabularnewline
73 & 101.6 & 95.0789 & 84.754 & 105.4039 & 0.1079 & 0.9823 & 0.7575 & 0.0015 \tabularnewline
74 & 102.1 & 96.9503 & 86.6249 & 107.2757 & 0.1642 & 0.1887 & 0.6791 & 0.0045 \tabularnewline
75 & 113.9 & 106.9149 & 96.3318 & 117.498 & 0.0979 & 0.8137 & 0.3293 & 0.2417 \tabularnewline
76 & 99 & 96.4204 & 85.5574 & 107.2833 & 0.3208 & 8e-04 & 0.7822 & 0.005 \tabularnewline
77 & 100.4 & 95.0477 & 84.1732 & 105.9223 & 0.1674 & 0.2381 & 0.2217 & 0.0024 \tabularnewline
78 & 109.5 & 106.3192 & 95.2908 & 117.3475 & 0.2859 & 0.8536 & 0.2799 & 0.2181 \tabularnewline
79 & 93 & 86.7794 & 75.6663 & 97.8925 & 0.1363 & 0 & 0.4494 & 0 \tabularnewline
80 & 76.8 & 71.1178 & 59.9853 & 82.2503 & 0.1586 & 1e-04 & 0.3635 & 0 \tabularnewline
81 & 105.3 & 109.8134 & 98.6052 & 121.0217 & 0.215 & 1 & 0.4384 & 0.4384 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2990&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[69])[/C][/ROW]
[ROW][C]57[/C][C]104.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]82.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]91.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]94.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]109.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]92.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]99.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]109.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]111.6[/C][C]106.3783[/C][C]97.4364[/C][C]115.3203[/C][C]0.1262[/C][C]0.1717[/C][C]0.9885[/C][C]0.1717[/C][/ROW]
[ROW][C]71[/C][C]110.7[/C][C]105.67[/C][C]96.7186[/C][C]114.6213[/C][C]0.1354[/C][C]0.0971[/C][C]0.6981[/C][C]0.1354[/C][/ROW]
[ROW][C]72[/C][C]84[/C][C]85.0128[/C][C]75.7966[/C][C]94.229[/C][C]0.4147[/C][C]0[/C][C]0.6734[/C][C]0[/C][/ROW]
[ROW][C]73[/C][C]101.6[/C][C]95.0789[/C][C]84.754[/C][C]105.4039[/C][C]0.1079[/C][C]0.9823[/C][C]0.7575[/C][C]0.0015[/C][/ROW]
[ROW][C]74[/C][C]102.1[/C][C]96.9503[/C][C]86.6249[/C][C]107.2757[/C][C]0.1642[/C][C]0.1887[/C][C]0.6791[/C][C]0.0045[/C][/ROW]
[ROW][C]75[/C][C]113.9[/C][C]106.9149[/C][C]96.3318[/C][C]117.498[/C][C]0.0979[/C][C]0.8137[/C][C]0.3293[/C][C]0.2417[/C][/ROW]
[ROW][C]76[/C][C]99[/C][C]96.4204[/C][C]85.5574[/C][C]107.2833[/C][C]0.3208[/C][C]8e-04[/C][C]0.7822[/C][C]0.005[/C][/ROW]
[ROW][C]77[/C][C]100.4[/C][C]95.0477[/C][C]84.1732[/C][C]105.9223[/C][C]0.1674[/C][C]0.2381[/C][C]0.2217[/C][C]0.0024[/C][/ROW]
[ROW][C]78[/C][C]109.5[/C][C]106.3192[/C][C]95.2908[/C][C]117.3475[/C][C]0.2859[/C][C]0.8536[/C][C]0.2799[/C][C]0.2181[/C][/ROW]
[ROW][C]79[/C][C]93[/C][C]86.7794[/C][C]75.6663[/C][C]97.8925[/C][C]0.1363[/C][C]0[/C][C]0.4494[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]76.8[/C][C]71.1178[/C][C]59.9853[/C][C]82.2503[/C][C]0.1586[/C][C]1e-04[/C][C]0.3635[/C][C]0[/C][/ROW]
[ROW][C]81[/C][C]105.3[/C][C]109.8134[/C][C]98.6052[/C][C]121.0217[/C][C]0.215[/C][C]1[/C][C]0.4384[/C][C]0.4384[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2990&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2990&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[69])
57104.8-------
5896-------
59103.3-------
6082.9-------
6191.4-------
6294.5-------
63109.3-------
6492.1-------
6599.3-------
66109.6-------
6787.5-------
6873.1-------
69110.7-------
70111.6106.378397.4364115.32030.12620.17170.98850.1717
71110.7105.6796.7186114.62130.13540.09710.69810.1354
728485.012875.796694.2290.414700.67340
73101.695.078984.754105.40390.10790.98230.75750.0015
74102.196.950386.6249107.27570.16420.18870.67910.0045
75113.9106.914996.3318117.4980.09790.81370.32930.2417
769996.420485.5574107.28330.32088e-040.78220.005
77100.495.047784.1732105.92230.16740.23810.22170.0024
78109.5106.319295.2908117.34750.28590.85360.27990.2181
799386.779475.666397.89250.136300.44940
8076.871.117859.985382.25030.15861e-040.36350
81105.3109.813498.6052121.02170.21510.43840.4384







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.04290.04910.004127.26582.27211.5074
710.04320.04760.00425.30132.10841.452
720.0553-0.01190.0011.02570.08550.2924
730.05540.06860.005742.52433.54371.8825
740.05430.05310.004426.51942.211.4866
750.05050.06530.005448.79144.0662.0164
760.05750.02680.00226.65450.55450.7447
770.05840.05630.004728.64662.38721.5451
780.05290.02990.002510.11760.84310.9182
790.06530.07170.00638.69583.22461.7957
800.07990.07990.006732.28752.69061.6403
810.0521-0.04110.003420.37091.69761.3029

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.0429 & 0.0491 & 0.0041 & 27.2658 & 2.2721 & 1.5074 \tabularnewline
71 & 0.0432 & 0.0476 & 0.004 & 25.3013 & 2.1084 & 1.452 \tabularnewline
72 & 0.0553 & -0.0119 & 0.001 & 1.0257 & 0.0855 & 0.2924 \tabularnewline
73 & 0.0554 & 0.0686 & 0.0057 & 42.5243 & 3.5437 & 1.8825 \tabularnewline
74 & 0.0543 & 0.0531 & 0.0044 & 26.5194 & 2.21 & 1.4866 \tabularnewline
75 & 0.0505 & 0.0653 & 0.0054 & 48.7914 & 4.066 & 2.0164 \tabularnewline
76 & 0.0575 & 0.0268 & 0.0022 & 6.6545 & 0.5545 & 0.7447 \tabularnewline
77 & 0.0584 & 0.0563 & 0.0047 & 28.6466 & 2.3872 & 1.5451 \tabularnewline
78 & 0.0529 & 0.0299 & 0.0025 & 10.1176 & 0.8431 & 0.9182 \tabularnewline
79 & 0.0653 & 0.0717 & 0.006 & 38.6958 & 3.2246 & 1.7957 \tabularnewline
80 & 0.0799 & 0.0799 & 0.0067 & 32.2875 & 2.6906 & 1.6403 \tabularnewline
81 & 0.0521 & -0.0411 & 0.0034 & 20.3709 & 1.6976 & 1.3029 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2990&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]70[/C][C]0.0429[/C][C]0.0491[/C][C]0.0041[/C][C]27.2658[/C][C]2.2721[/C][C]1.5074[/C][/ROW]
[ROW][C]71[/C][C]0.0432[/C][C]0.0476[/C][C]0.004[/C][C]25.3013[/C][C]2.1084[/C][C]1.452[/C][/ROW]
[ROW][C]72[/C][C]0.0553[/C][C]-0.0119[/C][C]0.001[/C][C]1.0257[/C][C]0.0855[/C][C]0.2924[/C][/ROW]
[ROW][C]73[/C][C]0.0554[/C][C]0.0686[/C][C]0.0057[/C][C]42.5243[/C][C]3.5437[/C][C]1.8825[/C][/ROW]
[ROW][C]74[/C][C]0.0543[/C][C]0.0531[/C][C]0.0044[/C][C]26.5194[/C][C]2.21[/C][C]1.4866[/C][/ROW]
[ROW][C]75[/C][C]0.0505[/C][C]0.0653[/C][C]0.0054[/C][C]48.7914[/C][C]4.066[/C][C]2.0164[/C][/ROW]
[ROW][C]76[/C][C]0.0575[/C][C]0.0268[/C][C]0.0022[/C][C]6.6545[/C][C]0.5545[/C][C]0.7447[/C][/ROW]
[ROW][C]77[/C][C]0.0584[/C][C]0.0563[/C][C]0.0047[/C][C]28.6466[/C][C]2.3872[/C][C]1.5451[/C][/ROW]
[ROW][C]78[/C][C]0.0529[/C][C]0.0299[/C][C]0.0025[/C][C]10.1176[/C][C]0.8431[/C][C]0.9182[/C][/ROW]
[ROW][C]79[/C][C]0.0653[/C][C]0.0717[/C][C]0.006[/C][C]38.6958[/C][C]3.2246[/C][C]1.7957[/C][/ROW]
[ROW][C]80[/C][C]0.0799[/C][C]0.0799[/C][C]0.0067[/C][C]32.2875[/C][C]2.6906[/C][C]1.6403[/C][/ROW]
[ROW][C]81[/C][C]0.0521[/C][C]-0.0411[/C][C]0.0034[/C][C]20.3709[/C][C]1.6976[/C][C]1.3029[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2990&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2990&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
700.04290.04910.004127.26582.27211.5074
710.04320.04760.00425.30132.10841.452
720.0553-0.01190.0011.02570.08550.2924
730.05540.06860.005742.52433.54371.8825
740.05430.05310.004426.51942.211.4866
750.05050.06530.005448.79144.0662.0164
760.05750.02680.00226.65450.55450.7447
770.05840.05630.004728.64662.38721.5451
780.05290.02990.002510.11760.84310.9182
790.06530.07170.00638.69583.22461.7957
800.07990.07990.006732.28752.69061.6403
810.0521-0.04110.003420.37091.69761.3029



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