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 computationMon, 22 Dec 2008 07:29:00 -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/22/t1229956215x9ci872ke0crel7.htm/, Retrieved Sun, 12 May 2024 14:50:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36086, Retrieved Sun, 12 May 2024 14:50:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact166
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [] [2008-12-12 12:13:32] [fad8a251ac01c156a8ae23a83577546f]
- RMPD  [(Partial) Autocorrelation Function] [Consumptiegoederen] [2008-12-12 13:39:25] [fad8a251ac01c156a8ae23a83577546f]
-   P     [(Partial) Autocorrelation Function] [auto corr cons] [2008-12-19 10:53:37] [fad8a251ac01c156a8ae23a83577546f]
-   P       [(Partial) Autocorrelation Function] [autocorr cons D] [2008-12-21 18:04:22] [fad8a251ac01c156a8ae23a83577546f]
- RMPD        [ARIMA Backward Selection] [Arima backw sel n...] [2008-12-22 10:23:57] [fad8a251ac01c156a8ae23a83577546f]
- RMP             [ARIMA Forecasting] [forecast niet-duu...] [2008-12-22 14:29:00] [fa8b44cd657c07c6ee11bb2476ca3f8d] [Current]
Feedback Forum

Post a new message
Dataseries X:
95,9
95,3
100,4
97,3
82,3
97,0
93,5
90,9
107,8
110,9
98,1
106,5
93,4
95,7
109,0
97,6
92,7
107,5
91,7
95,7
111,4
106,0
104,8
108,7
97,3
97,1
106,1
98,6
98,5
105,5
86,2
98,3
111,3
105,0
105,7
103,5
96,9
98,1
111,7
94,7
104,2
109,7
91,3
102,6
114,2
115,8
113,5
107,1
104,5
101,9
116,0
102,0
108,1
112,9
104,5
109,1
113,4
123,9
117,7
108,3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36086&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[48])
36103.5-------
3796.9-------
3898.1-------
39111.7-------
4094.7-------
41104.2-------
42109.7-------
4391.3-------
44102.6-------
45114.2-------
46115.8-------
47113.5-------
48107.1-------
49104.5103.466595.2932111.63970.40210.19180.94230.1918
50101.9103.020394.789111.25160.39480.36230.87930.1657
51116114.9096106.5755123.24360.39880.99890.77480.9669
5210298.840289.5594108.12090.25231e-040.8090.0405
53108.1107.4498.0908116.78920.4450.8730.75150.5284
54112.9112.1754102.7317121.61910.44020.80120.69630.8539
55104.593.984384.2844103.68430.01681e-040.70620.004
56109.1104.781195.0317114.53060.19260.52250.66950.3205
57113.4115.9973106.1907125.80380.30180.9160.64030.9623
58123.9117.5751107.6834127.46670.10510.7960.63750.981
59117.7114.9835105.0625124.90450.29570.03910.61530.9403
60108.3108.367798.417118.31840.49470.0330.59860.5986

