Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 23 Dec 2008 09:47:11 -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/23/t12300509340zc6x7lu28sc58t.htm/, Retrieved Fri, 24 May 2024 15:47:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36354, Retrieved Fri, 24 May 2024 15:47:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Spectral Analysis] [] [2008-12-16 12:03:12] [36e149b0e818e09d2b19e9807cb730e0]
- RMPD  [ARIMA Forecasting] [] [2008-12-22 14:21:34] [36e149b0e818e09d2b19e9807cb730e0]
-   PD      [ARIMA Forecasting] [] [2008-12-23 16:47:11] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
98.8
100.5
110.4
96.4
101.9
106.2
81.0
94.7
101.0
109.4
102.3
90.7
96.2
96.1
106.0
103.1
102.0
104.7
86.0
92.1
106.9
112.6
101.7
92.0
97.4
97.0
105.4
102.7
98.1
104.5
87.4
89.9
109.8
111.7
98.6
96.9
95.1
97.0
112.7
102.9
97.4
111.4
87.4
96.8
114.1
110.3
103.9
101.6
94.6
95.9
104.7
102.8
98.1
113.9
80.9
95.7
113.2
105.9
108.8
102.3
99.0
100.7
115.5
100.7
109.9
114.6
85.4
100.5
114.8
116.5
112.9
102.0
106.0
105.3
118.8
106.1
109.3
117.2
92.5
104.2
112.5
122.4
113.3
100.0




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36354&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36354&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36354&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'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[72])
60102.3-------
6199-------
62100.7-------
63115.5-------
64100.7-------
65109.9-------
66114.6-------
6785.4-------
68100.5-------
69114.8-------
70116.5-------
71112.9-------
72102-------
73106103.950397.0174110.88320.28110.70930.91920.7093
74105.3102.866395.9234109.80910.2460.18820.72960.5966
75118.8115.8188108.5806123.0570.20980.99780.53440.9999
76106.1105.69497.7407113.64730.46026e-040.89080.8187
77109.3107.701999.7452115.65870.34690.65340.29410.9199
78117.2115.9703107.7688124.17170.38440.94450.62830.9996
7992.588.060779.698496.4230.149100.73365e-04
80104.2100.694992.3103109.07960.20630.97230.51820.3802
81112.5116.2753107.7658124.78480.19230.99730.6330.9995
82122.4115.481106.921124.0410.05660.75260.40780.999
83113.3111.4686102.8812120.0560.3380.00630.37190.9847
84100103.305594.6634111.94760.22670.01170.61640.6164

