Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 15 Dec 2009 13:21:11 -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/2009/Dec/15/t1260908526g4od8fhirl6q7r1.htm/, Retrieved Wed, 08 May 2024 21:56:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68121, Retrieved Wed, 08 May 2024 21:56:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-   P       [ARIMA Forecasting] [Paper ARIMA F IGP] [2009-12-14 21:07:10] [134dc66689e3d457a82860db6471d419]
-   PD          [ARIMA Forecasting] [Paper ARIMA F ICP] [2009-12-15 20:21:11] [4f297b039e1043ebee7ff7a83b1eaaaa] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.00
102.04
102.51
102.71
103.00
103.39
102.32
103.88
104.65
104.46
104.65
104.36
102.71
104.55
104.76
105.72
106.20
106.50
105.14
106.50
106.69
106.50
106.50
106.39
105.43
107.18
107.37
107.46
107.66
107.37
106.30
107.85
107.95
107.85
107.66
107.76
106.69
108.92
109.22
109.02
108.62
109.02
107.76
109.60
109.80
109.41
109.60
109.60
108.15
110.18
110.27
110.87
111.25
111.15
109.99
111.83
111.73
112.31
112.12
111.73
110.27
112.71
113.38
113.57
113.77
114.15
112.99
115.03
115.03
114.84
114.75
114.84
113.32
115.92
115.84
116.49
116.90
116.99
115.74
117.73
117.17
116.83
117.08
117.23
115.25
117.98
117.97
118.56
118.42
118.51
117.25
119.08
118.85
119.41
120.43
120.87
119.31
122.24
123.14
123.39
124.46
125.33
124.17
125.48
125.35
125.15
124.31
124.14
121.81
124.62
123.93
124.29
124.16
124.02
122.00
124.58
124.06




Summary of computational 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 computational 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=68121&T=0

[TABLE]
[ROW][C]Summary of computational 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=68121&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68121&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 computational 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[105])
93118.85-------
94119.41-------
95120.43-------
96120.87-------
97119.31-------
98122.24-------
99123.14-------
100123.39-------
101124.46-------
102125.33-------
103124.17-------
104125.48-------
105125.35-------
106125.15125.4255124.7158126.13510.22340.582610.5826
107124.31125.8314124.7854126.87750.00220.899210.8165
108124.14126.0147124.7125127.31680.00240.994910.8415
109121.81124.3431122.8271125.85915e-040.603610.0965
110124.62127.0452125.342128.74840.0026110.9745
111123.93127.3978125.5261129.26961e-040.998210.984
112124.29127.8336125.8072129.863e-040.999910.9919
113124.16128.2415126.0714130.41151e-040.99980.99970.9955
114124.02128.6142126.3094130.918900.99990.99740.9972
115122127.403124.971129.83500.99680.99540.951
116124.58129.096126.5431131.64893e-0410.99730.998
117124.06128.8838126.2155131.55222e-040.99920.99530.9953

