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 computationFri, 11 Dec 2009 07:14:48 -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/2009/Dec/11/t1260541170pxku7ob54vq0zs5.htm/, Retrieved Sun, 28 Apr 2024 23:13:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66222, Retrieved Sun, 28 Apr 2024 23:13:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact168
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
- R PD  [ARIMA Forecasting] [ARIMA-Forecasting] [2009-12-09 16:48:03] [ee7c2e7343f5b1451e62c5c16ec521f1]
-   PD      [ARIMA Forecasting] [] [2009-12-11 14:14:48] [fc845972e0ebdb725d2fb9537c0c51aa] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
100.7
115.5
100.7
109.9
114.6
85.4
100.5
114.8
116.5
112.9
102
106
105.3
118.8
106.1
109.3
117.2
92.5
104.2
112.5
122.4
113.3
100
110.7
112.8
109.8
117.3
109.1
115.9
96
99.8
116.8
115.7
99.4
94.3
91
93.2
103.1
94.1
91.8
102.7




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66222&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]1 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=66222&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66222&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 time1 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[49])
37117.2-------
3892.5-------
39104.2-------
40112.5-------
41122.4-------
42113.3-------
43100-------
44110.7-------
45112.8-------
46109.8-------
47117.3-------
48109.1-------
49115.9-------
509695.981586.7419105.2210.498400.76990
5199.8103.165593.4915112.83960.24770.92670.4170.0049
52116.8112.5101.5251123.47490.22130.98830.50.2719
53115.7122.4111.4251133.37490.11570.84140.50.8771
5499.4113.3102.3251124.27490.00650.33410.50.3212
5594.310089.0251110.97490.15430.54270.50.0023
5691110.799.7251121.67492e-040.99830.50.1765
5793.2112.8101.8251123.77492e-0410.50.2899
58103.1109.898.8251120.77490.11570.99850.50.138
5994.1117.3106.3251128.274900.99440.50.5987
6091.8109.198.1251120.07490.0010.99630.50.1123
61102.7115.9104.9251126.87490.009210.50.5

