Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 06:04:38 -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/07/t1197031933u1xp5owc3xruyj9.htm/, Retrieved Sun, 28 Apr 2024 22:33:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2803, Retrieved Sun, 28 Apr 2024 22:33:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-07 13:04:38] [6552dbdb87730106b738e8affc0d90fa] [Current]
Feedback Forum

Post a new message
Dataseries X:
103.1
103.1
103.3
103.5
103.3
103.5
103.8
103.9
103.9
104.2
104.6
104.9
105.2
105.2
105.6
105.6
106.2
106.3
106.4
106.9
107.2
107.3
107.3
107.4
107.55
107.87
108.37
108.38
107.92
108.03
108.14
108.3
108.64
108.66
109.04
109.03
109.03
109.54
109.75
109.83
109.65
109.82
109.95
110.12
110.15
110.2
109.99
110.14
110.14
110.81
110.97
110.99
109.73
109.81
110.02
110.18
110.21
110.25
110.36
110.51
110.64
110.95
111.18
111.19
111.69
111.7
111.83
111.77
111.73
112.01
111.86
112.04




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 5 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2803&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2803&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2803&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 time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[60])
48110.14-------
49110.14-------
50110.81-------
51110.97-------
52110.99-------
53109.73-------
54109.81-------
55110.02-------
56110.18-------
57110.21-------
58110.25-------
59110.36-------
60110.51-------
61110.64110.5228110.1152110.93030.28650.52450.96720.5245
62110.95110.9311110.3535111.50870.47450.83840.65950.9235
63111.18111.0103110.3024111.71810.31920.56630.54440.917
64111.19111.0043110.1866111.8220.32810.33680.51370.882
65111.69110.7127109.7984111.62710.01810.15320.98240.6681
66111.7110.769109.7672111.77080.03430.03580.96970.6938
67111.83110.8568109.7746111.93890.0390.06340.93520.735
68111.77111.0969109.9399112.25380.12710.10710.93980.8399
69111.73111.1084109.8812112.33560.16040.14530.92430.8304
70112.01111.1132109.8195112.40680.08710.1750.90450.8196
71111.86110.8797109.5228112.23650.07840.05130.77360.7033
72112.04110.9862109.569112.40350.07250.11340.74490.7449