\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[105]) \tabularnewline
93 & 118.85 & - & - & - & - & - & - & - \tabularnewline
94 & 119.41 & - & - & - & - & - & - & - \tabularnewline
95 & 120.43 & - & - & - & - & - & - & - \tabularnewline
96 & 120.87 & - & - & - & - & - & - & - \tabularnewline
97 & 119.31 & - & - & - & - & - & - & - \tabularnewline
98 & 122.24 & - & - & - & - & - & - & - \tabularnewline
99 & 123.14 & - & - & - & - & - & - & - \tabularnewline
100 & 123.39 & - & - & - & - & - & - & - \tabularnewline
101 & 124.46 & - & - & - & - & - & - & - \tabularnewline
102 & 125.33 & - & - & - & - & - & - & - \tabularnewline
103 & 124.17 & - & - & - & - & - & - & - \tabularnewline
104 & 125.48 & - & - & - & - & - & - & - \tabularnewline
105 & 125.35 & - & - & - & - & - & - & - \tabularnewline
106 & 125.15 & 125.4255 & 124.7158 & 126.1351 & 0.2234 & 0.5826 & 1 & 0.5826 \tabularnewline
107 & 124.31 & 125.8314 & 124.7854 & 126.8775 & 0.0022 & 0.8992 & 1 & 0.8165 \tabularnewline
108 & 124.14 & 126.0147 & 124.7125 & 127.3168 & 0.0024 & 0.9949 & 1 & 0.8415 \tabularnewline
109 & 121.81 & 124.3431 & 122.8271 & 125.8591 & 5e-04 & 0.6036 & 1 & 0.0965 \tabularnewline
110 & 124.62 & 127.0452 & 125.342 & 128.7484 & 0.0026 & 1 & 1 & 0.9745 \tabularnewline
111 & 123.93 & 127.3978 & 125.5261 & 129.2696 & 1e-04 & 0.9982 & 1 & 0.984 \tabularnewline
112 & 124.29 & 127.8336 & 125.8072 & 129.86 & 3e-04 & 0.9999 & 1 & 0.9919 \tabularnewline
113 & 124.16 & 128.2415 & 126.0714 & 130.4115 & 1e-04 & 0.9998 & 0.9997 & 0.9955 \tabularnewline
114 & 124.02 & 128.6142 & 126.3094 & 130.9189 & 0 & 0.9999 & 0.9974 & 0.9972 \tabularnewline
115 & 122 & 127.403 & 124.971 & 129.835 & 0 & 0.9968 & 0.9954 & 0.951 \tabularnewline
116 & 124.58 & 129.096 & 126.5431 & 131.6489 & 3e-04 & 1 & 0.9973 & 0.998 \tabularnewline
117 & 124.06 & 128.8838 & 126.2155 & 131.5522 & 2e-04 & 0.9992 & 0.9953 & 0.9953 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68121&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[105])[/C][/ROW]
[ROW][C]93[/C][C]118.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]119.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]120.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]120.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]119.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]122.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]123.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]123.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]124.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]125.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]124.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]125.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]125.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]125.15[/C][C]125.4255[/C][C]124.7158[/C][C]126.1351[/C][C]0.2234[/C][C]0.5826[/C][C]1[/C][C]0.5826[/C][/ROW]
[ROW][C]107[/C][C]124.31[/C][C]125.8314[/C][C]124.7854[/C][C]126.8775[/C][C]0.0022[/C][C]0.8992[/C][C]1[/C][C]0.8165[/C][/ROW]
[ROW][C]108[/C][C]124.14[/C][C]126.0147[/C][C]124.7125[/C][C]127.3168[/C][C]0.0024[/C][C]0.9949[/C][C]1[/C][C]0.8415[/C][/ROW]
[ROW][C]109[/C][C]121.81[/C][C]124.3431[/C][C]122.8271[/C][C]125.8591[/C][C]5e-04[/C][C]0.6036[/C][C]1[/C][C]0.0965[/C][/ROW]
[ROW][C]110[/C][C]124.62[/C][C]127.0452[/C][C]125.342[/C][C]128.7484[/C][C]0.0026[/C][C]1[/C][C]1[/C][C]0.9745[/C][/ROW]
[ROW][C]111[/C][C]123.93[/C][C]127.3978[/C][C]125.5261[/C][C]129.2696[/C][C]1e-04[/C][C]0.9982[/C][C]1[/C][C]0.984[/C][/ROW]
[ROW][C]112[/C][C]124.29[/C][C]127.8336[/C][C]125.8072[/C][C]129.86[/C][C]3e-04[/C][C]0.9999[/C][C]1[/C][C]0.9919[/C][/ROW]
[ROW][C]113[/C][C]124.16[/C][C]128.2415[/C][C]126.0714[/C][C]130.4115[/C][C]1e-04[/C][C]0.9998[/C][C]0.9997[/C][C]0.9955[/C][/ROW]
[ROW][C]114[/C][C]124.02[/C][C]128.6142[/C][C]126.3094[/C][C]130.9189[/C][C]0[/C][C]0.9999[/C][C]0.9974[/C][C]0.9972[/C][/ROW]
[ROW][C]115[/C][C]122[/C][C]127.403[/C][C]124.971[/C][C]129.835[/C][C]0[/C][C]0.9968[/C][C]0.9954[/C][C]0.951[/C][/ROW]
[ROW][C]116[/C][C]124.58[/C][C]129.096[/C][C]126.5431[/C][C]131.6489[/C][C]3e-04[/C][C]1[/C][C]0.9973[/C][C]0.998[/C][/ROW]
[ROW][C]117[/C][C]124.06[/C][C]128.8838[/C][C]126.2155[/C][C]131.5522[/C][C]2e-04[/C][C]0.9992[/C][C]0.9953[/C][C]0.9953[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68121&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68121&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[105])
93118.85-------
94119.41-------
95120.43-------
96120.87-------
97119.31-------
98122.24-------
99123.14-------
100123.39-------
101124.46-------
102125.33-------
103124.17-------
104125.48-------
105125.35-------
106125.15125.4255124.7158126.13510.22340.582610.5826
107124.31125.8314124.7854126.87750.00220.899210.8165
108124.14126.0147124.7125127.31680.00240.994910.8415
109121.81124.3431122.8271125.85915e-040.603610.0965
110124.62127.0452125.342128.74840.0026110.9745
111123.93127.3978125.5261129.26961e-040.998210.984
112124.29127.8336125.8072129.863e-040.999910.9919
113124.16128.2415126.0714130.41151e-040.99980.99970.9955
114124.02128.6142126.3094130.918900.99990.99740.9972
115122127.403124.971129.83500.99680.99540.951
116124.58129.096126.5431131.64893e-0410.99730.998
117124.06128.8838126.2155131.55222e-040.99920.99530.9953







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.0029-0.00222e-040.07590.00630.0795
1070.0042-0.01210.0012.31470.19290.4392
1080.0053-0.01490.00123.51440.29290.5412
1090.0062-0.02040.00176.41660.53470.7312
1100.0068-0.01910.00165.88170.49010.7001
1110.0075-0.02720.002312.02591.00221.0011
1120.0081-0.02770.002312.5571.04641.0229
1130.0086-0.03180.002716.65851.38821.1782
1140.0091-0.03570.00321.10621.75891.3262
1150.0097-0.04240.003529.19232.43271.5597
1160.0101-0.0350.002920.39411.69951.3037
1170.0106-0.03740.003123.26941.93911.3925

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.0029 & -0.0022 & 2e-04 & 0.0759 & 0.0063 & 0.0795 \tabularnewline
107 & 0.0042 & -0.0121 & 0.001 & 2.3147 & 0.1929 & 0.4392 \tabularnewline
108 & 0.0053 & -0.0149 & 0.0012 & 3.5144 & 0.2929 & 0.5412 \tabularnewline
109 & 0.0062 & -0.0204 & 0.0017 & 6.4166 & 0.5347 & 0.7312 \tabularnewline
110 & 0.0068 & -0.0191 & 0.0016 & 5.8817 & 0.4901 & 0.7001 \tabularnewline
111 & 0.0075 & -0.0272 & 0.0023 & 12.0259 & 1.0022 & 1.0011 \tabularnewline
112 & 0.0081 & -0.0277 & 0.0023 & 12.557 & 1.0464 & 1.0229 \tabularnewline
113 & 0.0086 & -0.0318 & 0.0027 & 16.6585 & 1.3882 & 1.1782 \tabularnewline
114 & 0.0091 & -0.0357 & 0.003 & 21.1062 & 1.7589 & 1.3262 \tabularnewline
115 & 0.0097 & -0.0424 & 0.0035 & 29.1923 & 2.4327 & 1.5597 \tabularnewline
116 & 0.0101 & -0.035 & 0.0029 & 20.3941 & 1.6995 & 1.3037 \tabularnewline
117 & 0.0106 & -0.0374 & 0.0031 & 23.2694 & 1.9391 & 1.3925 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68121&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]106[/C][C]0.0029[/C][C]-0.0022[/C][C]2e-04[/C][C]0.0759[/C][C]0.0063[/C][C]0.0795[/C][/ROW]
[ROW][C]107[/C][C]0.0042[/C][C]-0.0121[/C][C]0.001[/C][C]2.3147[/C][C]0.1929[/C][C]0.4392[/C][/ROW]
[ROW][C]108[/C][C]0.0053[/C][C]-0.0149[/C][C]0.0012[/C][C]3.5144[/C][C]0.2929[/C][C]0.5412[/C][/ROW]
[ROW][C]109[/C][C]0.0062[/C][C]-0.0204[/C][C]0.0017[/C][C]6.4166[/C][C]0.5347[/C][C]0.7312[/C][/ROW]
[ROW][C]110[/C][C]0.0068[/C][C]-0.0191[/C][C]0.0016[/C][C]5.8817[/C][C]0.4901[/C][C]0.7001[/C][/ROW]
[ROW][C]111[/C][C]0.0075[/C][C]-0.0272[/C][C]0.0023[/C][C]12.0259[/C][C]1.0022[/C][C]1.0011[/C][/ROW]
[ROW][C]112[/C][C]0.0081[/C][C]-0.0277[/C][C]0.0023[/C][C]12.557[/C][C]1.0464[/C][C]1.0229[/C][/ROW]
[ROW][C]113[/C][C]0.0086[/C][C]-0.0318[/C][C]0.0027[/C][C]16.6585[/C][C]1.3882[/C][C]1.1782[/C][/ROW]
[ROW][C]114[/C][C]0.0091[/C][C]-0.0357[/C][C]0.003[/C][C]21.1062[/C][C]1.7589[/C][C]1.3262[/C][/ROW]
[ROW][C]115[/C][C]0.0097[/C][C]-0.0424[/C][C]0.0035[/C][C]29.1923[/C][C]2.4327[/C][C]1.5597[/C][/ROW]
[ROW][C]116[/C][C]0.0101[/C][C]-0.035[/C][C]0.0029[/C][C]20.3941[/C][C]1.6995[/C][C]1.3037[/C][/ROW]
[ROW][C]117[/C][C]0.0106[/C][C]-0.0374[/C][C]0.0031[/C][C]23.2694[/C][C]1.9391[/C][C]1.3925[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68121&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68121&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
1060.0029-0.00222e-040.07590.00630.0795
1070.0042-0.01210.0012.31470.19290.4392
1080.0053-0.01490.00123.51440.29290.5412
1090.0062-0.02040.00176.41660.53470.7312
1100.0068-0.01910.00165.88170.49010.7001
1110.0075-0.02720.002312.02591.00221.0011
1120.0081-0.02770.002312.5571.04641.0229
1130.0086-0.03180.002716.65851.38821.1782
1140.0091-0.03570.00321.10621.75891.3262
1150.0097-0.04240.003529.19232.43271.5597
1160.0101-0.0350.002920.39411.69951.3037
1170.0106-0.03740.003123.26941.93911.3925



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