Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 11:57:43 -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/10/t1197312203hvwz56l6sua04n5.htm/, Retrieved Mon, 06 May 2024 12:26:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3020, Retrieved Mon, 06 May 2024 12:26:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact234
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasts 4] [2007-12-10 18:57:43] [6b5c00822e2ce0f7cf73539c28d95782] [Current]
Feedback Forum

Post a new message
Dataseries X:
107,97
108,13
108,54
109,86
109,75
109,99
112,01
111,96
111,41
112,11
111,67
111,95
112,31
113,26
113,5
114,43
115,02
115,1
117,11
117,52
116,1
116,39
116,01
116,74
116,68
117,45
117,8
119,37
118,9
119,05
120,46
120,99
119,86
120,18
119,81
120,15
119,8
120,27
120,71
121,87
121,87
121,92
123,72
124,38
123,21
123,17
122,95
123,46
123,24
123,86
124,28
124,78
125,19
125,46
127,6
127,8
126,63
127,06
126,77
127,05




Summary of compuational 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 compuational 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=3020&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]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=3020&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3020&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 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[48])
36120.15-------
37119.8-------
38120.27-------
39120.71-------
40121.87-------
41121.87-------
42121.92-------
43123.72-------
44124.38-------
45123.21-------
46123.17-------
47122.95-------
48123.46-------
49123.24123.4438122.8011124.08640.26710.480310.4803
50123.86124.0313123.1368124.92590.35370.958510.8947
51124.28124.3914123.3018125.48110.42060.830410.9531
52124.78125.6365124.3817126.89140.09050.982910.9997
53125.19125.6391124.2385127.03980.26480.885410.9989
54125.46125.7693124.2366127.30190.34620.770610.9984
55127.6127.5794125.9253129.23350.49030.99411
56127.8127.9672126.1999129.73450.42640.658111
57126.63126.8999125.0262128.77350.38880.17320.99990.9998
58127.06127.2176125.2433129.19180.43780.720210.9999
59126.77126.8654124.7954128.93540.4640.42690.99990.9994
60127.05127.3307125.1692129.49220.39950.69440.99980.9998

