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 computationTue, 06 Dec 2011 14:09:10 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/06/t1323198559j6xpwqjv9gt361x.htm/, Retrieved Mon, 29 Apr 2024 03:34:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151813, Retrieved Mon, 29 Apr 2024 03:34:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact127
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]
F   PD      [ARIMA Forecasting] [Forecast Arima cu...] [2010-12-03 11:50:31] [74deae64b71f9d77c839af86f7c687b5]
- R PD          [ARIMA Forecasting] [] [2011-12-06 19:09:10] [4be1b05f688f7fa8db5b9e9e4d3a7e33] [Current]
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 time2 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151813&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]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151813&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151813&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'Herman Ole Andreas Wold' @ wold.wessa.net







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.3144116.7349117.89530.09160.795210.7952
48117117.6378116.908118.36980.04380.972710.9358
49117.02117.7142116.8282118.60340.0630.942310.9222
50117.35118.2545117.2282119.28520.04270.990510.9878
51117.36118.4568117.297119.62230.03260.968610.9902
52117.82119.1438117.8533120.44130.02280.996510.9991
53117.88119.3118117.8968120.73530.02430.9810.999
54118.24119.9855118.4455121.53560.01360.996110.9999
55118.5120.2141118.5536121.88610.02230.989710.9999
56118.8120.7957119.0138122.5910.01470.993911
57119.76122.5249120.6134124.45150.00250.999911
58120.09122.8872120.857124.93440.00370.998611

