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, 03 Dec 2010 14:30:36 +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/03/t1291386567v1beq8pirt6whx8.htm/, Retrieved Tue, 07 May 2024 19:39:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104825, Retrieved Tue, 07 May 2024 19:39:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact172
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [] [2010-12-03 14:30:36] [df17410ebb98883e83037e1662207ccb] [Current]
- RMPD          [ARIMA Backward Selection] [] [2010-12-14 13:02:35] [9b13650c94c5192ca5135ec8a1fa39f7]
-   PD          [ARIMA Forecasting] [] [2010-12-14 13:04:06] [9b13650c94c5192ca5135ec8a1fa39f7]
- RMPD          [ARIMA Backward Selection] [] [2010-12-17 09:15:50] [8a9a6f7c332640af31ddca253a8ded58]
-   PD          [ARIMA Forecasting] [] [2010-12-17 09:23:13] [8a9a6f7c332640af31ddca253a8ded58]
Feedback Forum

Post a new message
Dataseries X:
101,76
102,37
102,38
102,86
102,87
102,92
102,95
103,02
104,08
104,16
104,24
104,33
104,73
104,86
105,03
105,62
105,63
105,63
105,94
106,61
107,69
107,78
107,93
108,48
108,14
108,48
108,48
108,89
108,93
109,21
109,47
109,80
111,73
111,85
112,12
112,15
112,17
112,67
112,80
113,44
113,53
114,53
114,51
115,05
116,67
117,07
116,92
117,00
117,02
117,35
117,36
117,82
117,88
118,24
118,50
118,80
119,76
120,09




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104825&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104825&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104825&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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[46])
34111.85-------
35112.12-------
36112.15-------
37112.17-------
38112.67-------
39112.8-------
40113.44-------
41113.53-------
42114.53-------
43114.51-------
44115.05-------
45116.67-------
46117.07-------
47116.92117.3186116.7516117.88560.08410.804910.8049
48117117.6293116.9171118.34140.04170.974510.9381
49117.02117.7054116.8411118.56970.060.945210.9252
50117.35118.2363117.2381119.23460.04090.991510.989
51117.36118.4393117.313119.56570.03020.97110.9914
52117.82119.1107117.8621120.35930.02140.99710.9993
53117.88119.2816117.9145120.64870.02220.981910.9992
54118.24119.9817118.499121.46430.01070.997310.9999
55118.5120.1967118.6008121.79260.01860.991910.9999
56118.8120.7696119.0623122.4770.01190.995411
57119.76122.4554120.638124.27270.0018111
58120.09122.8228120.8967124.7490.00270.999111

