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 computationSat, 13 Dec 2008 07:12:52 -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/2008/Dec/13/t1229177627016l3mu8sbetvvf.htm/, Retrieved Fri, 17 May 2024 04:42:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33109, Retrieved Fri, 17 May 2024 04:42:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsIn samenwerking met Roland Feldman
Estimated Impact184
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Run sequence plot...] [2008-12-02 22:19:27] [ed2ba3b6182103c15c0ab511ae4e6284]
- RMPD  [Standard Deviation-Mean Plot] [SD mean plot] [2008-12-06 11:49:39] [ed2ba3b6182103c15c0ab511ae4e6284]
F RMP     [(Partial) Autocorrelation Function] [ACF d=1 en D=1 la...] [2008-12-06 13:30:27] [ed2ba3b6182103c15c0ab511ae4e6284]
- RM        [ARIMA Backward Selection] [ARIMA model met q...] [2008-12-06 17:04:18] [4242609301e759e844b9196c1994e4ef]
-   P         [ARIMA Backward Selection] [ARima backward se...] [2008-12-08 11:53:47] [ed2ba3b6182103c15c0ab511ae4e6284]
-   P           [ARIMA Backward Selection] [MA controle] [2008-12-08 11:58:59] [ed2ba3b6182103c15c0ab511ae4e6284]
F                 [ARIMA Backward Selection] [ARIMA] [2008-12-08 20:02:58] [4ad596f10399a71ad29b7d76e6ab90ac]
- RMP                 [ARIMA Forecasting] [ARIMA forecast HI...] [2008-12-13 14:12:52] [a8228479d4547a92e2d3f176a5299609] [Current]
Feedback Forum

Post a new message
Dataseries X:
92.66
94.2
94.37
94.45
94.62
94.37
93.43
94.79
94.88
94.79
94.62
94.71
93.77
95.73
95.99
95.82
95.47
95.82
94.71
96.33
96.5
96.16
96.33
96.33
95.05
96.84
96.92
97.44
97.78
97.69
96.67
98.29
98.2
98.71
98.54
98.2
96.92
99.06
99.65
99.82
99.99
100.33
99.31
101.1
101.1
100.93
100.85
100.93
99.6
101.88
101.81
102.38
102.74
102.82
101.72
103.47
102.98
102.68
102.9
103.03
101.29




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33109&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33109&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33109&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'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[49])
3796.92-------
3899.06-------
3999.65-------
4099.82-------
4199.99-------
42100.33-------
4399.31-------
44101.1-------
45101.1-------
46100.93-------
47100.85-------
48100.93-------
4999.6-------
50101.88101.4892101.0029101.97560.0576111
51101.81101.7138101.026102.40160.3920.317911
52102.38102.1346101.2922102.9770.2840.774911
53102.74102.4264101.4537103.39910.26370.537211
54102.82102.4583101.3708103.54580.25720.30580.99991
55101.72101.4383100.247102.62960.32150.01150.99980.9988
56103.47103.1065101.8197104.39320.28990.98270.99891
57102.98103.042101.6664104.41760.46480.2710.99721
58102.68103.3592101.9002104.81830.18080.69480.99941
59102.9103.2147101.6768104.75270.34420.75220.99871
60103.03102.9938101.3808104.60680.48250.54540.99391
61101.29101.6996100.0149103.38440.31680.06080.99270.9927