\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[48]) \tabularnewline
36 & 103.5 & - & - & - & - & - & - & - \tabularnewline
37 & 96.9 & - & - & - & - & - & - & - \tabularnewline
38 & 98.1 & - & - & - & - & - & - & - \tabularnewline
39 & 111.7 & - & - & - & - & - & - & - \tabularnewline
40 & 94.7 & - & - & - & - & - & - & - \tabularnewline
41 & 104.2 & - & - & - & - & - & - & - \tabularnewline
42 & 109.7 & - & - & - & - & - & - & - \tabularnewline
43 & 91.3 & - & - & - & - & - & - & - \tabularnewline
44 & 102.6 & - & - & - & - & - & - & - \tabularnewline
45 & 114.2 & - & - & - & - & - & - & - \tabularnewline
46 & 115.8 & - & - & - & - & - & - & - \tabularnewline
47 & 113.5 & - & - & - & - & - & - & - \tabularnewline
48 & 107.1 & - & - & - & - & - & - & - \tabularnewline
49 & 104.5 & 103.4665 & 95.2932 & 111.6397 & 0.4021 & 0.1918 & 0.9423 & 0.1918 \tabularnewline
50 & 101.9 & 103.0203 & 94.789 & 111.2516 & 0.3948 & 0.3623 & 0.8793 & 0.1657 \tabularnewline
51 & 116 & 114.9096 & 106.5755 & 123.2436 & 0.3988 & 0.9989 & 0.7748 & 0.9669 \tabularnewline
52 & 102 & 98.8402 & 89.5594 & 108.1209 & 0.2523 & 1e-04 & 0.809 & 0.0405 \tabularnewline
53 & 108.1 & 107.44 & 98.0908 & 116.7892 & 0.445 & 0.873 & 0.7515 & 0.5284 \tabularnewline
54 & 112.9 & 112.1754 & 102.7317 & 121.6191 & 0.4402 & 0.8012 & 0.6963 & 0.8539 \tabularnewline
55 & 104.5 & 93.9843 & 84.2844 & 103.6843 & 0.0168 & 1e-04 & 0.7062 & 0.004 \tabularnewline
56 & 109.1 & 104.7811 & 95.0317 & 114.5306 & 0.1926 & 0.5225 & 0.6695 & 0.3205 \tabularnewline
57 & 113.4 & 115.9973 & 106.1907 & 125.8038 & 0.3018 & 0.916 & 0.6403 & 0.9623 \tabularnewline
58 & 123.9 & 117.5751 & 107.6834 & 127.4667 & 0.1051 & 0.796 & 0.6375 & 0.981 \tabularnewline
59 & 117.7 & 114.9835 & 105.0625 & 124.9045 & 0.2957 & 0.0391 & 0.6153 & 0.9403 \tabularnewline
60 & 108.3 & 108.3677 & 98.417 & 118.3184 & 0.4947 & 0.033 & 0.5986 & 0.5986 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36086&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[48])[/C][/ROW]
[ROW][C]36[/C][C]103.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]96.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]98.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]111.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]94.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]109.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]91.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]102.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]114.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]115.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]113.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]104.5[/C][C]103.4665[/C][C]95.2932[/C][C]111.6397[/C][C]0.4021[/C][C]0.1918[/C][C]0.9423[/C][C]0.1918[/C][/ROW]
[ROW][C]50[/C][C]101.9[/C][C]103.0203[/C][C]94.789[/C][C]111.2516[/C][C]0.3948[/C][C]0.3623[/C][C]0.8793[/C][C]0.1657[/C][/ROW]
[ROW][C]51[/C][C]116[/C][C]114.9096[/C][C]106.5755[/C][C]123.2436[/C][C]0.3988[/C][C]0.9989[/C][C]0.7748[/C][C]0.9669[/C][/ROW]
[ROW][C]52[/C][C]102[/C][C]98.8402[/C][C]89.5594[/C][C]108.1209[/C][C]0.2523[/C][C]1e-04[/C][C]0.809[/C][C]0.0405[/C][/ROW]
[ROW][C]53[/C][C]108.1[/C][C]107.44[/C][C]98.0908[/C][C]116.7892[/C][C]0.445[/C][C]0.873[/C][C]0.7515[/C][C]0.5284[/C][/ROW]
[ROW][C]54[/C][C]112.9[/C][C]112.1754[/C][C]102.7317[/C][C]121.6191[/C][C]0.4402[/C][C]0.8012[/C][C]0.6963[/C][C]0.8539[/C][/ROW]
[ROW][C]55[/C][C]104.5[/C][C]93.9843[/C][C]84.2844[/C][C]103.6843[/C][C]0.0168[/C][C]1e-04[/C][C]0.7062[/C][C]0.004[/C][/ROW]
[ROW][C]56[/C][C]109.1[/C][C]104.7811[/C][C]95.0317[/C][C]114.5306[/C][C]0.1926[/C][C]0.5225[/C][C]0.6695[/C][C]0.3205[/C][/ROW]
[ROW][C]57[/C][C]113.4[/C][C]115.9973[/C][C]106.1907[/C][C]125.8038[/C][C]0.3018[/C][C]0.916[/C][C]0.6403[/C][C]0.9623[/C][/ROW]
[ROW][C]58[/C][C]123.9[/C][C]117.5751[/C][C]107.6834[/C][C]127.4667[/C][C]0.1051[/C][C]0.796[/C][C]0.6375[/C][C]0.981[/C][/ROW]
[ROW][C]59[/C][C]117.7[/C][C]114.9835[/C][C]105.0625[/C][C]124.9045[/C][C]0.2957[/C][C]0.0391[/C][C]0.6153[/C][C]0.9403[/C][/ROW]
[ROW][C]60[/C][C]108.3[/C][C]108.3677[/C][C]98.417[/C][C]118.3184[/C][C]0.4947[/C][C]0.033[/C][C]0.5986[/C][C]0.5986[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36086&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36086&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[48])
36103.5-------
3796.9-------
3898.1-------
39111.7-------
4094.7-------
41104.2-------
42109.7-------
4391.3-------
44102.6-------
45114.2-------
46115.8-------
47113.5-------
48107.1-------
49104.5103.466595.2932111.63970.40210.19180.94230.1918
50101.9103.020394.789111.25160.39480.36230.87930.1657
51116114.9096106.5755123.24360.39880.99890.77480.9669
5210298.840289.5594108.12090.25231e-040.8090.0405
53108.1107.4498.0908116.78920.4450.8730.75150.5284
54112.9112.1754102.7317121.61910.44020.80120.69630.8539
55104.593.984384.2844103.68430.01681e-040.70620.004
56109.1104.781195.0317114.53060.19260.52250.66950.3205
57113.4115.9973106.1907125.80380.30180.9160.64030.9623
58123.9117.5751107.6834127.46670.10510.7960.63750.981
59117.7114.9835105.0625124.90450.29570.03910.61530.9403
60108.3108.367798.417118.31840.49470.0330.59860.5986







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.04030.018e-041.06820.0890.2984
500.0408-0.01099e-041.25520.10460.3234
510.0370.00958e-041.1890.09910.3148
520.04790.0320.00279.98460.83210.9122
530.04440.00615e-040.43560.03630.1905
540.0430.00655e-040.52510.04380.2092
550.05270.11190.0093110.57959.2153.0356
560.04750.04120.003418.65251.55441.2467
570.0431-0.02240.00196.74580.56210.7498
580.04290.05380.004540.00483.33371.8259
590.0440.02360.0027.37920.61490.7842
600.0468-6e-041e-040.00464e-040.0195

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0403 & 0.01 & 8e-04 & 1.0682 & 0.089 & 0.2984 \tabularnewline
50 & 0.0408 & -0.0109 & 9e-04 & 1.2552 & 0.1046 & 0.3234 \tabularnewline
51 & 0.037 & 0.0095 & 8e-04 & 1.189 & 0.0991 & 0.3148 \tabularnewline
52 & 0.0479 & 0.032 & 0.0027 & 9.9846 & 0.8321 & 0.9122 \tabularnewline
53 & 0.0444 & 0.0061 & 5e-04 & 0.4356 & 0.0363 & 0.1905 \tabularnewline
54 & 0.043 & 0.0065 & 5e-04 & 0.5251 & 0.0438 & 0.2092 \tabularnewline
55 & 0.0527 & 0.1119 & 0.0093 & 110.5795 & 9.215 & 3.0356 \tabularnewline
56 & 0.0475 & 0.0412 & 0.0034 & 18.6525 & 1.5544 & 1.2467 \tabularnewline
57 & 0.0431 & -0.0224 & 0.0019 & 6.7458 & 0.5621 & 0.7498 \tabularnewline
58 & 0.0429 & 0.0538 & 0.0045 & 40.0048 & 3.3337 & 1.8259 \tabularnewline
59 & 0.044 & 0.0236 & 0.002 & 7.3792 & 0.6149 & 0.7842 \tabularnewline
60 & 0.0468 & -6e-04 & 1e-04 & 0.0046 & 4e-04 & 0.0195 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36086&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]49[/C][C]0.0403[/C][C]0.01[/C][C]8e-04[/C][C]1.0682[/C][C]0.089[/C][C]0.2984[/C][/ROW]
[ROW][C]50[/C][C]0.0408[/C][C]-0.0109[/C][C]9e-04[/C][C]1.2552[/C][C]0.1046[/C][C]0.3234[/C][/ROW]
[ROW][C]51[/C][C]0.037[/C][C]0.0095[/C][C]8e-04[/C][C]1.189[/C][C]0.0991[/C][C]0.3148[/C][/ROW]
[ROW][C]52[/C][C]0.0479[/C][C]0.032[/C][C]0.0027[/C][C]9.9846[/C][C]0.8321[/C][C]0.9122[/C][/ROW]
[ROW][C]53[/C][C]0.0444[/C][C]0.0061[/C][C]5e-04[/C][C]0.4356[/C][C]0.0363[/C][C]0.1905[/C][/ROW]
[ROW][C]54[/C][C]0.043[/C][C]0.0065[/C][C]5e-04[/C][C]0.5251[/C][C]0.0438[/C][C]0.2092[/C][/ROW]
[ROW][C]55[/C][C]0.0527[/C][C]0.1119[/C][C]0.0093[/C][C]110.5795[/C][C]9.215[/C][C]3.0356[/C][/ROW]
[ROW][C]56[/C][C]0.0475[/C][C]0.0412[/C][C]0.0034[/C][C]18.6525[/C][C]1.5544[/C][C]1.2467[/C][/ROW]
[ROW][C]57[/C][C]0.0431[/C][C]-0.0224[/C][C]0.0019[/C][C]6.7458[/C][C]0.5621[/C][C]0.7498[/C][/ROW]
[ROW][C]58[/C][C]0.0429[/C][C]0.0538[/C][C]0.0045[/C][C]40.0048[/C][C]3.3337[/C][C]1.8259[/C][/ROW]
[ROW][C]59[/C][C]0.044[/C][C]0.0236[/C][C]0.002[/C][C]7.3792[/C][C]0.6149[/C][C]0.7842[/C][/ROW]
[ROW][C]60[/C][C]0.0468[/C][C]-6e-04[/C][C]1e-04[/C][C]0.0046[/C][C]4e-04[/C][C]0.0195[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36086&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36086&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
490.04030.018e-041.06820.0890.2984
500.0408-0.01099e-041.25520.10460.3234
510.0370.00958e-041.1890.09910.3148
520.04790.0320.00279.98460.83210.9122
530.04440.00615e-040.43560.03630.1905
540.0430.00655e-040.52510.04380.2092
550.05270.11190.0093110.57959.2153.0356
560.04750.04120.003418.65251.55441.2467
570.0431-0.02240.00196.74580.56210.7498
580.04290.05380.004540.00483.33371.8259
590.0440.02360.0027.37920.61490.7842
600.0468-6e-041e-040.00464e-040.0195



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