\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[60]) \tabularnewline
48 & 110.14 & - & - & - & - & - & - & - \tabularnewline
49 & 110.14 & - & - & - & - & - & - & - \tabularnewline
50 & 110.81 & - & - & - & - & - & - & - \tabularnewline
51 & 110.97 & - & - & - & - & - & - & - \tabularnewline
52 & 110.99 & - & - & - & - & - & - & - \tabularnewline
53 & 109.73 & - & - & - & - & - & - & - \tabularnewline
54 & 109.81 & - & - & - & - & - & - & - \tabularnewline
55 & 110.02 & - & - & - & - & - & - & - \tabularnewline
56 & 110.18 & - & - & - & - & - & - & - \tabularnewline
57 & 110.21 & - & - & - & - & - & - & - \tabularnewline
58 & 110.25 & - & - & - & - & - & - & - \tabularnewline
59 & 110.36 & - & - & - & - & - & - & - \tabularnewline
60 & 110.51 & - & - & - & - & - & - & - \tabularnewline
61 & 110.64 & 110.5228 & 110.1152 & 110.9303 & 0.2865 & 0.5245 & 0.9672 & 0.5245 \tabularnewline
62 & 110.95 & 110.9311 & 110.3535 & 111.5087 & 0.4745 & 0.8384 & 0.6595 & 0.9235 \tabularnewline
63 & 111.18 & 111.0103 & 110.3024 & 111.7181 & 0.3192 & 0.5663 & 0.5444 & 0.917 \tabularnewline
64 & 111.19 & 111.0043 & 110.1866 & 111.822 & 0.3281 & 0.3368 & 0.5137 & 0.882 \tabularnewline
65 & 111.69 & 110.7127 & 109.7984 & 111.6271 & 0.0181 & 0.1532 & 0.9824 & 0.6681 \tabularnewline
66 & 111.7 & 110.769 & 109.7672 & 111.7708 & 0.0343 & 0.0358 & 0.9697 & 0.6938 \tabularnewline
67 & 111.83 & 110.8568 & 109.7746 & 111.9389 & 0.039 & 0.0634 & 0.9352 & 0.735 \tabularnewline
68 & 111.77 & 111.0969 & 109.9399 & 112.2538 & 0.1271 & 0.1071 & 0.9398 & 0.8399 \tabularnewline
69 & 111.73 & 111.1084 & 109.8812 & 112.3356 & 0.1604 & 0.1453 & 0.9243 & 0.8304 \tabularnewline
70 & 112.01 & 111.1132 & 109.8195 & 112.4068 & 0.0871 & 0.175 & 0.9045 & 0.8196 \tabularnewline
71 & 111.86 & 110.8797 & 109.5228 & 112.2365 & 0.0784 & 0.0513 & 0.7736 & 0.7033 \tabularnewline
72 & 112.04 & 110.9862 & 109.569 & 112.4035 & 0.0725 & 0.1134 & 0.7449 & 0.7449 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2803&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[60])[/C][/ROW]
[ROW][C]48[/C][C]110.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]110.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]110.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]110.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]110.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]109.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]109.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]110.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]110.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]110.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]110.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]110.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]110.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]110.64[/C][C]110.5228[/C][C]110.1152[/C][C]110.9303[/C][C]0.2865[/C][C]0.5245[/C][C]0.9672[/C][C]0.5245[/C][/ROW]
[ROW][C]62[/C][C]110.95[/C][C]110.9311[/C][C]110.3535[/C][C]111.5087[/C][C]0.4745[/C][C]0.8384[/C][C]0.6595[/C][C]0.9235[/C][/ROW]
[ROW][C]63[/C][C]111.18[/C][C]111.0103[/C][C]110.3024[/C][C]111.7181[/C][C]0.3192[/C][C]0.5663[/C][C]0.5444[/C][C]0.917[/C][/ROW]
[ROW][C]64[/C][C]111.19[/C][C]111.0043[/C][C]110.1866[/C][C]111.822[/C][C]0.3281[/C][C]0.3368[/C][C]0.5137[/C][C]0.882[/C][/ROW]
[ROW][C]65[/C][C]111.69[/C][C]110.7127[/C][C]109.7984[/C][C]111.6271[/C][C]0.0181[/C][C]0.1532[/C][C]0.9824[/C][C]0.6681[/C][/ROW]
[ROW][C]66[/C][C]111.7[/C][C]110.769[/C][C]109.7672[/C][C]111.7708[/C][C]0.0343[/C][C]0.0358[/C][C]0.9697[/C][C]0.6938[/C][/ROW]
[ROW][C]67[/C][C]111.83[/C][C]110.8568[/C][C]109.7746[/C][C]111.9389[/C][C]0.039[/C][C]0.0634[/C][C]0.9352[/C][C]0.735[/C][/ROW]
[ROW][C]68[/C][C]111.77[/C][C]111.0969[/C][C]109.9399[/C][C]112.2538[/C][C]0.1271[/C][C]0.1071[/C][C]0.9398[/C][C]0.8399[/C][/ROW]
[ROW][C]69[/C][C]111.73[/C][C]111.1084[/C][C]109.8812[/C][C]112.3356[/C][C]0.1604[/C][C]0.1453[/C][C]0.9243[/C][C]0.8304[/C][/ROW]
[ROW][C]70[/C][C]112.01[/C][C]111.1132[/C][C]109.8195[/C][C]112.4068[/C][C]0.0871[/C][C]0.175[/C][C]0.9045[/C][C]0.8196[/C][/ROW]
[ROW][C]71[/C][C]111.86[/C][C]110.8797[/C][C]109.5228[/C][C]112.2365[/C][C]0.0784[/C][C]0.0513[/C][C]0.7736[/C][C]0.7033[/C][/ROW]
[ROW][C]72[/C][C]112.04[/C][C]110.9862[/C][C]109.569[/C][C]112.4035[/C][C]0.0725[/C][C]0.1134[/C][C]0.7449[/C][C]0.7449[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2803&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2803&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[60])
48110.14-------
49110.14-------
50110.81-------
51110.97-------
52110.99-------
53109.73-------
54109.81-------
55110.02-------
56110.18-------
57110.21-------
58110.25-------
59110.36-------
60110.51-------
61110.64110.5228110.1152110.93030.28650.52450.96720.5245
62110.95110.9311110.3535111.50870.47450.83840.65950.9235
63111.18111.0103110.3024111.71810.31920.56630.54440.917
64111.19111.0043110.1866111.8220.32810.33680.51370.882
65111.69110.7127109.7984111.62710.01810.15320.98240.6681
66111.7110.769109.7672111.77080.03430.03580.96970.6938
67111.83110.8568109.7746111.93890.0390.06340.93520.735
68111.77111.0969109.9399112.25380.12710.10710.93980.8399
69111.73111.1084109.8812112.33560.16040.14530.92430.8304
70112.01111.1132109.8195112.40680.08710.1750.90450.8196
71111.86110.8797109.5228112.23650.07840.05130.77360.7033
72112.04110.9862109.569112.40350.07250.11340.74490.7449







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.00190.00111e-040.01370.00110.0338
620.00272e-0404e-0400.0055
630.00330.00151e-040.02880.00240.049
640.00380.00171e-040.03450.00290.0536
650.00420.00887e-040.9550.07960.2821
660.00460.00847e-040.86680.07220.2688
670.0050.00887e-040.94710.07890.2809
680.00530.00615e-040.45310.03780.1943
690.00560.00565e-040.38640.03220.1794
700.00590.00817e-040.80430.0670.2589
710.00620.00887e-040.9610.08010.283
720.00650.00958e-041.11040.09250.3042

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0019 & 0.0011 & 1e-04 & 0.0137 & 0.0011 & 0.0338 \tabularnewline
62 & 0.0027 & 2e-04 & 0 & 4e-04 & 0 & 0.0055 \tabularnewline
63 & 0.0033 & 0.0015 & 1e-04 & 0.0288 & 0.0024 & 0.049 \tabularnewline
64 & 0.0038 & 0.0017 & 1e-04 & 0.0345 & 0.0029 & 0.0536 \tabularnewline
65 & 0.0042 & 0.0088 & 7e-04 & 0.955 & 0.0796 & 0.2821 \tabularnewline
66 & 0.0046 & 0.0084 & 7e-04 & 0.8668 & 0.0722 & 0.2688 \tabularnewline
67 & 0.005 & 0.0088 & 7e-04 & 0.9471 & 0.0789 & 0.2809 \tabularnewline
68 & 0.0053 & 0.0061 & 5e-04 & 0.4531 & 0.0378 & 0.1943 \tabularnewline
69 & 0.0056 & 0.0056 & 5e-04 & 0.3864 & 0.0322 & 0.1794 \tabularnewline
70 & 0.0059 & 0.0081 & 7e-04 & 0.8043 & 0.067 & 0.2589 \tabularnewline
71 & 0.0062 & 0.0088 & 7e-04 & 0.961 & 0.0801 & 0.283 \tabularnewline
72 & 0.0065 & 0.0095 & 8e-04 & 1.1104 & 0.0925 & 0.3042 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2803&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]61[/C][C]0.0019[/C][C]0.0011[/C][C]1e-04[/C][C]0.0137[/C][C]0.0011[/C][C]0.0338[/C][/ROW]
[ROW][C]62[/C][C]0.0027[/C][C]2e-04[/C][C]0[/C][C]4e-04[/C][C]0[/C][C]0.0055[/C][/ROW]
[ROW][C]63[/C][C]0.0033[/C][C]0.0015[/C][C]1e-04[/C][C]0.0288[/C][C]0.0024[/C][C]0.049[/C][/ROW]
[ROW][C]64[/C][C]0.0038[/C][C]0.0017[/C][C]1e-04[/C][C]0.0345[/C][C]0.0029[/C][C]0.0536[/C][/ROW]
[ROW][C]65[/C][C]0.0042[/C][C]0.0088[/C][C]7e-04[/C][C]0.955[/C][C]0.0796[/C][C]0.2821[/C][/ROW]
[ROW][C]66[/C][C]0.0046[/C][C]0.0084[/C][C]7e-04[/C][C]0.8668[/C][C]0.0722[/C][C]0.2688[/C][/ROW]
[ROW][C]67[/C][C]0.005[/C][C]0.0088[/C][C]7e-04[/C][C]0.9471[/C][C]0.0789[/C][C]0.2809[/C][/ROW]
[ROW][C]68[/C][C]0.0053[/C][C]0.0061[/C][C]5e-04[/C][C]0.4531[/C][C]0.0378[/C][C]0.1943[/C][/ROW]
[ROW][C]69[/C][C]0.0056[/C][C]0.0056[/C][C]5e-04[/C][C]0.3864[/C][C]0.0322[/C][C]0.1794[/C][/ROW]
[ROW][C]70[/C][C]0.0059[/C][C]0.0081[/C][C]7e-04[/C][C]0.8043[/C][C]0.067[/C][C]0.2589[/C][/ROW]
[ROW][C]71[/C][C]0.0062[/C][C]0.0088[/C][C]7e-04[/C][C]0.961[/C][C]0.0801[/C][C]0.283[/C][/ROW]
[ROW][C]72[/C][C]0.0065[/C][C]0.0095[/C][C]8e-04[/C][C]1.1104[/C][C]0.0925[/C][C]0.3042[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2803&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2803&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
610.00190.00111e-040.01370.00110.0338
620.00272e-0404e-0400.0055
630.00330.00151e-040.02880.00240.049
640.00380.00171e-040.03450.00290.0536
650.00420.00887e-040.9550.07960.2821
660.00460.00847e-040.86680.07220.2688
670.0050.00887e-040.94710.07890.2809
680.00530.00615e-040.45310.03780.1943
690.00560.00565e-040.38640.03220.1794
700.00590.00817e-040.80430.0670.2589
710.00620.00887e-040.9610.08010.283
720.00650.00958e-041.11040.09250.3042



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