Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 10:27:39 -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/06/t1196961374yimr75t4vz8u8bo.htm/, Retrieved Fri, 03 May 2024 03:51:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2692, Retrieved Fri, 03 May 2024 03:51:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsArima extrapolatin forecast
Estimated Impact188
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Workshop 9] [2007-12-06 17:27:39] [374a040e40dd748baa758ef078993f27] [Current]
Feedback Forum

Post a new message
Dataseries X:
88.74
88.92
88.77
89.17
89.61
89.52
89.74
89.40
89.36
89.38
89.36
89.29
89.59
89.79
89.86
90.21
90.37
90.19
90.33
90.22
90.42
90.54
90.73
91.02
91.19
91.53
91.88
92.06
92.32
92.67
92.85
92.82
93.46
93.23
93.54
93.29
93.20
93.60
93.81
94.62
95.22
95.38
95.31
95.30
95.57
95.42
95.53
95.33
95.90
96.06
96.31
96.34
96.49
96.22
96.53
96.50
96.77
96.66
96.58
96.63
97.06
97.73
98.01
97.76
97.49
97.77
97.96
98.23
98.51
98.19
98.37
98.31
98.60
98.97
99.11
99.64
100.03
99.98
100.32
100.44
100.51
101.00
100.88
100.55
100.83
101.51
102.16
102.39
102.54
102.85
103.47
103.57
103.69
103.50
103.47
103.45
103.48
103.93
103.89
104.40
104.79
104.77
105.13
105.26
104.96
104.75
105.01
105.15
105.20
105.77
105.78
106.26
106.13
106.12
106.57
106.44
106.54




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2692&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]1 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=2692&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2692&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 time1 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])
93103.69-------
94103.5-------
95103.47-------
96103.45-------
97103.48-------
98103.93-------
99103.89-------
100104.4-------
101104.79-------
102104.77-------
103105.13-------
104105.26-------
105104.96-------
106104.75104.9208104.416105.4280.25460.439810.4398
107105.01104.9732104.2597105.69150.460.728710.5144
108105.15104.9005104.0279105.78030.28920.40360.99940.4473
109105.2105.1225104.1135106.14130.44070.47890.99920.6227
110105.77105.4978104.3669106.6410.32040.69520.99640.8218
111105.78105.6871104.4471106.94190.44230.44850.99750.872
112106.26105.9775104.6353107.33680.34190.61210.98850.9288
113106.13106.2089104.7718107.66570.45770.47260.97190.9536
114106.12106.2648104.7406107.81120.42720.56780.97090.9509
115106.57106.521104.9113108.15550.47660.68470.95240.9694
116106.44106.5494104.8615108.26460.45020.49060.92970.9653
117106.54106.6811104.9167108.47520.43870.60390.970.97

