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 computationFri, 24 Dec 2010 12:00:28 +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/24/t1293191904mfxqetd369273iz.htm/, Retrieved Tue, 30 Apr 2024 03:25:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114791, Retrieved Tue, 30 Apr 2024 03:25:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 12:00:28] [13dfa60174f50d862e8699db2153bfc5] [Current]
-   PD    [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 13:24:15] [7e261c986c934df955dd3ac53e9d45c6]
-   P       [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 14:18:13] [7e261c986c934df955dd3ac53e9d45c6]
-   P         [ARIMA Forecasting] [Kristof Nagels] [2010-12-24 15:18:48] [8441f95c4a5787a301bc621ebc7904ca]
Feedback Forum

Post a new message
Dataseries X:
15
14,4
13
13,7
13,6
15,2
12,9
14
14,1
13,2
11,3
13,3
14,4
13,3
11,6
13,2
13,1
14,6
14
14,3
13,8
13,7
11
14,4
15,6
13,7
12,6
13,2
13,3
14,3
14
13,4
13,9
13,7
10,5
14,5
15
13,5
13,5
13,2
13,8
16,2
14,7
13,9
16
14,4
12,3
15,9
15,9
15,5
15,1
14,5
15,1
17,4
16,2
15,6
17,2
14,9
13,8
17,5
16,2
17,5
16,6
16,2
16,6
19,6
15,9
18
18,3
16,3
14,9
18,2
18,4
18,5
16
17,4
17,2
19,6
17,2
18,3
19,3
18,1
16,2
18,4
20,5
19
16,5
18,7
19
19,2
20,5
19,3
20,6
20,1
16,1
20,4
19,7
15,6
14,4
13,7
14,1
15
14,2
13,6
15,4
14,8
12,5
16,2
16,1
16
15,8
15,2
15,7
18,9
17,4
17
19,8
17,7
16
19,6
19,7




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time39 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 39 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114791&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]39 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114791&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114791&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 time39 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[109])
9719.7-------
9815.6-------
9914.4-------
10013.7-------
10114.1-------
10215-------
10314.2-------
10413.6-------
10515.4-------
10614.8-------
10712.5-------
10816.2-------
10916.1-------
1101614.052512.642815.46220.00340.00220.01570.0022
11115.813.131411.539614.72325e-042e-040.05911e-04
11215.212.799610.869614.72960.00740.00120.18024e-04
11315.712.964610.497415.43180.01490.03790.18350.0064
11418.914.950912.238517.66320.00220.29410.48580.2032
11517.412.96279.881716.04370.00241e-040.21560.023
1161713.18499.754616.61530.01460.0080.40630.0479
11719.814.401210.718318.08410.0020.08330.29750.183
11817.713.31069.314317.30680.01577e-040.23250.0856
1191611.65647.394115.91870.02290.00270.3490.0205
12019.614.823410.322219.32450.01880.30420.27440.2891
12119.715.337910.57720.09880.03630.03970.37690.3769