\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[49]) \tabularnewline
37 & 117.2 & - & - & - & - & - & - & - \tabularnewline
38 & 92.5 & - & - & - & - & - & - & - \tabularnewline
39 & 104.2 & - & - & - & - & - & - & - \tabularnewline
40 & 112.5 & - & - & - & - & - & - & - \tabularnewline
41 & 122.4 & - & - & - & - & - & - & - \tabularnewline
42 & 113.3 & - & - & - & - & - & - & - \tabularnewline
43 & 100 & - & - & - & - & - & - & - \tabularnewline
44 & 110.7 & - & - & - & - & - & - & - \tabularnewline
45 & 112.8 & - & - & - & - & - & - & - \tabularnewline
46 & 109.8 & - & - & - & - & - & - & - \tabularnewline
47 & 117.3 & - & - & - & - & - & - & - \tabularnewline
48 & 109.1 & - & - & - & - & - & - & - \tabularnewline
49 & 115.9 & - & - & - & - & - & - & - \tabularnewline
50 & 96 & 95.9815 & 86.7419 & 105.221 & 0.4984 & 0 & 0.7699 & 0 \tabularnewline
51 & 99.8 & 103.1655 & 93.4915 & 112.8396 & 0.2477 & 0.9267 & 0.417 & 0.0049 \tabularnewline
52 & 116.8 & 112.5 & 101.5251 & 123.4749 & 0.2213 & 0.9883 & 0.5 & 0.2719 \tabularnewline
53 & 115.7 & 122.4 & 111.4251 & 133.3749 & 0.1157 & 0.8414 & 0.5 & 0.8771 \tabularnewline
54 & 99.4 & 113.3 & 102.3251 & 124.2749 & 0.0065 & 0.3341 & 0.5 & 0.3212 \tabularnewline
55 & 94.3 & 100 & 89.0251 & 110.9749 & 0.1543 & 0.5427 & 0.5 & 0.0023 \tabularnewline
56 & 91 & 110.7 & 99.7251 & 121.6749 & 2e-04 & 0.9983 & 0.5 & 0.1765 \tabularnewline
57 & 93.2 & 112.8 & 101.8251 & 123.7749 & 2e-04 & 1 & 0.5 & 0.2899 \tabularnewline
58 & 103.1 & 109.8 & 98.8251 & 120.7749 & 0.1157 & 0.9985 & 0.5 & 0.138 \tabularnewline
59 & 94.1 & 117.3 & 106.3251 & 128.2749 & 0 & 0.9944 & 0.5 & 0.5987 \tabularnewline
60 & 91.8 & 109.1 & 98.1251 & 120.0749 & 0.001 & 0.9963 & 0.5 & 0.1123 \tabularnewline
61 & 102.7 & 115.9 & 104.9251 & 126.8749 & 0.0092 & 1 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66222&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[49])[/C][/ROW]
[ROW][C]37[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]92.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]122.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]109.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]96[/C][C]95.9815[/C][C]86.7419[/C][C]105.221[/C][C]0.4984[/C][C]0[/C][C]0.7699[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]99.8[/C][C]103.1655[/C][C]93.4915[/C][C]112.8396[/C][C]0.2477[/C][C]0.9267[/C][C]0.417[/C][C]0.0049[/C][/ROW]
[ROW][C]52[/C][C]116.8[/C][C]112.5[/C][C]101.5251[/C][C]123.4749[/C][C]0.2213[/C][C]0.9883[/C][C]0.5[/C][C]0.2719[/C][/ROW]
[ROW][C]53[/C][C]115.7[/C][C]122.4[/C][C]111.4251[/C][C]133.3749[/C][C]0.1157[/C][C]0.8414[/C][C]0.5[/C][C]0.8771[/C][/ROW]
[ROW][C]54[/C][C]99.4[/C][C]113.3[/C][C]102.3251[/C][C]124.2749[/C][C]0.0065[/C][C]0.3341[/C][C]0.5[/C][C]0.3212[/C][/ROW]
[ROW][C]55[/C][C]94.3[/C][C]100[/C][C]89.0251[/C][C]110.9749[/C][C]0.1543[/C][C]0.5427[/C][C]0.5[/C][C]0.0023[/C][/ROW]
[ROW][C]56[/C][C]91[/C][C]110.7[/C][C]99.7251[/C][C]121.6749[/C][C]2e-04[/C][C]0.9983[/C][C]0.5[/C][C]0.1765[/C][/ROW]
[ROW][C]57[/C][C]93.2[/C][C]112.8[/C][C]101.8251[/C][C]123.7749[/C][C]2e-04[/C][C]1[/C][C]0.5[/C][C]0.2899[/C][/ROW]
[ROW][C]58[/C][C]103.1[/C][C]109.8[/C][C]98.8251[/C][C]120.7749[/C][C]0.1157[/C][C]0.9985[/C][C]0.5[/C][C]0.138[/C][/ROW]
[ROW][C]59[/C][C]94.1[/C][C]117.3[/C][C]106.3251[/C][C]128.2749[/C][C]0[/C][C]0.9944[/C][C]0.5[/C][C]0.5987[/C][/ROW]
[ROW][C]60[/C][C]91.8[/C][C]109.1[/C][C]98.1251[/C][C]120.0749[/C][C]0.001[/C][C]0.9963[/C][C]0.5[/C][C]0.1123[/C][/ROW]
[ROW][C]61[/C][C]102.7[/C][C]115.9[/C][C]104.9251[/C][C]126.8749[/C][C]0.0092[/C][C]1[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66222&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66222&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[49])
37117.2-------
3892.5-------
39104.2-------
40112.5-------
41122.4-------
42113.3-------
43100-------
44110.7-------
45112.8-------
46109.8-------
47117.3-------
48109.1-------
49115.9-------
509695.981586.7419105.2210.498400.76990
5199.8103.165593.4915112.83960.24770.92670.4170.0049
52116.8112.5101.5251123.47490.22130.98830.50.2719
53115.7122.4111.4251133.37490.11570.84140.50.8771
5499.4113.3102.3251124.27490.00650.33410.50.3212
5594.310089.0251110.97490.15430.54270.50.0023
5691110.799.7251121.67492e-040.99830.50.1765
5793.2112.8101.8251123.77492e-0410.50.2899
58103.1109.898.8251120.77490.11570.99850.50.138
5994.1117.3106.3251128.274900.99440.50.5987
6091.8109.198.1251120.07490.0010.99630.50.1123
61102.7115.9104.9251126.87490.009210.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.04912e-0403e-0400
510.0478-0.03260.016411.32695.66362.3798
520.04980.03820.023718.499.93913.1526
530.0457-0.05470.031444.8918.67684.3217
540.0494-0.12270.0497193.2153.58347.3201
550.056-0.0570.050932.4950.06797.0759
560.0506-0.1780.0691388.0998.35679.9175
570.0496-0.17380.0821384.16134.082211.5794
580.051-0.0610.079844.89124.171911.1432
590.0477-0.19780.0916538.24165.578712.8677
600.0513-0.15860.0977299.29177.734313.3317
610.0483-0.11390.099174.24177.443113.3208

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0491 & 2e-04 & 0 & 3e-04 & 0 & 0 \tabularnewline
51 & 0.0478 & -0.0326 & 0.0164 & 11.3269 & 5.6636 & 2.3798 \tabularnewline
52 & 0.0498 & 0.0382 & 0.0237 & 18.49 & 9.9391 & 3.1526 \tabularnewline
53 & 0.0457 & -0.0547 & 0.0314 & 44.89 & 18.6768 & 4.3217 \tabularnewline
54 & 0.0494 & -0.1227 & 0.0497 & 193.21 & 53.5834 & 7.3201 \tabularnewline
55 & 0.056 & -0.057 & 0.0509 & 32.49 & 50.0679 & 7.0759 \tabularnewline
56 & 0.0506 & -0.178 & 0.0691 & 388.09 & 98.3567 & 9.9175 \tabularnewline
57 & 0.0496 & -0.1738 & 0.0821 & 384.16 & 134.0822 & 11.5794 \tabularnewline
58 & 0.051 & -0.061 & 0.0798 & 44.89 & 124.1719 & 11.1432 \tabularnewline
59 & 0.0477 & -0.1978 & 0.0916 & 538.24 & 165.5787 & 12.8677 \tabularnewline
60 & 0.0513 & -0.1586 & 0.0977 & 299.29 & 177.7343 & 13.3317 \tabularnewline
61 & 0.0483 & -0.1139 & 0.099 & 174.24 & 177.4431 & 13.3208 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66222&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]50[/C][C]0.0491[/C][C]2e-04[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.0478[/C][C]-0.0326[/C][C]0.0164[/C][C]11.3269[/C][C]5.6636[/C][C]2.3798[/C][/ROW]
[ROW][C]52[/C][C]0.0498[/C][C]0.0382[/C][C]0.0237[/C][C]18.49[/C][C]9.9391[/C][C]3.1526[/C][/ROW]
[ROW][C]53[/C][C]0.0457[/C][C]-0.0547[/C][C]0.0314[/C][C]44.89[/C][C]18.6768[/C][C]4.3217[/C][/ROW]
[ROW][C]54[/C][C]0.0494[/C][C]-0.1227[/C][C]0.0497[/C][C]193.21[/C][C]53.5834[/C][C]7.3201[/C][/ROW]
[ROW][C]55[/C][C]0.056[/C][C]-0.057[/C][C]0.0509[/C][C]32.49[/C][C]50.0679[/C][C]7.0759[/C][/ROW]
[ROW][C]56[/C][C]0.0506[/C][C]-0.178[/C][C]0.0691[/C][C]388.09[/C][C]98.3567[/C][C]9.9175[/C][/ROW]
[ROW][C]57[/C][C]0.0496[/C][C]-0.1738[/C][C]0.0821[/C][C]384.16[/C][C]134.0822[/C][C]11.5794[/C][/ROW]
[ROW][C]58[/C][C]0.051[/C][C]-0.061[/C][C]0.0798[/C][C]44.89[/C][C]124.1719[/C][C]11.1432[/C][/ROW]
[ROW][C]59[/C][C]0.0477[/C][C]-0.1978[/C][C]0.0916[/C][C]538.24[/C][C]165.5787[/C][C]12.8677[/C][/ROW]
[ROW][C]60[/C][C]0.0513[/C][C]-0.1586[/C][C]0.0977[/C][C]299.29[/C][C]177.7343[/C][C]13.3317[/C][/ROW]
[ROW][C]61[/C][C]0.0483[/C][C]-0.1139[/C][C]0.099[/C][C]174.24[/C][C]177.4431[/C][C]13.3208[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66222&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66222&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
500.04912e-0403e-0400
510.0478-0.03260.016411.32695.66362.3798
520.04980.03820.023718.499.93913.1526
530.0457-0.05470.031444.8918.67684.3217
540.0494-0.12270.0497193.2153.58347.3201
550.056-0.0570.050932.4950.06797.0759
560.0506-0.1780.0691388.0998.35679.9175
570.0496-0.17380.0821384.16134.082211.5794
580.051-0.0610.079844.89124.171911.1432
590.0477-0.19780.0916538.24165.578712.8677
600.0513-0.15860.0977299.29177.734313.3317
610.0483-0.11390.099174.24177.443113.3208



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