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, 28 Dec 2010 15:47:17 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/28/t1293551111g760vnrj3ixork6.htm/, Retrieved Sat, 04 May 2024 20:18:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116391, Retrieved Sat, 04 May 2024 20:18:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact155
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [Paper_ARIMAB] [2010-12-28 14:47:18] [7318566ef3ec88988be4d1362d0cf918]
- RMPD  [ARIMA Forecasting] [Paper_ARIMAF] [2010-12-28 15:45:18] [7318566ef3ec88988be4d1362d0cf918]
-   P       [ARIMA Forecasting] [Paper_ARIMAF] [2010-12-28 15:47:17] [edf51d809b713abfc4095a7dca74558e] [Current]
Feedback Forum

Post a new message
Dataseries X:
112.52
112.39
112.24
112.10
109.85
111.89
111.88
111.48
110.98
110.42
107.90
109.46
109.11
109.26
109.99
110.17
110.28
109.13
110.15
109.39
108.45
108.23
107.44
104.86
106.23
105.85
104.95
104.46
104.66
103.05
104.16
104.08
104.20
103.68
103.69
101.29
103.03
102.90
102.68
102.98
103.47
101.72
102.82
102.74
102.38
101.81
101.88
99.60
100.93
100.85
100.93
101.10
101.10
99.31
100.33
99.99
99.82
99.65
99.06
96.92
98.20
98.54
98.71
98.20
98.29
96.67
97.69
97.78
97.44
96.92
96.84
95.05
96.33
96.33
96.16
96.50
96.33
94.71
95.82
95.47
95.82
95.99
95.73
93.77
94.71
94.62
94.79
94.88
94.79
93.43
94.37
94.62
94.45
94.37
94.20
92.66
93.51
93.60
93.60
93.77
93.60
92.41
93.60
93.34
92.92
92.07
91.89
90.27
91.72
91.98
91.81
91.98
91.30
89.93
90.87
90.53
90.27
90.10
89.68
87.89




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116391&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[108])
9692.66-------
9793.51-------
9893.6-------
9993.6-------
10093.77-------
10193.6-------
10292.41-------
10393.6-------
10493.34-------
10592.92-------
10692.07-------
10791.89-------
10890.27-------
10991.7291.274990.386792.18440.16870.984800.9848
11091.9891.304390.299592.33630.09970.214900.9752
11191.8191.324990.216192.4670.20260.130500.9649
11291.9891.427890.221592.67350.19250.27381e-040.9658
11391.391.326690.036492.6620.48450.16884e-040.9395
11489.9390.115888.787291.49330.39570.0465e-040.4132
11590.8791.0989.650992.58580.38660.93575e-040.8587
11690.5390.982389.475492.55150.28610.55580.00160.8132
11790.2790.775489.208792.40990.27220.61570.00510.7278
11890.190.371388.756792.05820.37630.54680.02420.5468
11989.6890.184988.516891.93050.28540.5380.02780.4619
12087.8988.659487.000690.39610.19260.12470.03460.0346