\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 & 120.15 & - & - & - & - & - & - & - \tabularnewline
37 & 119.8 & - & - & - & - & - & - & - \tabularnewline
38 & 120.27 & - & - & - & - & - & - & - \tabularnewline
39 & 120.71 & - & - & - & - & - & - & - \tabularnewline
40 & 121.87 & - & - & - & - & - & - & - \tabularnewline
41 & 121.87 & - & - & - & - & - & - & - \tabularnewline
42 & 121.92 & - & - & - & - & - & - & - \tabularnewline
43 & 123.72 & - & - & - & - & - & - & - \tabularnewline
44 & 124.38 & - & - & - & - & - & - & - \tabularnewline
45 & 123.21 & - & - & - & - & - & - & - \tabularnewline
46 & 123.17 & - & - & - & - & - & - & - \tabularnewline
47 & 122.95 & - & - & - & - & - & - & - \tabularnewline
48 & 123.46 & - & - & - & - & - & - & - \tabularnewline
49 & 123.24 & 123.4438 & 122.8011 & 124.0864 & 0.2671 & 0.4803 & 1 & 0.4803 \tabularnewline
50 & 123.86 & 124.0313 & 123.1368 & 124.9259 & 0.3537 & 0.9585 & 1 & 0.8947 \tabularnewline
51 & 124.28 & 124.3914 & 123.3018 & 125.4811 & 0.4206 & 0.8304 & 1 & 0.9531 \tabularnewline
52 & 124.78 & 125.6365 & 124.3817 & 126.8914 & 0.0905 & 0.9829 & 1 & 0.9997 \tabularnewline
53 & 125.19 & 125.6391 & 124.2385 & 127.0398 & 0.2648 & 0.8854 & 1 & 0.9989 \tabularnewline
54 & 125.46 & 125.7693 & 124.2366 & 127.3019 & 0.3462 & 0.7706 & 1 & 0.9984 \tabularnewline
55 & 127.6 & 127.5794 & 125.9253 & 129.2335 & 0.4903 & 0.994 & 1 & 1 \tabularnewline
56 & 127.8 & 127.9672 & 126.1999 & 129.7345 & 0.4264 & 0.6581 & 1 & 1 \tabularnewline
57 & 126.63 & 126.8999 & 125.0262 & 128.7735 & 0.3888 & 0.1732 & 0.9999 & 0.9998 \tabularnewline
58 & 127.06 & 127.2176 & 125.2433 & 129.1918 & 0.4378 & 0.7202 & 1 & 0.9999 \tabularnewline
59 & 126.77 & 126.8654 & 124.7954 & 128.9354 & 0.464 & 0.4269 & 0.9999 & 0.9994 \tabularnewline
60 & 127.05 & 127.3307 & 125.1692 & 129.4922 & 0.3995 & 0.6944 & 0.9998 & 0.9998 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3020&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]120.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]120.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]120.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]121.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]121.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]121.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]123.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]124.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]123.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]123.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]122.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]123.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]123.24[/C][C]123.4438[/C][C]122.8011[/C][C]124.0864[/C][C]0.2671[/C][C]0.4803[/C][C]1[/C][C]0.4803[/C][/ROW]
[ROW][C]50[/C][C]123.86[/C][C]124.0313[/C][C]123.1368[/C][C]124.9259[/C][C]0.3537[/C][C]0.9585[/C][C]1[/C][C]0.8947[/C][/ROW]
[ROW][C]51[/C][C]124.28[/C][C]124.3914[/C][C]123.3018[/C][C]125.4811[/C][C]0.4206[/C][C]0.8304[/C][C]1[/C][C]0.9531[/C][/ROW]
[ROW][C]52[/C][C]124.78[/C][C]125.6365[/C][C]124.3817[/C][C]126.8914[/C][C]0.0905[/C][C]0.9829[/C][C]1[/C][C]0.9997[/C][/ROW]
[ROW][C]53[/C][C]125.19[/C][C]125.6391[/C][C]124.2385[/C][C]127.0398[/C][C]0.2648[/C][C]0.8854[/C][C]1[/C][C]0.9989[/C][/ROW]
[ROW][C]54[/C][C]125.46[/C][C]125.7693[/C][C]124.2366[/C][C]127.3019[/C][C]0.3462[/C][C]0.7706[/C][C]1[/C][C]0.9984[/C][/ROW]
[ROW][C]55[/C][C]127.6[/C][C]127.5794[/C][C]125.9253[/C][C]129.2335[/C][C]0.4903[/C][C]0.994[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]127.8[/C][C]127.9672[/C][C]126.1999[/C][C]129.7345[/C][C]0.4264[/C][C]0.6581[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]126.63[/C][C]126.8999[/C][C]125.0262[/C][C]128.7735[/C][C]0.3888[/C][C]0.1732[/C][C]0.9999[/C][C]0.9998[/C][/ROW]
[ROW][C]58[/C][C]127.06[/C][C]127.2176[/C][C]125.2433[/C][C]129.1918[/C][C]0.4378[/C][C]0.7202[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]59[/C][C]126.77[/C][C]126.8654[/C][C]124.7954[/C][C]128.9354[/C][C]0.464[/C][C]0.4269[/C][C]0.9999[/C][C]0.9994[/C][/ROW]
[ROW][C]60[/C][C]127.05[/C][C]127.3307[/C][C]125.1692[/C][C]129.4922[/C][C]0.3995[/C][C]0.6944[/C][C]0.9998[/C][C]0.9998[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3020&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3020&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])
36120.15-------
37119.8-------
38120.27-------
39120.71-------
40121.87-------
41121.87-------
42121.92-------
43123.72-------
44124.38-------
45123.21-------
46123.17-------
47122.95-------
48123.46-------
49123.24123.4438122.8011124.08640.26710.480310.4803
50123.86124.0313123.1368124.92590.35370.958510.8947
51124.28124.3914123.3018125.48110.42060.830410.9531
52124.78125.6365124.3817126.89140.09050.982910.9997
53125.19125.6391124.2385127.03980.26480.885410.9989
54125.46125.7693124.2366127.30190.34620.770610.9984
55127.6127.5794125.9253129.23350.49030.99411
56127.8127.9672126.1999129.73450.42640.658111
57126.63126.8999125.0262128.77350.38880.17320.99990.9998
58127.06127.2176125.2433129.19180.43780.720210.9999
59126.77126.8654124.7954128.93540.4640.42690.99990.9994
60127.05127.3307125.1692129.49220.39950.69440.99980.9998







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0027-0.00171e-040.04150.00350.0588
500.0037-0.00141e-040.02940.00240.0495
510.0045-9e-041e-040.01240.0010.0322
520.0051-0.00686e-040.73360.06110.2473
530.0057-0.00363e-040.20170.01680.1297
540.0062-0.00252e-040.09560.0080.0893
550.00662e-0404e-0400.0059
560.007-0.00131e-040.0280.00230.0483
570.0075-0.00212e-040.07280.00610.0779
580.0079-0.00121e-040.02480.00210.0455
590.0083-8e-041e-040.00918e-040.0275
600.0087-0.00222e-040.07880.00660.081

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0027 & -0.0017 & 1e-04 & 0.0415 & 0.0035 & 0.0588 \tabularnewline
50 & 0.0037 & -0.0014 & 1e-04 & 0.0294 & 0.0024 & 0.0495 \tabularnewline
51 & 0.0045 & -9e-04 & 1e-04 & 0.0124 & 0.001 & 0.0322 \tabularnewline
52 & 0.0051 & -0.0068 & 6e-04 & 0.7336 & 0.0611 & 0.2473 \tabularnewline
53 & 0.0057 & -0.0036 & 3e-04 & 0.2017 & 0.0168 & 0.1297 \tabularnewline
54 & 0.0062 & -0.0025 & 2e-04 & 0.0956 & 0.008 & 0.0893 \tabularnewline
55 & 0.0066 & 2e-04 & 0 & 4e-04 & 0 & 0.0059 \tabularnewline
56 & 0.007 & -0.0013 & 1e-04 & 0.028 & 0.0023 & 0.0483 \tabularnewline
57 & 0.0075 & -0.0021 & 2e-04 & 0.0728 & 0.0061 & 0.0779 \tabularnewline
58 & 0.0079 & -0.0012 & 1e-04 & 0.0248 & 0.0021 & 0.0455 \tabularnewline
59 & 0.0083 & -8e-04 & 1e-04 & 0.0091 & 8e-04 & 0.0275 \tabularnewline
60 & 0.0087 & -0.0022 & 2e-04 & 0.0788 & 0.0066 & 0.081 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3020&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.0027[/C][C]-0.0017[/C][C]1e-04[/C][C]0.0415[/C][C]0.0035[/C][C]0.0588[/C][/ROW]
[ROW][C]50[/C][C]0.0037[/C][C]-0.0014[/C][C]1e-04[/C][C]0.0294[/C][C]0.0024[/C][C]0.0495[/C][/ROW]
[ROW][C]51[/C][C]0.0045[/C][C]-9e-04[/C][C]1e-04[/C][C]0.0124[/C][C]0.001[/C][C]0.0322[/C][/ROW]
[ROW][C]52[/C][C]0.0051[/C][C]-0.0068[/C][C]6e-04[/C][C]0.7336[/C][C]0.0611[/C][C]0.2473[/C][/ROW]
[ROW][C]53[/C][C]0.0057[/C][C]-0.0036[/C][C]3e-04[/C][C]0.2017[/C][C]0.0168[/C][C]0.1297[/C][/ROW]
[ROW][C]54[/C][C]0.0062[/C][C]-0.0025[/C][C]2e-04[/C][C]0.0956[/C][C]0.008[/C][C]0.0893[/C][/ROW]
[ROW][C]55[/C][C]0.0066[/C][C]2e-04[/C][C]0[/C][C]4e-04[/C][C]0[/C][C]0.0059[/C][/ROW]
[ROW][C]56[/C][C]0.007[/C][C]-0.0013[/C][C]1e-04[/C][C]0.028[/C][C]0.0023[/C][C]0.0483[/C][/ROW]
[ROW][C]57[/C][C]0.0075[/C][C]-0.0021[/C][C]2e-04[/C][C]0.0728[/C][C]0.0061[/C][C]0.0779[/C][/ROW]
[ROW][C]58[/C][C]0.0079[/C][C]-0.0012[/C][C]1e-04[/C][C]0.0248[/C][C]0.0021[/C][C]0.0455[/C][/ROW]
[ROW][C]59[/C][C]0.0083[/C][C]-8e-04[/C][C]1e-04[/C][C]0.0091[/C][C]8e-04[/C][C]0.0275[/C][/ROW]
[ROW][C]60[/C][C]0.0087[/C][C]-0.0022[/C][C]2e-04[/C][C]0.0788[/C][C]0.0066[/C][C]0.081[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3020&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3020&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.0027-0.00171e-040.04150.00350.0588
500.0037-0.00141e-040.02940.00240.0495
510.0045-9e-041e-040.01240.0010.0322
520.0051-0.00686e-040.73360.06110.2473
530.0057-0.00363e-040.20170.01680.1297
540.0062-0.00252e-040.09560.0080.0893
550.00662e-0404e-0400.0059
560.007-0.00131e-040.0280.00230.0483
570.0075-0.00212e-040.07280.00610.0779
580.0079-0.00121e-040.02480.00210.0455
590.0083-8e-041e-040.00918e-040.0275
600.0087-0.00222e-040.07880.00660.081



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