\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 & 103.69 & - & - & - & - & - & - & - \tabularnewline
94 & 103.5 & - & - & - & - & - & - & - \tabularnewline
95 & 103.47 & - & - & - & - & - & - & - \tabularnewline
96 & 103.45 & - & - & - & - & - & - & - \tabularnewline
97 & 103.48 & - & - & - & - & - & - & - \tabularnewline
98 & 103.93 & - & - & - & - & - & - & - \tabularnewline
99 & 103.89 & - & - & - & - & - & - & - \tabularnewline
100 & 104.4 & - & - & - & - & - & - & - \tabularnewline
101 & 104.79 & - & - & - & - & - & - & - \tabularnewline
102 & 104.77 & - & - & - & - & - & - & - \tabularnewline
103 & 105.13 & - & - & - & - & - & - & - \tabularnewline
104 & 105.26 & - & - & - & - & - & - & - \tabularnewline
105 & 104.96 & - & - & - & - & - & - & - \tabularnewline
106 & 104.75 & 104.9208 & 104.416 & 105.428 & 0.2546 & 0.4398 & 1 & 0.4398 \tabularnewline
107 & 105.01 & 104.9732 & 104.2597 & 105.6915 & 0.46 & 0.7287 & 1 & 0.5144 \tabularnewline
108 & 105.15 & 104.9005 & 104.0279 & 105.7803 & 0.2892 & 0.4036 & 0.9994 & 0.4473 \tabularnewline
109 & 105.2 & 105.1225 & 104.1135 & 106.1413 & 0.4407 & 0.4789 & 0.9992 & 0.6227 \tabularnewline
110 & 105.77 & 105.4978 & 104.3669 & 106.641 & 0.3204 & 0.6952 & 0.9964 & 0.8218 \tabularnewline
111 & 105.78 & 105.6871 & 104.4471 & 106.9419 & 0.4423 & 0.4485 & 0.9975 & 0.872 \tabularnewline
112 & 106.26 & 105.9775 & 104.6353 & 107.3368 & 0.3419 & 0.6121 & 0.9885 & 0.9288 \tabularnewline
113 & 106.13 & 106.2089 & 104.7718 & 107.6657 & 0.4577 & 0.4726 & 0.9719 & 0.9536 \tabularnewline
114 & 106.12 & 106.2648 & 104.7406 & 107.8112 & 0.4272 & 0.5678 & 0.9709 & 0.9509 \tabularnewline
115 & 106.57 & 106.521 & 104.9113 & 108.1555 & 0.4766 & 0.6847 & 0.9524 & 0.9694 \tabularnewline
116 & 106.44 & 106.5494 & 104.8615 & 108.2646 & 0.4502 & 0.4906 & 0.9297 & 0.9653 \tabularnewline
117 & 106.54 & 106.6811 & 104.9167 & 108.4752 & 0.4387 & 0.6039 & 0.97 & 0.97 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2692&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]103.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]103.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]103.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]103.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]103.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]103.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]103.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]104.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]104.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]105.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]105.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]104.96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]104.75[/C][C]104.9208[/C][C]104.416[/C][C]105.428[/C][C]0.2546[/C][C]0.4398[/C][C]1[/C][C]0.4398[/C][/ROW]
[ROW][C]107[/C][C]105.01[/C][C]104.9732[/C][C]104.2597[/C][C]105.6915[/C][C]0.46[/C][C]0.7287[/C][C]1[/C][C]0.5144[/C][/ROW]
[ROW][C]108[/C][C]105.15[/C][C]104.9005[/C][C]104.0279[/C][C]105.7803[/C][C]0.2892[/C][C]0.4036[/C][C]0.9994[/C][C]0.4473[/C][/ROW]
[ROW][C]109[/C][C]105.2[/C][C]105.1225[/C][C]104.1135[/C][C]106.1413[/C][C]0.4407[/C][C]0.4789[/C][C]0.9992[/C][C]0.6227[/C][/ROW]
[ROW][C]110[/C][C]105.77[/C][C]105.4978[/C][C]104.3669[/C][C]106.641[/C][C]0.3204[/C][C]0.6952[/C][C]0.9964[/C][C]0.8218[/C][/ROW]
[ROW][C]111[/C][C]105.78[/C][C]105.6871[/C][C]104.4471[/C][C]106.9419[/C][C]0.4423[/C][C]0.4485[/C][C]0.9975[/C][C]0.872[/C][/ROW]
[ROW][C]112[/C][C]106.26[/C][C]105.9775[/C][C]104.6353[/C][C]107.3368[/C][C]0.3419[/C][C]0.6121[/C][C]0.9885[/C][C]0.9288[/C][/ROW]
[ROW][C]113[/C][C]106.13[/C][C]106.2089[/C][C]104.7718[/C][C]107.6657[/C][C]0.4577[/C][C]0.4726[/C][C]0.9719[/C][C]0.9536[/C][/ROW]
[ROW][C]114[/C][C]106.12[/C][C]106.2648[/C][C]104.7406[/C][C]107.8112[/C][C]0.4272[/C][C]0.5678[/C][C]0.9709[/C][C]0.9509[/C][/ROW]
[ROW][C]115[/C][C]106.57[/C][C]106.521[/C][C]104.9113[/C][C]108.1555[/C][C]0.4766[/C][C]0.6847[/C][C]0.9524[/C][C]0.9694[/C][/ROW]
[ROW][C]116[/C][C]106.44[/C][C]106.5494[/C][C]104.8615[/C][C]108.2646[/C][C]0.4502[/C][C]0.4906[/C][C]0.9297[/C][C]0.9653[/C][/ROW]
[ROW][C]117[/C][C]106.54[/C][C]106.6811[/C][C]104.9167[/C][C]108.4752[/C][C]0.4387[/C][C]0.6039[/C][C]0.97[/C][C]0.97[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2692&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2692&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])
93103.69-------
94103.5-------
95103.47-------
96103.45-------
97103.48-------
98103.93-------
99103.89-------
100104.4-------
101104.79-------
102104.77-------
103105.13-------
104105.26-------
105104.96-------
106104.75104.9208104.416105.4280.25460.439810.4398
107105.01104.9732104.2597105.69150.460.728710.5144
108105.15104.9005104.0279105.78030.28920.40360.99940.4473
109105.2105.1225104.1135106.14130.44070.47890.99920.6227
110105.77105.4978104.3669106.6410.32040.69520.99640.8218
111105.78105.6871104.4471106.94190.44230.44850.99750.872
112106.26105.9775104.6353107.33680.34190.61210.98850.9288
113106.13106.2089104.7718107.66570.45770.47260.97190.9536
114106.12106.2648104.7406107.81120.42720.56780.97090.9509
115106.57106.521104.9113108.15550.47660.68470.95240.9694
116106.44106.5494104.8615108.26460.45020.49060.92970.9653
117106.54106.6811104.9167108.47520.43870.60390.970.97







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.0025-0.00161e-040.02920.00240.0493
1070.00354e-0400.00141e-040.0106
1080.00430.00242e-040.06230.00520.072
1090.00497e-041e-040.0065e-040.0224
1100.00550.00262e-040.07410.00620.0786
1110.00619e-041e-040.00867e-040.0268
1120.00650.00272e-040.07980.00670.0816
1130.007-7e-041e-040.00625e-040.0228
1140.0074-0.00141e-040.0210.00170.0418
1150.00785e-0400.00242e-040.0141
1160.0082-0.0011e-040.0120.0010.0316
1170.0086-0.00131e-040.01990.00170.0407

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.0025 & -0.0016 & 1e-04 & 0.0292 & 0.0024 & 0.0493 \tabularnewline
107 & 0.0035 & 4e-04 & 0 & 0.0014 & 1e-04 & 0.0106 \tabularnewline
108 & 0.0043 & 0.0024 & 2e-04 & 0.0623 & 0.0052 & 0.072 \tabularnewline
109 & 0.0049 & 7e-04 & 1e-04 & 0.006 & 5e-04 & 0.0224 \tabularnewline
110 & 0.0055 & 0.0026 & 2e-04 & 0.0741 & 0.0062 & 0.0786 \tabularnewline
111 & 0.0061 & 9e-04 & 1e-04 & 0.0086 & 7e-04 & 0.0268 \tabularnewline
112 & 0.0065 & 0.0027 & 2e-04 & 0.0798 & 0.0067 & 0.0816 \tabularnewline
113 & 0.007 & -7e-04 & 1e-04 & 0.0062 & 5e-04 & 0.0228 \tabularnewline
114 & 0.0074 & -0.0014 & 1e-04 & 0.021 & 0.0017 & 0.0418 \tabularnewline
115 & 0.0078 & 5e-04 & 0 & 0.0024 & 2e-04 & 0.0141 \tabularnewline
116 & 0.0082 & -0.001 & 1e-04 & 0.012 & 0.001 & 0.0316 \tabularnewline
117 & 0.0086 & -0.0013 & 1e-04 & 0.0199 & 0.0017 & 0.0407 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2692&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.0025[/C][C]-0.0016[/C][C]1e-04[/C][C]0.0292[/C][C]0.0024[/C][C]0.0493[/C][/ROW]
[ROW][C]107[/C][C]0.0035[/C][C]4e-04[/C][C]0[/C][C]0.0014[/C][C]1e-04[/C][C]0.0106[/C][/ROW]
[ROW][C]108[/C][C]0.0043[/C][C]0.0024[/C][C]2e-04[/C][C]0.0623[/C][C]0.0052[/C][C]0.072[/C][/ROW]
[ROW][C]109[/C][C]0.0049[/C][C]7e-04[/C][C]1e-04[/C][C]0.006[/C][C]5e-04[/C][C]0.0224[/C][/ROW]
[ROW][C]110[/C][C]0.0055[/C][C]0.0026[/C][C]2e-04[/C][C]0.0741[/C][C]0.0062[/C][C]0.0786[/C][/ROW]
[ROW][C]111[/C][C]0.0061[/C][C]9e-04[/C][C]1e-04[/C][C]0.0086[/C][C]7e-04[/C][C]0.0268[/C][/ROW]
[ROW][C]112[/C][C]0.0065[/C][C]0.0027[/C][C]2e-04[/C][C]0.0798[/C][C]0.0067[/C][C]0.0816[/C][/ROW]
[ROW][C]113[/C][C]0.007[/C][C]-7e-04[/C][C]1e-04[/C][C]0.0062[/C][C]5e-04[/C][C]0.0228[/C][/ROW]
[ROW][C]114[/C][C]0.0074[/C][C]-0.0014[/C][C]1e-04[/C][C]0.021[/C][C]0.0017[/C][C]0.0418[/C][/ROW]
[ROW][C]115[/C][C]0.0078[/C][C]5e-04[/C][C]0[/C][C]0.0024[/C][C]2e-04[/C][C]0.0141[/C][/ROW]
[ROW][C]116[/C][C]0.0082[/C][C]-0.001[/C][C]1e-04[/C][C]0.012[/C][C]0.001[/C][C]0.0316[/C][/ROW]
[ROW][C]117[/C][C]0.0086[/C][C]-0.0013[/C][C]1e-04[/C][C]0.0199[/C][C]0.0017[/C][C]0.0407[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2692&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2692&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.0025-0.00161e-040.02920.00240.0493
1070.00354e-0400.00141e-040.0106
1080.00430.00242e-040.06230.00520.072
1090.00497e-041e-040.0065e-040.0224
1100.00550.00262e-040.07410.00620.0786
1110.00619e-041e-040.00867e-040.0268
1120.00650.00272e-040.07980.00670.0816
1130.007-7e-041e-040.00625e-040.0228
1140.0074-0.00141e-040.0210.00170.0418
1150.00785e-0400.00242e-040.0141
1160.0082-0.0011e-040.0120.0010.0316
1170.0086-0.00131e-040.01990.00170.0407



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