\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.3144 & 116.7349 & 117.8953 & 0.0916 & 0.7952 & 1 & 0.7952 \tabularnewline
48 & 117 & 117.6378 & 116.908 & 118.3698 & 0.0438 & 0.9727 & 1 & 0.9358 \tabularnewline
49 & 117.02 & 117.7142 & 116.8282 & 118.6034 & 0.063 & 0.9423 & 1 & 0.9222 \tabularnewline
50 & 117.35 & 118.2545 & 117.2282 & 119.2852 & 0.0427 & 0.9905 & 1 & 0.9878 \tabularnewline
51 & 117.36 & 118.4568 & 117.297 & 119.6223 & 0.0326 & 0.9686 & 1 & 0.9902 \tabularnewline
52 & 117.82 & 119.1438 & 117.8533 & 120.4413 & 0.0228 & 0.9965 & 1 & 0.9991 \tabularnewline
53 & 117.88 & 119.3118 & 117.8968 & 120.7353 & 0.0243 & 0.98 & 1 & 0.999 \tabularnewline
54 & 118.24 & 119.9855 & 118.4455 & 121.5356 & 0.0136 & 0.9961 & 1 & 0.9999 \tabularnewline
55 & 118.5 & 120.2141 & 118.5536 & 121.8861 & 0.0223 & 0.9897 & 1 & 0.9999 \tabularnewline
56 & 118.8 & 120.7957 & 119.0138 & 122.591 & 0.0147 & 0.9939 & 1 & 1 \tabularnewline
57 & 119.76 & 122.5249 & 120.6134 & 124.4515 & 0.0025 & 0.9999 & 1 & 1 \tabularnewline
58 & 120.09 & 122.8872 & 120.857 & 124.9344 & 0.0037 & 0.9986 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151813&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.3144[/C][C]116.7349[/C][C]117.8953[/C][C]0.0916[/C][C]0.7952[/C][C]1[/C][C]0.7952[/C][/ROW]
[ROW][C]48[/C][C]117[/C][C]117.6378[/C][C]116.908[/C][C]118.3698[/C][C]0.0438[/C][C]0.9727[/C][C]1[/C][C]0.9358[/C][/ROW]
[ROW][C]49[/C][C]117.02[/C][C]117.7142[/C][C]116.8282[/C][C]118.6034[/C][C]0.063[/C][C]0.9423[/C][C]1[/C][C]0.9222[/C][/ROW]
[ROW][C]50[/C][C]117.35[/C][C]118.2545[/C][C]117.2282[/C][C]119.2852[/C][C]0.0427[/C][C]0.9905[/C][C]1[/C][C]0.9878[/C][/ROW]
[ROW][C]51[/C][C]117.36[/C][C]118.4568[/C][C]117.297[/C][C]119.6223[/C][C]0.0326[/C][C]0.9686[/C][C]1[/C][C]0.9902[/C][/ROW]
[ROW][C]52[/C][C]117.82[/C][C]119.1438[/C][C]117.8533[/C][C]120.4413[/C][C]0.0228[/C][C]0.9965[/C][C]1[/C][C]0.9991[/C][/ROW]
[ROW][C]53[/C][C]117.88[/C][C]119.3118[/C][C]117.8968[/C][C]120.7353[/C][C]0.0243[/C][C]0.98[/C][C]1[/C][C]0.999[/C][/ROW]
[ROW][C]54[/C][C]118.24[/C][C]119.9855[/C][C]118.4455[/C][C]121.5356[/C][C]0.0136[/C][C]0.9961[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]55[/C][C]118.5[/C][C]120.2141[/C][C]118.5536[/C][C]121.8861[/C][C]0.0223[/C][C]0.9897[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]56[/C][C]118.8[/C][C]120.7957[/C][C]119.0138[/C][C]122.591[/C][C]0.0147[/C][C]0.9939[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]119.76[/C][C]122.5249[/C][C]120.6134[/C][C]124.4515[/C][C]0.0025[/C][C]0.9999[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]120.09[/C][C]122.8872[/C][C]120.857[/C][C]124.9344[/C][C]0.0037[/C][C]0.9986[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151813&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151813&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.3144116.7349117.89530.09160.795210.7952
48117117.6378116.908118.36980.04380.972710.9358
49117.02117.7142116.8282118.60340.0630.942310.9222
50117.35118.2545117.2282119.28520.04270.990510.9878
51117.36118.4568117.297119.62230.03260.968610.9902
52117.82119.1438117.8533120.44130.02280.996510.9991
53117.88119.3118117.8968120.73530.02430.9810.999
54118.24119.9855118.4455121.53560.01360.996110.9999
55118.5120.2141118.5536121.88610.02230.989710.9999
56118.8120.7957119.0138122.5910.01470.993911
57119.76122.5249120.6134124.45150.00250.999911
58120.09122.8872120.857124.93440.00370.998611







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.0025-0.003400.155600
480.0032-0.00540.00440.40680.28120.5303
490.0039-0.00590.00490.48190.34810.59
500.0044-0.00760.00560.8180.46560.6823
510.005-0.00930.00631.20290.6130.783
520.0056-0.01110.00711.75240.80290.8961
530.0061-0.0120.00782.05020.98110.9905
540.0066-0.01450.00873.04691.23931.1133
550.0071-0.01430.00932.93811.42811.195
560.0076-0.01650.013.9831.68361.2975
570.008-0.02260.01117.64492.22551.4918
580.0085-0.02280.01217.82432.69211.6408

\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.1556 & 0 & 0 \tabularnewline
48 & 0.0032 & -0.0054 & 0.0044 & 0.4068 & 0.2812 & 0.5303 \tabularnewline
49 & 0.0039 & -0.0059 & 0.0049 & 0.4819 & 0.3481 & 0.59 \tabularnewline
50 & 0.0044 & -0.0076 & 0.0056 & 0.818 & 0.4656 & 0.6823 \tabularnewline
51 & 0.005 & -0.0093 & 0.0063 & 1.2029 & 0.613 & 0.783 \tabularnewline
52 & 0.0056 & -0.0111 & 0.0071 & 1.7524 & 0.8029 & 0.8961 \tabularnewline
53 & 0.0061 & -0.012 & 0.0078 & 2.0502 & 0.9811 & 0.9905 \tabularnewline
54 & 0.0066 & -0.0145 & 0.0087 & 3.0469 & 1.2393 & 1.1133 \tabularnewline
55 & 0.0071 & -0.0143 & 0.0093 & 2.9381 & 1.4281 & 1.195 \tabularnewline
56 & 0.0076 & -0.0165 & 0.01 & 3.983 & 1.6836 & 1.2975 \tabularnewline
57 & 0.008 & -0.0226 & 0.0111 & 7.6449 & 2.2255 & 1.4918 \tabularnewline
58 & 0.0085 & -0.0228 & 0.0121 & 7.8243 & 2.6921 & 1.6408 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151813&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.1556[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]0.0032[/C][C]-0.0054[/C][C]0.0044[/C][C]0.4068[/C][C]0.2812[/C][C]0.5303[/C][/ROW]
[ROW][C]49[/C][C]0.0039[/C][C]-0.0059[/C][C]0.0049[/C][C]0.4819[/C][C]0.3481[/C][C]0.59[/C][/ROW]
[ROW][C]50[/C][C]0.0044[/C][C]-0.0076[/C][C]0.0056[/C][C]0.818[/C][C]0.4656[/C][C]0.6823[/C][/ROW]
[ROW][C]51[/C][C]0.005[/C][C]-0.0093[/C][C]0.0063[/C][C]1.2029[/C][C]0.613[/C][C]0.783[/C][/ROW]
[ROW][C]52[/C][C]0.0056[/C][C]-0.0111[/C][C]0.0071[/C][C]1.7524[/C][C]0.8029[/C][C]0.8961[/C][/ROW]
[ROW][C]53[/C][C]0.0061[/C][C]-0.012[/C][C]0.0078[/C][C]2.0502[/C][C]0.9811[/C][C]0.9905[/C][/ROW]
[ROW][C]54[/C][C]0.0066[/C][C]-0.0145[/C][C]0.0087[/C][C]3.0469[/C][C]1.2393[/C][C]1.1133[/C][/ROW]
[ROW][C]55[/C][C]0.0071[/C][C]-0.0143[/C][C]0.0093[/C][C]2.9381[/C][C]1.4281[/C][C]1.195[/C][/ROW]
[ROW][C]56[/C][C]0.0076[/C][C]-0.0165[/C][C]0.01[/C][C]3.983[/C][C]1.6836[/C][C]1.2975[/C][/ROW]
[ROW][C]57[/C][C]0.008[/C][C]-0.0226[/C][C]0.0111[/C][C]7.6449[/C][C]2.2255[/C][C]1.4918[/C][/ROW]
[ROW][C]58[/C][C]0.0085[/C][C]-0.0228[/C][C]0.0121[/C][C]7.8243[/C][C]2.6921[/C][C]1.6408[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151813&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151813&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.155600
480.0032-0.00540.00440.40680.28120.5303
490.0039-0.00590.00490.48190.34810.59
500.0044-0.00760.00560.8180.46560.6823
510.005-0.00930.00631.20290.6130.783
520.0056-0.01110.00711.75240.80290.8961
530.0061-0.0120.00782.05020.98110.9905
540.0066-0.01450.00873.04691.23931.1133
550.0071-0.01430.00932.93811.42811.195
560.0076-0.01650.013.9831.68361.2975
570.008-0.02260.01117.64492.22551.4918
580.0085-0.02280.01217.82432.69211.6408



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