\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[72]) \tabularnewline
60 & 102.3 & - & - & - & - & - & - & - \tabularnewline
61 & 99 & - & - & - & - & - & - & - \tabularnewline
62 & 100.7 & - & - & - & - & - & - & - \tabularnewline
63 & 115.5 & - & - & - & - & - & - & - \tabularnewline
64 & 100.7 & - & - & - & - & - & - & - \tabularnewline
65 & 109.9 & - & - & - & - & - & - & - \tabularnewline
66 & 114.6 & - & - & - & - & - & - & - \tabularnewline
67 & 85.4 & - & - & - & - & - & - & - \tabularnewline
68 & 100.5 & - & - & - & - & - & - & - \tabularnewline
69 & 114.8 & - & - & - & - & - & - & - \tabularnewline
70 & 116.5 & - & - & - & - & - & - & - \tabularnewline
71 & 112.9 & - & - & - & - & - & - & - \tabularnewline
72 & 102 & - & - & - & - & - & - & - \tabularnewline
73 & 106 & 103.9503 & 97.0174 & 110.8832 & 0.2811 & 0.7093 & 0.9192 & 0.7093 \tabularnewline
74 & 105.3 & 102.8663 & 95.9234 & 109.8091 & 0.246 & 0.1882 & 0.7296 & 0.5966 \tabularnewline
75 & 118.8 & 115.8188 & 108.5806 & 123.057 & 0.2098 & 0.9978 & 0.5344 & 0.9999 \tabularnewline
76 & 106.1 & 105.694 & 97.7407 & 113.6473 & 0.4602 & 6e-04 & 0.8908 & 0.8187 \tabularnewline
77 & 109.3 & 107.7019 & 99.7452 & 115.6587 & 0.3469 & 0.6534 & 0.2941 & 0.9199 \tabularnewline
78 & 117.2 & 115.9703 & 107.7688 & 124.1717 & 0.3844 & 0.9445 & 0.6283 & 0.9996 \tabularnewline
79 & 92.5 & 88.0607 & 79.6984 & 96.423 & 0.1491 & 0 & 0.7336 & 5e-04 \tabularnewline
80 & 104.2 & 100.6949 & 92.3103 & 109.0796 & 0.2063 & 0.9723 & 0.5182 & 0.3802 \tabularnewline
81 & 112.5 & 116.2753 & 107.7658 & 124.7848 & 0.1923 & 0.9973 & 0.633 & 0.9995 \tabularnewline
82 & 122.4 & 115.481 & 106.921 & 124.041 & 0.0566 & 0.7526 & 0.4078 & 0.999 \tabularnewline
83 & 113.3 & 111.4686 & 102.8812 & 120.056 & 0.338 & 0.0063 & 0.3719 & 0.9847 \tabularnewline
84 & 100 & 103.3055 & 94.6634 & 111.9476 & 0.2267 & 0.0117 & 0.6164 & 0.6164 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36354&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[72])[/C][/ROW]
[ROW][C]60[/C][C]102.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]100.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]115.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]100.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]109.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]114.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]85.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]100.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]114.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]116.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]106[/C][C]103.9503[/C][C]97.0174[/C][C]110.8832[/C][C]0.2811[/C][C]0.7093[/C][C]0.9192[/C][C]0.7093[/C][/ROW]
[ROW][C]74[/C][C]105.3[/C][C]102.8663[/C][C]95.9234[/C][C]109.8091[/C][C]0.246[/C][C]0.1882[/C][C]0.7296[/C][C]0.5966[/C][/ROW]
[ROW][C]75[/C][C]118.8[/C][C]115.8188[/C][C]108.5806[/C][C]123.057[/C][C]0.2098[/C][C]0.9978[/C][C]0.5344[/C][C]0.9999[/C][/ROW]
[ROW][C]76[/C][C]106.1[/C][C]105.694[/C][C]97.7407[/C][C]113.6473[/C][C]0.4602[/C][C]6e-04[/C][C]0.8908[/C][C]0.8187[/C][/ROW]
[ROW][C]77[/C][C]109.3[/C][C]107.7019[/C][C]99.7452[/C][C]115.6587[/C][C]0.3469[/C][C]0.6534[/C][C]0.2941[/C][C]0.9199[/C][/ROW]
[ROW][C]78[/C][C]117.2[/C][C]115.9703[/C][C]107.7688[/C][C]124.1717[/C][C]0.3844[/C][C]0.9445[/C][C]0.6283[/C][C]0.9996[/C][/ROW]
[ROW][C]79[/C][C]92.5[/C][C]88.0607[/C][C]79.6984[/C][C]96.423[/C][C]0.1491[/C][C]0[/C][C]0.7336[/C][C]5e-04[/C][/ROW]
[ROW][C]80[/C][C]104.2[/C][C]100.6949[/C][C]92.3103[/C][C]109.0796[/C][C]0.2063[/C][C]0.9723[/C][C]0.5182[/C][C]0.3802[/C][/ROW]
[ROW][C]81[/C][C]112.5[/C][C]116.2753[/C][C]107.7658[/C][C]124.7848[/C][C]0.1923[/C][C]0.9973[/C][C]0.633[/C][C]0.9995[/C][/ROW]
[ROW][C]82[/C][C]122.4[/C][C]115.481[/C][C]106.921[/C][C]124.041[/C][C]0.0566[/C][C]0.7526[/C][C]0.4078[/C][C]0.999[/C][/ROW]
[ROW][C]83[/C][C]113.3[/C][C]111.4686[/C][C]102.8812[/C][C]120.056[/C][C]0.338[/C][C]0.0063[/C][C]0.3719[/C][C]0.9847[/C][/ROW]
[ROW][C]84[/C][C]100[/C][C]103.3055[/C][C]94.6634[/C][C]111.9476[/C][C]0.2267[/C][C]0.0117[/C][C]0.6164[/C][C]0.6164[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36354&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36354&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[72])
60102.3-------
6199-------
62100.7-------
63115.5-------
64100.7-------
65109.9-------
66114.6-------
6785.4-------
68100.5-------
69114.8-------
70116.5-------
71112.9-------
72102-------
73106103.950397.0174110.88320.28110.70930.91920.7093
74105.3102.866395.9234109.80910.2460.18820.72960.5966
75118.8115.8188108.5806123.0570.20980.99780.53440.9999
76106.1105.69497.7407113.64730.46026e-040.89080.8187
77109.3107.701999.7452115.65870.34690.65340.29410.9199
78117.2115.9703107.7688124.17170.38440.94450.62830.9996
7992.588.060779.698496.4230.149100.73365e-04
80104.2100.694992.3103109.07960.20630.97230.51820.3802
81112.5116.2753107.7658124.78480.19230.99730.6330.9995
82122.4115.481106.921124.0410.05660.75260.40780.999
83113.3111.4686102.8812120.0560.3380.00630.37190.9847
84100103.305594.6634111.94760.22670.01170.61640.6164







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.0340.01970.00164.20140.35010.5917
740.03440.02370.0025.9230.49360.7026
750.03190.02570.00218.88740.74060.8606
760.03840.00383e-040.16480.01370.1172
770.03770.01480.00122.55380.21280.4613
780.03610.01069e-041.51220.1260.355
790.04840.05040.004219.70731.64231.2815
800.04250.03480.002912.28541.02381.0118
810.0373-0.03250.002714.25271.18771.0898
820.03780.05990.00547.87263.98941.9973
830.03930.01640.00143.35390.27950.5287
840.0427-0.0320.002710.92630.91050.9542

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.034 & 0.0197 & 0.0016 & 4.2014 & 0.3501 & 0.5917 \tabularnewline
74 & 0.0344 & 0.0237 & 0.002 & 5.923 & 0.4936 & 0.7026 \tabularnewline
75 & 0.0319 & 0.0257 & 0.0021 & 8.8874 & 0.7406 & 0.8606 \tabularnewline
76 & 0.0384 & 0.0038 & 3e-04 & 0.1648 & 0.0137 & 0.1172 \tabularnewline
77 & 0.0377 & 0.0148 & 0.0012 & 2.5538 & 0.2128 & 0.4613 \tabularnewline
78 & 0.0361 & 0.0106 & 9e-04 & 1.5122 & 0.126 & 0.355 \tabularnewline
79 & 0.0484 & 0.0504 & 0.0042 & 19.7073 & 1.6423 & 1.2815 \tabularnewline
80 & 0.0425 & 0.0348 & 0.0029 & 12.2854 & 1.0238 & 1.0118 \tabularnewline
81 & 0.0373 & -0.0325 & 0.0027 & 14.2527 & 1.1877 & 1.0898 \tabularnewline
82 & 0.0378 & 0.0599 & 0.005 & 47.8726 & 3.9894 & 1.9973 \tabularnewline
83 & 0.0393 & 0.0164 & 0.0014 & 3.3539 & 0.2795 & 0.5287 \tabularnewline
84 & 0.0427 & -0.032 & 0.0027 & 10.9263 & 0.9105 & 0.9542 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36354&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]73[/C][C]0.034[/C][C]0.0197[/C][C]0.0016[/C][C]4.2014[/C][C]0.3501[/C][C]0.5917[/C][/ROW]
[ROW][C]74[/C][C]0.0344[/C][C]0.0237[/C][C]0.002[/C][C]5.923[/C][C]0.4936[/C][C]0.7026[/C][/ROW]
[ROW][C]75[/C][C]0.0319[/C][C]0.0257[/C][C]0.0021[/C][C]8.8874[/C][C]0.7406[/C][C]0.8606[/C][/ROW]
[ROW][C]76[/C][C]0.0384[/C][C]0.0038[/C][C]3e-04[/C][C]0.1648[/C][C]0.0137[/C][C]0.1172[/C][/ROW]
[ROW][C]77[/C][C]0.0377[/C][C]0.0148[/C][C]0.0012[/C][C]2.5538[/C][C]0.2128[/C][C]0.4613[/C][/ROW]
[ROW][C]78[/C][C]0.0361[/C][C]0.0106[/C][C]9e-04[/C][C]1.5122[/C][C]0.126[/C][C]0.355[/C][/ROW]
[ROW][C]79[/C][C]0.0484[/C][C]0.0504[/C][C]0.0042[/C][C]19.7073[/C][C]1.6423[/C][C]1.2815[/C][/ROW]
[ROW][C]80[/C][C]0.0425[/C][C]0.0348[/C][C]0.0029[/C][C]12.2854[/C][C]1.0238[/C][C]1.0118[/C][/ROW]
[ROW][C]81[/C][C]0.0373[/C][C]-0.0325[/C][C]0.0027[/C][C]14.2527[/C][C]1.1877[/C][C]1.0898[/C][/ROW]
[ROW][C]82[/C][C]0.0378[/C][C]0.0599[/C][C]0.005[/C][C]47.8726[/C][C]3.9894[/C][C]1.9973[/C][/ROW]
[ROW][C]83[/C][C]0.0393[/C][C]0.0164[/C][C]0.0014[/C][C]3.3539[/C][C]0.2795[/C][C]0.5287[/C][/ROW]
[ROW][C]84[/C][C]0.0427[/C][C]-0.032[/C][C]0.0027[/C][C]10.9263[/C][C]0.9105[/C][C]0.9542[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36354&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36354&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
730.0340.01970.00164.20140.35010.5917
740.03440.02370.0025.9230.49360.7026
750.03190.02570.00218.88740.74060.8606
760.03840.00383e-040.16480.01370.1172
770.03770.01480.00122.55380.21280.4613
780.03610.01069e-041.51220.1260.355
790.04840.05040.004219.70731.64231.2815
800.04250.03480.002912.28541.02381.0118
810.0373-0.03250.002714.25271.18771.0898
820.03780.05990.00547.87263.98941.9973
830.03930.01640.00143.35390.27950.5287
840.0427-0.0320.002710.92630.91050.9542



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