\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[109]) \tabularnewline
97 & 19.7 & - & - & - & - & - & - & - \tabularnewline
98 & 15.6 & - & - & - & - & - & - & - \tabularnewline
99 & 14.4 & - & - & - & - & - & - & - \tabularnewline
100 & 13.7 & - & - & - & - & - & - & - \tabularnewline
101 & 14.1 & - & - & - & - & - & - & - \tabularnewline
102 & 15 & - & - & - & - & - & - & - \tabularnewline
103 & 14.2 & - & - & - & - & - & - & - \tabularnewline
104 & 13.6 & - & - & - & - & - & - & - \tabularnewline
105 & 15.4 & - & - & - & - & - & - & - \tabularnewline
106 & 14.8 & - & - & - & - & - & - & - \tabularnewline
107 & 12.5 & - & - & - & - & - & - & - \tabularnewline
108 & 16.2 & - & - & - & - & - & - & - \tabularnewline
109 & 16.1 & - & - & - & - & - & - & - \tabularnewline
110 & 16 & 14.0525 & 12.6428 & 15.4622 & 0.0034 & 0.0022 & 0.0157 & 0.0022 \tabularnewline
111 & 15.8 & 13.1314 & 11.5396 & 14.7232 & 5e-04 & 2e-04 & 0.0591 & 1e-04 \tabularnewline
112 & 15.2 & 12.7996 & 10.8696 & 14.7296 & 0.0074 & 0.0012 & 0.1802 & 4e-04 \tabularnewline
113 & 15.7 & 12.9646 & 10.4974 & 15.4318 & 0.0149 & 0.0379 & 0.1835 & 0.0064 \tabularnewline
114 & 18.9 & 14.9509 & 12.2385 & 17.6632 & 0.0022 & 0.2941 & 0.4858 & 0.2032 \tabularnewline
115 & 17.4 & 12.9627 & 9.8817 & 16.0437 & 0.0024 & 1e-04 & 0.2156 & 0.023 \tabularnewline
116 & 17 & 13.1849 & 9.7546 & 16.6153 & 0.0146 & 0.008 & 0.4063 & 0.0479 \tabularnewline
117 & 19.8 & 14.4012 & 10.7183 & 18.0841 & 0.002 & 0.0833 & 0.2975 & 0.183 \tabularnewline
118 & 17.7 & 13.3106 & 9.3143 & 17.3068 & 0.0157 & 7e-04 & 0.2325 & 0.0856 \tabularnewline
119 & 16 & 11.6564 & 7.3941 & 15.9187 & 0.0229 & 0.0027 & 0.349 & 0.0205 \tabularnewline
120 & 19.6 & 14.8234 & 10.3222 & 19.3245 & 0.0188 & 0.3042 & 0.2744 & 0.2891 \tabularnewline
121 & 19.7 & 15.3379 & 10.577 & 20.0988 & 0.0363 & 0.0397 & 0.3769 & 0.3769 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114791&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[109])[/C][/ROW]
[ROW][C]97[/C][C]19.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]15.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]14.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]13.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]14.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]14.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]13.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]15.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]14.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]12.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]16.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]16.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]16[/C][C]14.0525[/C][C]12.6428[/C][C]15.4622[/C][C]0.0034[/C][C]0.0022[/C][C]0.0157[/C][C]0.0022[/C][/ROW]
[ROW][C]111[/C][C]15.8[/C][C]13.1314[/C][C]11.5396[/C][C]14.7232[/C][C]5e-04[/C][C]2e-04[/C][C]0.0591[/C][C]1e-04[/C][/ROW]
[ROW][C]112[/C][C]15.2[/C][C]12.7996[/C][C]10.8696[/C][C]14.7296[/C][C]0.0074[/C][C]0.0012[/C][C]0.1802[/C][C]4e-04[/C][/ROW]
[ROW][C]113[/C][C]15.7[/C][C]12.9646[/C][C]10.4974[/C][C]15.4318[/C][C]0.0149[/C][C]0.0379[/C][C]0.1835[/C][C]0.0064[/C][/ROW]
[ROW][C]114[/C][C]18.9[/C][C]14.9509[/C][C]12.2385[/C][C]17.6632[/C][C]0.0022[/C][C]0.2941[/C][C]0.4858[/C][C]0.2032[/C][/ROW]
[ROW][C]115[/C][C]17.4[/C][C]12.9627[/C][C]9.8817[/C][C]16.0437[/C][C]0.0024[/C][C]1e-04[/C][C]0.2156[/C][C]0.023[/C][/ROW]
[ROW][C]116[/C][C]17[/C][C]13.1849[/C][C]9.7546[/C][C]16.6153[/C][C]0.0146[/C][C]0.008[/C][C]0.4063[/C][C]0.0479[/C][/ROW]
[ROW][C]117[/C][C]19.8[/C][C]14.4012[/C][C]10.7183[/C][C]18.0841[/C][C]0.002[/C][C]0.0833[/C][C]0.2975[/C][C]0.183[/C][/ROW]
[ROW][C]118[/C][C]17.7[/C][C]13.3106[/C][C]9.3143[/C][C]17.3068[/C][C]0.0157[/C][C]7e-04[/C][C]0.2325[/C][C]0.0856[/C][/ROW]
[ROW][C]119[/C][C]16[/C][C]11.6564[/C][C]7.3941[/C][C]15.9187[/C][C]0.0229[/C][C]0.0027[/C][C]0.349[/C][C]0.0205[/C][/ROW]
[ROW][C]120[/C][C]19.6[/C][C]14.8234[/C][C]10.3222[/C][C]19.3245[/C][C]0.0188[/C][C]0.3042[/C][C]0.2744[/C][C]0.2891[/C][/ROW]
[ROW][C]121[/C][C]19.7[/C][C]15.3379[/C][C]10.577[/C][C]20.0988[/C][C]0.0363[/C][C]0.0397[/C][C]0.3769[/C][C]0.3769[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114791&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114791&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[109])
9719.7-------
9815.6-------
9914.4-------
10013.7-------
10114.1-------
10215-------
10314.2-------
10413.6-------
10515.4-------
10614.8-------
10712.5-------
10816.2-------
10916.1-------
1101614.052512.642815.46220.00340.00220.01570.0022
11115.813.131411.539614.72325e-042e-040.05911e-04
11215.212.799610.869614.72960.00740.00120.18024e-04
11315.712.964610.497415.43180.01490.03790.18350.0064
11418.914.950912.238517.66320.00220.29410.48580.2032
11517.412.96279.881716.04370.00241e-040.21560.023
1161713.18499.754616.61530.01460.0080.40630.0479
11719.814.401210.718318.08410.0020.08330.29750.183
11817.713.31069.314317.30680.01577e-040.23250.0856
1191611.65647.394115.91870.02290.00270.3490.0205
12019.614.823410.322219.32450.01880.30420.27440.2891
12119.715.337910.57720.09880.03630.03970.37690.3769







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1100.05120.138603.792800
1110.06180.20320.17097.12155.45722.3361
1120.07690.18750.17655.7625.55882.3577
1130.09710.2110.18517.48236.03972.4576
1140.09260.26410.200915.59577.95092.8197
1150.12130.34230.224519.68999.90743.1476
1160.13270.28940.233714.554810.57133.2514
1170.13050.37490.251429.146812.89323.5907
1180.15320.32980.260119.266913.60143.688
1190.18660.37260.271318.866514.12793.7587
1200.15490.32220.27622.816414.91783.8624
1210.15840.28440.276719.027915.26033.9064

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
110 & 0.0512 & 0.1386 & 0 & 3.7928 & 0 & 0 \tabularnewline
111 & 0.0618 & 0.2032 & 0.1709 & 7.1215 & 5.4572 & 2.3361 \tabularnewline
112 & 0.0769 & 0.1875 & 0.1765 & 5.762 & 5.5588 & 2.3577 \tabularnewline
113 & 0.0971 & 0.211 & 0.1851 & 7.4823 & 6.0397 & 2.4576 \tabularnewline
114 & 0.0926 & 0.2641 & 0.2009 & 15.5957 & 7.9509 & 2.8197 \tabularnewline
115 & 0.1213 & 0.3423 & 0.2245 & 19.6899 & 9.9074 & 3.1476 \tabularnewline
116 & 0.1327 & 0.2894 & 0.2337 & 14.5548 & 10.5713 & 3.2514 \tabularnewline
117 & 0.1305 & 0.3749 & 0.2514 & 29.1468 & 12.8932 & 3.5907 \tabularnewline
118 & 0.1532 & 0.3298 & 0.2601 & 19.2669 & 13.6014 & 3.688 \tabularnewline
119 & 0.1866 & 0.3726 & 0.2713 & 18.8665 & 14.1279 & 3.7587 \tabularnewline
120 & 0.1549 & 0.3222 & 0.276 & 22.8164 & 14.9178 & 3.8624 \tabularnewline
121 & 0.1584 & 0.2844 & 0.2767 & 19.0279 & 15.2603 & 3.9064 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114791&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]110[/C][C]0.0512[/C][C]0.1386[/C][C]0[/C][C]3.7928[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]111[/C][C]0.0618[/C][C]0.2032[/C][C]0.1709[/C][C]7.1215[/C][C]5.4572[/C][C]2.3361[/C][/ROW]
[ROW][C]112[/C][C]0.0769[/C][C]0.1875[/C][C]0.1765[/C][C]5.762[/C][C]5.5588[/C][C]2.3577[/C][/ROW]
[ROW][C]113[/C][C]0.0971[/C][C]0.211[/C][C]0.1851[/C][C]7.4823[/C][C]6.0397[/C][C]2.4576[/C][/ROW]
[ROW][C]114[/C][C]0.0926[/C][C]0.2641[/C][C]0.2009[/C][C]15.5957[/C][C]7.9509[/C][C]2.8197[/C][/ROW]
[ROW][C]115[/C][C]0.1213[/C][C]0.3423[/C][C]0.2245[/C][C]19.6899[/C][C]9.9074[/C][C]3.1476[/C][/ROW]
[ROW][C]116[/C][C]0.1327[/C][C]0.2894[/C][C]0.2337[/C][C]14.5548[/C][C]10.5713[/C][C]3.2514[/C][/ROW]
[ROW][C]117[/C][C]0.1305[/C][C]0.3749[/C][C]0.2514[/C][C]29.1468[/C][C]12.8932[/C][C]3.5907[/C][/ROW]
[ROW][C]118[/C][C]0.1532[/C][C]0.3298[/C][C]0.2601[/C][C]19.2669[/C][C]13.6014[/C][C]3.688[/C][/ROW]
[ROW][C]119[/C][C]0.1866[/C][C]0.3726[/C][C]0.2713[/C][C]18.8665[/C][C]14.1279[/C][C]3.7587[/C][/ROW]
[ROW][C]120[/C][C]0.1549[/C][C]0.3222[/C][C]0.276[/C][C]22.8164[/C][C]14.9178[/C][C]3.8624[/C][/ROW]
[ROW][C]121[/C][C]0.1584[/C][C]0.2844[/C][C]0.2767[/C][C]19.0279[/C][C]15.2603[/C][C]3.9064[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114791&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114791&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
1100.05120.138603.792800
1110.06180.20320.17097.12155.45722.3361
1120.07690.18750.17655.7625.55882.3577
1130.09710.2110.18517.48236.03972.4576
1140.09260.26410.200915.59577.95092.8197
1150.12130.34230.224519.68999.90743.1476
1160.13270.28940.233714.554810.57133.2514
1170.13050.37490.251429.146812.89323.5907
1180.15320.32980.260119.266913.60143.688
1190.18660.37260.271318.866514.12793.7587
1200.15490.32220.27622.816414.91783.8624
1210.15840.28440.276719.027915.26033.9064



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