\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[49]) \tabularnewline
37 & 96.92 & - & - & - & - & - & - & - \tabularnewline
38 & 99.06 & - & - & - & - & - & - & - \tabularnewline
39 & 99.65 & - & - & - & - & - & - & - \tabularnewline
40 & 99.82 & - & - & - & - & - & - & - \tabularnewline
41 & 99.99 & - & - & - & - & - & - & - \tabularnewline
42 & 100.33 & - & - & - & - & - & - & - \tabularnewline
43 & 99.31 & - & - & - & - & - & - & - \tabularnewline
44 & 101.1 & - & - & - & - & - & - & - \tabularnewline
45 & 101.1 & - & - & - & - & - & - & - \tabularnewline
46 & 100.93 & - & - & - & - & - & - & - \tabularnewline
47 & 100.85 & - & - & - & - & - & - & - \tabularnewline
48 & 100.93 & - & - & - & - & - & - & - \tabularnewline
49 & 99.6 & - & - & - & - & - & - & - \tabularnewline
50 & 101.88 & 101.4892 & 101.0029 & 101.9756 & 0.0576 & 1 & 1 & 1 \tabularnewline
51 & 101.81 & 101.7138 & 101.026 & 102.4016 & 0.392 & 0.3179 & 1 & 1 \tabularnewline
52 & 102.38 & 102.1346 & 101.2922 & 102.977 & 0.284 & 0.7749 & 1 & 1 \tabularnewline
53 & 102.74 & 102.4264 & 101.4537 & 103.3991 & 0.2637 & 0.5372 & 1 & 1 \tabularnewline
54 & 102.82 & 102.4583 & 101.3708 & 103.5458 & 0.2572 & 0.3058 & 0.9999 & 1 \tabularnewline
55 & 101.72 & 101.4383 & 100.247 & 102.6296 & 0.3215 & 0.0115 & 0.9998 & 0.9988 \tabularnewline
56 & 103.47 & 103.1065 & 101.8197 & 104.3932 & 0.2899 & 0.9827 & 0.9989 & 1 \tabularnewline
57 & 102.98 & 103.042 & 101.6664 & 104.4176 & 0.4648 & 0.271 & 0.9972 & 1 \tabularnewline
58 & 102.68 & 103.3592 & 101.9002 & 104.8183 & 0.1808 & 0.6948 & 0.9994 & 1 \tabularnewline
59 & 102.9 & 103.2147 & 101.6768 & 104.7527 & 0.3442 & 0.7522 & 0.9987 & 1 \tabularnewline
60 & 103.03 & 102.9938 & 101.3808 & 104.6068 & 0.4825 & 0.5454 & 0.9939 & 1 \tabularnewline
61 & 101.29 & 101.6996 & 100.0149 & 103.3844 & 0.3168 & 0.0608 & 0.9927 & 0.9927 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33109&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[49])[/C][/ROW]
[ROW][C]37[/C][C]96.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]99.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]99.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]99.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]99.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]100.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]99.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]100.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]100.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]100.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]99.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]101.88[/C][C]101.4892[/C][C]101.0029[/C][C]101.9756[/C][C]0.0576[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]101.81[/C][C]101.7138[/C][C]101.026[/C][C]102.4016[/C][C]0.392[/C][C]0.3179[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]102.38[/C][C]102.1346[/C][C]101.2922[/C][C]102.977[/C][C]0.284[/C][C]0.7749[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]102.74[/C][C]102.4264[/C][C]101.4537[/C][C]103.3991[/C][C]0.2637[/C][C]0.5372[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]102.82[/C][C]102.4583[/C][C]101.3708[/C][C]103.5458[/C][C]0.2572[/C][C]0.3058[/C][C]0.9999[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]101.72[/C][C]101.4383[/C][C]100.247[/C][C]102.6296[/C][C]0.3215[/C][C]0.0115[/C][C]0.9998[/C][C]0.9988[/C][/ROW]
[ROW][C]56[/C][C]103.47[/C][C]103.1065[/C][C]101.8197[/C][C]104.3932[/C][C]0.2899[/C][C]0.9827[/C][C]0.9989[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]102.98[/C][C]103.042[/C][C]101.6664[/C][C]104.4176[/C][C]0.4648[/C][C]0.271[/C][C]0.9972[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]102.68[/C][C]103.3592[/C][C]101.9002[/C][C]104.8183[/C][C]0.1808[/C][C]0.6948[/C][C]0.9994[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]102.9[/C][C]103.2147[/C][C]101.6768[/C][C]104.7527[/C][C]0.3442[/C][C]0.7522[/C][C]0.9987[/C][C]1[/C][/ROW]
[ROW][C]60[/C][C]103.03[/C][C]102.9938[/C][C]101.3808[/C][C]104.6068[/C][C]0.4825[/C][C]0.5454[/C][C]0.9939[/C][C]1[/C][/ROW]
[ROW][C]61[/C][C]101.29[/C][C]101.6996[/C][C]100.0149[/C][C]103.3844[/C][C]0.3168[/C][C]0.0608[/C][C]0.9927[/C][C]0.9927[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33109&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33109&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[49])
3796.92-------
3899.06-------
3999.65-------
4099.82-------
4199.99-------
42100.33-------
4399.31-------
44101.1-------
45101.1-------
46100.93-------
47100.85-------
48100.93-------
4999.6-------
50101.88101.4892101.0029101.97560.0576111
51101.81101.7138101.026102.40160.3920.317911
52102.38102.1346101.2922102.9770.2840.774911
53102.74102.4264101.4537103.39910.26370.537211
54102.82102.4583101.3708103.54580.25720.30580.99991
55101.72101.4383100.247102.62960.32150.01150.99980.9988
56103.47103.1065101.8197104.39320.28990.98270.99891
57102.98103.042101.6664104.41760.46480.2710.99721
58102.68103.3592101.9002104.81830.18080.69480.99941
59102.9103.2147101.6768104.75270.34420.75220.99871
60103.03102.9938101.3808104.60680.48250.54540.99391
61101.29101.6996100.0149103.38440.31680.06080.99270.9927







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.00240.00393e-040.15270.01270.1128
510.00359e-041e-040.00938e-040.0278
520.00420.00242e-040.06020.0050.0708
530.00480.00313e-040.09840.00820.0905
540.00540.00353e-040.13080.01090.1044
550.0060.00282e-040.07940.00660.0813
560.00640.00353e-040.13220.0110.1049
570.0068-6e-041e-040.00383e-040.0179
580.0072-0.00665e-040.46130.03840.1961
590.0076-0.0033e-040.09910.00830.0909
600.0084e-0400.00131e-040.0105
610.0085-0.0043e-040.16780.0140.1182

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0024 & 0.0039 & 3e-04 & 0.1527 & 0.0127 & 0.1128 \tabularnewline
51 & 0.0035 & 9e-04 & 1e-04 & 0.0093 & 8e-04 & 0.0278 \tabularnewline
52 & 0.0042 & 0.0024 & 2e-04 & 0.0602 & 0.005 & 0.0708 \tabularnewline
53 & 0.0048 & 0.0031 & 3e-04 & 0.0984 & 0.0082 & 0.0905 \tabularnewline
54 & 0.0054 & 0.0035 & 3e-04 & 0.1308 & 0.0109 & 0.1044 \tabularnewline
55 & 0.006 & 0.0028 & 2e-04 & 0.0794 & 0.0066 & 0.0813 \tabularnewline
56 & 0.0064 & 0.0035 & 3e-04 & 0.1322 & 0.011 & 0.1049 \tabularnewline
57 & 0.0068 & -6e-04 & 1e-04 & 0.0038 & 3e-04 & 0.0179 \tabularnewline
58 & 0.0072 & -0.0066 & 5e-04 & 0.4613 & 0.0384 & 0.1961 \tabularnewline
59 & 0.0076 & -0.003 & 3e-04 & 0.0991 & 0.0083 & 0.0909 \tabularnewline
60 & 0.008 & 4e-04 & 0 & 0.0013 & 1e-04 & 0.0105 \tabularnewline
61 & 0.0085 & -0.004 & 3e-04 & 0.1678 & 0.014 & 0.1182 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33109&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]50[/C][C]0.0024[/C][C]0.0039[/C][C]3e-04[/C][C]0.1527[/C][C]0.0127[/C][C]0.1128[/C][/ROW]
[ROW][C]51[/C][C]0.0035[/C][C]9e-04[/C][C]1e-04[/C][C]0.0093[/C][C]8e-04[/C][C]0.0278[/C][/ROW]
[ROW][C]52[/C][C]0.0042[/C][C]0.0024[/C][C]2e-04[/C][C]0.0602[/C][C]0.005[/C][C]0.0708[/C][/ROW]
[ROW][C]53[/C][C]0.0048[/C][C]0.0031[/C][C]3e-04[/C][C]0.0984[/C][C]0.0082[/C][C]0.0905[/C][/ROW]
[ROW][C]54[/C][C]0.0054[/C][C]0.0035[/C][C]3e-04[/C][C]0.1308[/C][C]0.0109[/C][C]0.1044[/C][/ROW]
[ROW][C]55[/C][C]0.006[/C][C]0.0028[/C][C]2e-04[/C][C]0.0794[/C][C]0.0066[/C][C]0.0813[/C][/ROW]
[ROW][C]56[/C][C]0.0064[/C][C]0.0035[/C][C]3e-04[/C][C]0.1322[/C][C]0.011[/C][C]0.1049[/C][/ROW]
[ROW][C]57[/C][C]0.0068[/C][C]-6e-04[/C][C]1e-04[/C][C]0.0038[/C][C]3e-04[/C][C]0.0179[/C][/ROW]
[ROW][C]58[/C][C]0.0072[/C][C]-0.0066[/C][C]5e-04[/C][C]0.4613[/C][C]0.0384[/C][C]0.1961[/C][/ROW]
[ROW][C]59[/C][C]0.0076[/C][C]-0.003[/C][C]3e-04[/C][C]0.0991[/C][C]0.0083[/C][C]0.0909[/C][/ROW]
[ROW][C]60[/C][C]0.008[/C][C]4e-04[/C][C]0[/C][C]0.0013[/C][C]1e-04[/C][C]0.0105[/C][/ROW]
[ROW][C]61[/C][C]0.0085[/C][C]-0.004[/C][C]3e-04[/C][C]0.1678[/C][C]0.014[/C][C]0.1182[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33109&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33109&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
500.00240.00393e-040.15270.01270.1128
510.00359e-041e-040.00938e-040.0278
520.00420.00242e-040.06020.0050.0708
530.00480.00313e-040.09840.00820.0905
540.00540.00353e-040.13080.01090.1044
550.0060.00282e-040.07940.00660.0813
560.00640.00353e-040.13220.0110.1049
570.0068-6e-041e-040.00383e-040.0179
580.0072-0.00665e-040.46130.03840.1961
590.0076-0.0033e-040.09910.00830.0909
600.0084e-0400.00131e-040.0105
610.0085-0.0043e-040.16780.0140.1182



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