\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[46]) \tabularnewline
34 & 111.85 & - & - & - & - & - & - & - \tabularnewline
35 & 112.12 & - & - & - & - & - & - & - \tabularnewline
36 & 112.15 & - & - & - & - & - & - & - \tabularnewline
37 & 112.17 & - & - & - & - & - & - & - \tabularnewline
38 & 112.67 & - & - & - & - & - & - & - \tabularnewline
39 & 112.8 & - & - & - & - & - & - & - \tabularnewline
40 & 113.44 & - & - & - & - & - & - & - \tabularnewline
41 & 113.53 & - & - & - & - & - & - & - \tabularnewline
42 & 114.53 & - & - & - & - & - & - & - \tabularnewline
43 & 114.51 & - & - & - & - & - & - & - \tabularnewline
44 & 115.05 & - & - & - & - & - & - & - \tabularnewline
45 & 116.67 & - & - & - & - & - & - & - \tabularnewline
46 & 117.07 & - & - & - & - & - & - & - \tabularnewline
47 & 116.92 & 117.3186 & 116.7516 & 117.8856 & 0.0841 & 0.8049 & 1 & 0.8049 \tabularnewline
48 & 117 & 117.6293 & 116.9171 & 118.3414 & 0.0417 & 0.9745 & 1 & 0.9381 \tabularnewline
49 & 117.02 & 117.7054 & 116.8411 & 118.5697 & 0.06 & 0.9452 & 1 & 0.9252 \tabularnewline
50 & 117.35 & 118.2363 & 117.2381 & 119.2346 & 0.0409 & 0.9915 & 1 & 0.989 \tabularnewline
51 & 117.36 & 118.4393 & 117.313 & 119.5657 & 0.0302 & 0.971 & 1 & 0.9914 \tabularnewline
52 & 117.82 & 119.1107 & 117.8621 & 120.3593 & 0.0214 & 0.997 & 1 & 0.9993 \tabularnewline
53 & 117.88 & 119.2816 & 117.9145 & 120.6487 & 0.0222 & 0.9819 & 1 & 0.9992 \tabularnewline
54 & 118.24 & 119.9817 & 118.499 & 121.4643 & 0.0107 & 0.9973 & 1 & 0.9999 \tabularnewline
55 & 118.5 & 120.1967 & 118.6008 & 121.7926 & 0.0186 & 0.9919 & 1 & 0.9999 \tabularnewline
56 & 118.8 & 120.7696 & 119.0623 & 122.477 & 0.0119 & 0.9954 & 1 & 1 \tabularnewline
57 & 119.76 & 122.4554 & 120.638 & 124.2727 & 0.0018 & 1 & 1 & 1 \tabularnewline
58 & 120.09 & 122.8228 & 120.8967 & 124.749 & 0.0027 & 0.9991 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104825&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[46])[/C][/ROW]
[ROW][C]34[/C][C]111.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]112.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]112.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]112.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]113.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]113.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]114.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]114.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]115.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]116.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]117.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]116.92[/C][C]117.3186[/C][C]116.7516[/C][C]117.8856[/C][C]0.0841[/C][C]0.8049[/C][C]1[/C][C]0.8049[/C][/ROW]
[ROW][C]48[/C][C]117[/C][C]117.6293[/C][C]116.9171[/C][C]118.3414[/C][C]0.0417[/C][C]0.9745[/C][C]1[/C][C]0.9381[/C][/ROW]
[ROW][C]49[/C][C]117.02[/C][C]117.7054[/C][C]116.8411[/C][C]118.5697[/C][C]0.06[/C][C]0.9452[/C][C]1[/C][C]0.9252[/C][/ROW]
[ROW][C]50[/C][C]117.35[/C][C]118.2363[/C][C]117.2381[/C][C]119.2346[/C][C]0.0409[/C][C]0.9915[/C][C]1[/C][C]0.989[/C][/ROW]
[ROW][C]51[/C][C]117.36[/C][C]118.4393[/C][C]117.313[/C][C]119.5657[/C][C]0.0302[/C][C]0.971[/C][C]1[/C][C]0.9914[/C][/ROW]
[ROW][C]52[/C][C]117.82[/C][C]119.1107[/C][C]117.8621[/C][C]120.3593[/C][C]0.0214[/C][C]0.997[/C][C]1[/C][C]0.9993[/C][/ROW]
[ROW][C]53[/C][C]117.88[/C][C]119.2816[/C][C]117.9145[/C][C]120.6487[/C][C]0.0222[/C][C]0.9819[/C][C]1[/C][C]0.9992[/C][/ROW]
[ROW][C]54[/C][C]118.24[/C][C]119.9817[/C][C]118.499[/C][C]121.4643[/C][C]0.0107[/C][C]0.9973[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]55[/C][C]118.5[/C][C]120.1967[/C][C]118.6008[/C][C]121.7926[/C][C]0.0186[/C][C]0.9919[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]56[/C][C]118.8[/C][C]120.7696[/C][C]119.0623[/C][C]122.477[/C][C]0.0119[/C][C]0.9954[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]119.76[/C][C]122.4554[/C][C]120.638[/C][C]124.2727[/C][C]0.0018[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]120.09[/C][C]122.8228[/C][C]120.8967[/C][C]124.749[/C][C]0.0027[/C][C]0.9991[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104825&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104825&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[46])
34111.85-------
35112.12-------
36112.15-------
37112.17-------
38112.67-------
39112.8-------
40113.44-------
41113.53-------
42114.53-------
43114.51-------
44115.05-------
45116.67-------
46117.07-------
47116.92117.3186116.7516117.88560.08410.804910.8049
48117117.6293116.9171118.34140.04170.974510.9381
49117.02117.7054116.8411118.56970.060.945210.9252
50117.35118.2363117.2381119.23460.04090.991510.989
51117.36118.4393117.313119.56570.03020.97110.9914
52117.82119.1107117.8621120.35930.02140.99710.9993
53117.88119.2816117.9145120.64870.02220.981910.9992
54118.24119.9817118.499121.46430.01070.997310.9999
55118.5120.1967118.6008121.79260.01860.991910.9999
56118.8120.7696119.0623122.4770.01190.995411
57119.76122.4554120.638124.27270.0018111
58120.09122.8228120.8967124.7490.00270.999111







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.0025-0.003400.158900
480.0031-0.00530.00440.3960.27740.5267
490.0037-0.00580.00490.46980.34160.5844
500.0043-0.00750.00550.78560.45260.6727
510.0049-0.00910.00621.1650.5950.7714
520.0053-0.01080.0071.6660.77350.8795
530.0058-0.01180.00771.96450.94370.9714
540.0063-0.01450.00853.03341.20491.0977
550.0068-0.01410.00922.87881.39091.1794
560.0072-0.01630.00993.87951.63971.2805
570.0076-0.0220.0117.2652.15111.4667
580.008-0.02230.01197.46832.59421.6107

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
47 & 0.0025 & -0.0034 & 0 & 0.1589 & 0 & 0 \tabularnewline
48 & 0.0031 & -0.0053 & 0.0044 & 0.396 & 0.2774 & 0.5267 \tabularnewline
49 & 0.0037 & -0.0058 & 0.0049 & 0.4698 & 0.3416 & 0.5844 \tabularnewline
50 & 0.0043 & -0.0075 & 0.0055 & 0.7856 & 0.4526 & 0.6727 \tabularnewline
51 & 0.0049 & -0.0091 & 0.0062 & 1.165 & 0.595 & 0.7714 \tabularnewline
52 & 0.0053 & -0.0108 & 0.007 & 1.666 & 0.7735 & 0.8795 \tabularnewline
53 & 0.0058 & -0.0118 & 0.0077 & 1.9645 & 0.9437 & 0.9714 \tabularnewline
54 & 0.0063 & -0.0145 & 0.0085 & 3.0334 & 1.2049 & 1.0977 \tabularnewline
55 & 0.0068 & -0.0141 & 0.0092 & 2.8788 & 1.3909 & 1.1794 \tabularnewline
56 & 0.0072 & -0.0163 & 0.0099 & 3.8795 & 1.6397 & 1.2805 \tabularnewline
57 & 0.0076 & -0.022 & 0.011 & 7.265 & 2.1511 & 1.4667 \tabularnewline
58 & 0.008 & -0.0223 & 0.0119 & 7.4683 & 2.5942 & 1.6107 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104825&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]47[/C][C]0.0025[/C][C]-0.0034[/C][C]0[/C][C]0.1589[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]0.0031[/C][C]-0.0053[/C][C]0.0044[/C][C]0.396[/C][C]0.2774[/C][C]0.5267[/C][/ROW]
[ROW][C]49[/C][C]0.0037[/C][C]-0.0058[/C][C]0.0049[/C][C]0.4698[/C][C]0.3416[/C][C]0.5844[/C][/ROW]
[ROW][C]50[/C][C]0.0043[/C][C]-0.0075[/C][C]0.0055[/C][C]0.7856[/C][C]0.4526[/C][C]0.6727[/C][/ROW]
[ROW][C]51[/C][C]0.0049[/C][C]-0.0091[/C][C]0.0062[/C][C]1.165[/C][C]0.595[/C][C]0.7714[/C][/ROW]
[ROW][C]52[/C][C]0.0053[/C][C]-0.0108[/C][C]0.007[/C][C]1.666[/C][C]0.7735[/C][C]0.8795[/C][/ROW]
[ROW][C]53[/C][C]0.0058[/C][C]-0.0118[/C][C]0.0077[/C][C]1.9645[/C][C]0.9437[/C][C]0.9714[/C][/ROW]
[ROW][C]54[/C][C]0.0063[/C][C]-0.0145[/C][C]0.0085[/C][C]3.0334[/C][C]1.2049[/C][C]1.0977[/C][/ROW]
[ROW][C]55[/C][C]0.0068[/C][C]-0.0141[/C][C]0.0092[/C][C]2.8788[/C][C]1.3909[/C][C]1.1794[/C][/ROW]
[ROW][C]56[/C][C]0.0072[/C][C]-0.0163[/C][C]0.0099[/C][C]3.8795[/C][C]1.6397[/C][C]1.2805[/C][/ROW]
[ROW][C]57[/C][C]0.0076[/C][C]-0.022[/C][C]0.011[/C][C]7.265[/C][C]2.1511[/C][C]1.4667[/C][/ROW]
[ROW][C]58[/C][C]0.008[/C][C]-0.0223[/C][C]0.0119[/C][C]7.4683[/C][C]2.5942[/C][C]1.6107[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104825&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104825&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
470.0025-0.003400.158900
480.0031-0.00530.00440.3960.27740.5267
490.0037-0.00580.00490.46980.34160.5844
500.0043-0.00750.00550.78560.45260.6727
510.0049-0.00910.00621.1650.5950.7714
520.0053-0.01080.0071.6660.77350.8795
530.0058-0.01180.00771.96450.94370.9714
540.0063-0.01450.00853.03341.20491.0977
550.0068-0.01410.00922.87881.39091.1794
560.0072-0.01630.00993.87951.63971.2805
570.0076-0.0220.0117.2652.15111.4667
580.008-0.02230.01197.46832.59421.6107



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