\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[108]) \tabularnewline
96 & 92.66 & - & - & - & - & - & - & - \tabularnewline
97 & 93.51 & - & - & - & - & - & - & - \tabularnewline
98 & 93.6 & - & - & - & - & - & - & - \tabularnewline
99 & 93.6 & - & - & - & - & - & - & - \tabularnewline
100 & 93.77 & - & - & - & - & - & - & - \tabularnewline
101 & 93.6 & - & - & - & - & - & - & - \tabularnewline
102 & 92.41 & - & - & - & - & - & - & - \tabularnewline
103 & 93.6 & - & - & - & - & - & - & - \tabularnewline
104 & 93.34 & - & - & - & - & - & - & - \tabularnewline
105 & 92.92 & - & - & - & - & - & - & - \tabularnewline
106 & 92.07 & - & - & - & - & - & - & - \tabularnewline
107 & 91.89 & - & - & - & - & - & - & - \tabularnewline
108 & 90.27 & - & - & - & - & - & - & - \tabularnewline
109 & 91.72 & 91.2749 & 90.3867 & 92.1844 & 0.1687 & 0.9848 & 0 & 0.9848 \tabularnewline
110 & 91.98 & 91.3043 & 90.2995 & 92.3363 & 0.0997 & 0.2149 & 0 & 0.9752 \tabularnewline
111 & 91.81 & 91.3249 & 90.2161 & 92.467 & 0.2026 & 0.1305 & 0 & 0.9649 \tabularnewline
112 & 91.98 & 91.4278 & 90.2215 & 92.6735 & 0.1925 & 0.2738 & 1e-04 & 0.9658 \tabularnewline
113 & 91.3 & 91.3266 & 90.0364 & 92.662 & 0.4845 & 0.1688 & 4e-04 & 0.9395 \tabularnewline
114 & 89.93 & 90.1158 & 88.7872 & 91.4933 & 0.3957 & 0.046 & 5e-04 & 0.4132 \tabularnewline
115 & 90.87 & 91.09 & 89.6509 & 92.5858 & 0.3866 & 0.9357 & 5e-04 & 0.8587 \tabularnewline
116 & 90.53 & 90.9823 & 89.4754 & 92.5515 & 0.2861 & 0.5558 & 0.0016 & 0.8132 \tabularnewline
117 & 90.27 & 90.7754 & 89.2087 & 92.4099 & 0.2722 & 0.6157 & 0.0051 & 0.7278 \tabularnewline
118 & 90.1 & 90.3713 & 88.7567 & 92.0582 & 0.3763 & 0.5468 & 0.0242 & 0.5468 \tabularnewline
119 & 89.68 & 90.1849 & 88.5168 & 91.9305 & 0.2854 & 0.538 & 0.0278 & 0.4619 \tabularnewline
120 & 87.89 & 88.6594 & 87.0006 & 90.3961 & 0.1926 & 0.1247 & 0.0346 & 0.0346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116391&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[108])[/C][/ROW]
[ROW][C]96[/C][C]92.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]93.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]93.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]93.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]93.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]93.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]92.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]93.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]93.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]92.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]92.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]91.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]90.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]91.72[/C][C]91.2749[/C][C]90.3867[/C][C]92.1844[/C][C]0.1687[/C][C]0.9848[/C][C]0[/C][C]0.9848[/C][/ROW]
[ROW][C]110[/C][C]91.98[/C][C]91.3043[/C][C]90.2995[/C][C]92.3363[/C][C]0.0997[/C][C]0.2149[/C][C]0[/C][C]0.9752[/C][/ROW]
[ROW][C]111[/C][C]91.81[/C][C]91.3249[/C][C]90.2161[/C][C]92.467[/C][C]0.2026[/C][C]0.1305[/C][C]0[/C][C]0.9649[/C][/ROW]
[ROW][C]112[/C][C]91.98[/C][C]91.4278[/C][C]90.2215[/C][C]92.6735[/C][C]0.1925[/C][C]0.2738[/C][C]1e-04[/C][C]0.9658[/C][/ROW]
[ROW][C]113[/C][C]91.3[/C][C]91.3266[/C][C]90.0364[/C][C]92.662[/C][C]0.4845[/C][C]0.1688[/C][C]4e-04[/C][C]0.9395[/C][/ROW]
[ROW][C]114[/C][C]89.93[/C][C]90.1158[/C][C]88.7872[/C][C]91.4933[/C][C]0.3957[/C][C]0.046[/C][C]5e-04[/C][C]0.4132[/C][/ROW]
[ROW][C]115[/C][C]90.87[/C][C]91.09[/C][C]89.6509[/C][C]92.5858[/C][C]0.3866[/C][C]0.9357[/C][C]5e-04[/C][C]0.8587[/C][/ROW]
[ROW][C]116[/C][C]90.53[/C][C]90.9823[/C][C]89.4754[/C][C]92.5515[/C][C]0.2861[/C][C]0.5558[/C][C]0.0016[/C][C]0.8132[/C][/ROW]
[ROW][C]117[/C][C]90.27[/C][C]90.7754[/C][C]89.2087[/C][C]92.4099[/C][C]0.2722[/C][C]0.6157[/C][C]0.0051[/C][C]0.7278[/C][/ROW]
[ROW][C]118[/C][C]90.1[/C][C]90.3713[/C][C]88.7567[/C][C]92.0582[/C][C]0.3763[/C][C]0.5468[/C][C]0.0242[/C][C]0.5468[/C][/ROW]
[ROW][C]119[/C][C]89.68[/C][C]90.1849[/C][C]88.5168[/C][C]91.9305[/C][C]0.2854[/C][C]0.538[/C][C]0.0278[/C][C]0.4619[/C][/ROW]
[ROW][C]120[/C][C]87.89[/C][C]88.6594[/C][C]87.0006[/C][C]90.3961[/C][C]0.1926[/C][C]0.1247[/C][C]0.0346[/C][C]0.0346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116391&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116391&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[108])
9692.66-------
9793.51-------
9893.6-------
9993.6-------
10093.77-------
10193.6-------
10292.41-------
10393.6-------
10493.34-------
10592.92-------
10692.07-------
10791.89-------
10890.27-------
10991.7291.274990.386792.18440.16870.984800.9848
11091.9891.304390.299592.33630.09970.214900.9752
11191.8191.324990.216192.4670.20260.130500.9649
11291.9891.427890.221592.67350.19250.27381e-040.9658
11391.391.326690.036492.6620.48450.16884e-040.9395
11489.9390.115888.787291.49330.39570.0465e-040.4132
11590.8791.0989.650992.58580.38660.93575e-040.8587
11690.5390.982389.475492.55150.28610.55580.00160.8132
11790.2790.775489.208792.40990.27220.61570.00510.7278
11890.190.371388.756792.05820.37630.54680.02420.5468
11989.6890.184988.516891.93050.28540.5380.02780.4619
12087.8988.659487.000690.39610.19260.12470.03460.0346







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.00510.004900.198100
1100.00580.00740.00610.45660.32730.5721
1110.00640.00530.00590.23530.29670.5447
1120.0070.0060.00590.30490.29870.5466
1130.0075-3e-040.00487e-040.23910.489
1140.0078-0.00210.00430.03450.2050.4528
1150.0084-0.00240.00410.04840.18260.4274
1160.0088-0.0050.00420.20450.18540.4306
1170.0092-0.00560.00430.25540.19320.4395
1180.0095-0.0030.00420.07360.18120.4257
1190.0099-0.00560.00430.25490.18790.4335
1200.01-0.00870.00470.59190.22160.4707

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.0051 & 0.0049 & 0 & 0.1981 & 0 & 0 \tabularnewline
110 & 0.0058 & 0.0074 & 0.0061 & 0.4566 & 0.3273 & 0.5721 \tabularnewline
111 & 0.0064 & 0.0053 & 0.0059 & 0.2353 & 0.2967 & 0.5447 \tabularnewline
112 & 0.007 & 0.006 & 0.0059 & 0.3049 & 0.2987 & 0.5466 \tabularnewline
113 & 0.0075 & -3e-04 & 0.0048 & 7e-04 & 0.2391 & 0.489 \tabularnewline
114 & 0.0078 & -0.0021 & 0.0043 & 0.0345 & 0.205 & 0.4528 \tabularnewline
115 & 0.0084 & -0.0024 & 0.0041 & 0.0484 & 0.1826 & 0.4274 \tabularnewline
116 & 0.0088 & -0.005 & 0.0042 & 0.2045 & 0.1854 & 0.4306 \tabularnewline
117 & 0.0092 & -0.0056 & 0.0043 & 0.2554 & 0.1932 & 0.4395 \tabularnewline
118 & 0.0095 & -0.003 & 0.0042 & 0.0736 & 0.1812 & 0.4257 \tabularnewline
119 & 0.0099 & -0.0056 & 0.0043 & 0.2549 & 0.1879 & 0.4335 \tabularnewline
120 & 0.01 & -0.0087 & 0.0047 & 0.5919 & 0.2216 & 0.4707 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116391&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]109[/C][C]0.0051[/C][C]0.0049[/C][C]0[/C][C]0.1981[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]110[/C][C]0.0058[/C][C]0.0074[/C][C]0.0061[/C][C]0.4566[/C][C]0.3273[/C][C]0.5721[/C][/ROW]
[ROW][C]111[/C][C]0.0064[/C][C]0.0053[/C][C]0.0059[/C][C]0.2353[/C][C]0.2967[/C][C]0.5447[/C][/ROW]
[ROW][C]112[/C][C]0.007[/C][C]0.006[/C][C]0.0059[/C][C]0.3049[/C][C]0.2987[/C][C]0.5466[/C][/ROW]
[ROW][C]113[/C][C]0.0075[/C][C]-3e-04[/C][C]0.0048[/C][C]7e-04[/C][C]0.2391[/C][C]0.489[/C][/ROW]
[ROW][C]114[/C][C]0.0078[/C][C]-0.0021[/C][C]0.0043[/C][C]0.0345[/C][C]0.205[/C][C]0.4528[/C][/ROW]
[ROW][C]115[/C][C]0.0084[/C][C]-0.0024[/C][C]0.0041[/C][C]0.0484[/C][C]0.1826[/C][C]0.4274[/C][/ROW]
[ROW][C]116[/C][C]0.0088[/C][C]-0.005[/C][C]0.0042[/C][C]0.2045[/C][C]0.1854[/C][C]0.4306[/C][/ROW]
[ROW][C]117[/C][C]0.0092[/C][C]-0.0056[/C][C]0.0043[/C][C]0.2554[/C][C]0.1932[/C][C]0.4395[/C][/ROW]
[ROW][C]118[/C][C]0.0095[/C][C]-0.003[/C][C]0.0042[/C][C]0.0736[/C][C]0.1812[/C][C]0.4257[/C][/ROW]
[ROW][C]119[/C][C]0.0099[/C][C]-0.0056[/C][C]0.0043[/C][C]0.2549[/C][C]0.1879[/C][C]0.4335[/C][/ROW]
[ROW][C]120[/C][C]0.01[/C][C]-0.0087[/C][C]0.0047[/C][C]0.5919[/C][C]0.2216[/C][C]0.4707[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116391&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116391&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
1090.00510.004900.198100
1100.00580.00740.00610.45660.32730.5721
1110.00640.00530.00590.23530.29670.5447
1120.0070.0060.00590.30490.29870.5466
1130.0075-3e-040.00487e-040.23910.489
1140.0078-0.00210.00430.03450.2050.4528
1150.0084-0.00240.00410.04840.18260.4274
1160.0088-0.0050.00420.20450.18540.4306
1170.0092-0.00560.00430.25540.19320.4395
1180.0095-0.0030.00420.07360.18120.4257
1190.0099-0.00560.00430.25490.18790.4335
1200.01-0.00870.00470.59190.22160.4707



Parameters (Session):
par1 = 12 ; par2 = -1.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -1.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')