Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 08:16:36 -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/14/t119764444385jsfdvo9nq9x7v.htm/, Retrieved Thu, 02 May 2024 20:13:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3913, Retrieved Thu, 02 May 2024 20:13:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact180
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-14 15:16:36] [d9ccf6bb4f7743d5d52b9a9a992ccbd5] [Current]
Feedback Forum

Post a new message
Dataseries X:
105.1
113.3
99.1
100.3
93.5
98.8
106.2
98.3
102.1
117.1
101.5
80.5
105.9
109.5
97.2
114.5
93.5
100.9
121.1
116.5
109.3
118.1
108.3
105.4
116.2
111.2
105.8
122.7
99.5
107.9
124.6
115
110.3
132.7
99.7
96.5
118.7
112.9
130.5
137.9
115
116.8
140.9
120.7
134.2
147.3
112.4
107.1
128.4
137.7
135
151
137.4
132.4
161.3
139.8
146
154.6
142.1
120.5




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 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=3913&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3913&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3913&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'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[48])
3696.5-------
37118.7-------
38112.9-------
39130.5-------
40137.9-------
41115-------
42116.8-------
43140.9-------
44120.7-------
45134.2-------
46147.3-------
47112.4-------
48107.1-------
49128.4128.5714112.0655145.07730.49190.99460.87940.9946
50137.7122.5718105.0999140.04380.04480.25660.8610.9587
51135140.1172122.4265157.80780.28540.60560.85670.9999
52151147.5022129.7032165.30130.35010.91570.85481
53137.4124.5981106.7144142.48190.08030.00190.85360.9724
54132.4126.397108.4348144.35920.25620.11490.85250.9824
55161.3150.4967132.4579168.53550.12020.97540.85151
56139.8130.2966112.1819148.41130.15194e-040.85040.994
57146143.7966125.6065161.98670.40620.66660.84941
58154.6156.8966138.6314175.16170.40270.87890.84841
59142.1121.9966103.6566140.33650.01582e-040.84750.9443
60120.5116.696698.2822135.11090.34280.00340.84650.8465

\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 & 96.5 & - & - & - & - & - & - & - \tabularnewline
37 & 118.7 & - & - & - & - & - & - & - \tabularnewline
38 & 112.9 & - & - & - & - & - & - & - \tabularnewline
39 & 130.5 & - & - & - & - & - & - & - \tabularnewline
40 & 137.9 & - & - & - & - & - & - & - \tabularnewline
41 & 115 & - & - & - & - & - & - & - \tabularnewline
42 & 116.8 & - & - & - & - & - & - & - \tabularnewline
43 & 140.9 & - & - & - & - & - & - & - \tabularnewline
44 & 120.7 & - & - & - & - & - & - & - \tabularnewline
45 & 134.2 & - & - & - & - & - & - & - \tabularnewline
46 & 147.3 & - & - & - & - & - & - & - \tabularnewline
47 & 112.4 & - & - & - & - & - & - & - \tabularnewline
48 & 107.1 & - & - & - & - & - & - & - \tabularnewline
49 & 128.4 & 128.5714 & 112.0655 & 145.0773 & 0.4919 & 0.9946 & 0.8794 & 0.9946 \tabularnewline
50 & 137.7 & 122.5718 & 105.0999 & 140.0438 & 0.0448 & 0.2566 & 0.861 & 0.9587 \tabularnewline
51 & 135 & 140.1172 & 122.4265 & 157.8078 & 0.2854 & 0.6056 & 0.8567 & 0.9999 \tabularnewline
52 & 151 & 147.5022 & 129.7032 & 165.3013 & 0.3501 & 0.9157 & 0.8548 & 1 \tabularnewline
53 & 137.4 & 124.5981 & 106.7144 & 142.4819 & 0.0803 & 0.0019 & 0.8536 & 0.9724 \tabularnewline
54 & 132.4 & 126.397 & 108.4348 & 144.3592 & 0.2562 & 0.1149 & 0.8525 & 0.9824 \tabularnewline
55 & 161.3 & 150.4967 & 132.4579 & 168.5355 & 0.1202 & 0.9754 & 0.8515 & 1 \tabularnewline
56 & 139.8 & 130.2966 & 112.1819 & 148.4113 & 0.1519 & 4e-04 & 0.8504 & 0.994 \tabularnewline
57 & 146 & 143.7966 & 125.6065 & 161.9867 & 0.4062 & 0.6666 & 0.8494 & 1 \tabularnewline
58 & 154.6 & 156.8966 & 138.6314 & 175.1617 & 0.4027 & 0.8789 & 0.8484 & 1 \tabularnewline
59 & 142.1 & 121.9966 & 103.6566 & 140.3365 & 0.0158 & 2e-04 & 0.8475 & 0.9443 \tabularnewline
60 & 120.5 & 116.6966 & 98.2822 & 135.1109 & 0.3428 & 0.0034 & 0.8465 & 0.8465 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3913&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]96.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]118.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]130.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]137.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]116.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]140.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]120.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]134.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]147.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]128.4[/C][C]128.5714[/C][C]112.0655[/C][C]145.0773[/C][C]0.4919[/C][C]0.9946[/C][C]0.8794[/C][C]0.9946[/C][/ROW]
[ROW][C]50[/C][C]137.7[/C][C]122.5718[/C][C]105.0999[/C][C]140.0438[/C][C]0.0448[/C][C]0.2566[/C][C]0.861[/C][C]0.9587[/C][/ROW]
[ROW][C]51[/C][C]135[/C][C]140.1172[/C][C]122.4265[/C][C]157.8078[/C][C]0.2854[/C][C]0.6056[/C][C]0.8567[/C][C]0.9999[/C][/ROW]
[ROW][C]52[/C][C]151[/C][C]147.5022[/C][C]129.7032[/C][C]165.3013[/C][C]0.3501[/C][C]0.9157[/C][C]0.8548[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]137.4[/C][C]124.5981[/C][C]106.7144[/C][C]142.4819[/C][C]0.0803[/C][C]0.0019[/C][C]0.8536[/C][C]0.9724[/C][/ROW]
[ROW][C]54[/C][C]132.4[/C][C]126.397[/C][C]108.4348[/C][C]144.3592[/C][C]0.2562[/C][C]0.1149[/C][C]0.8525[/C][C]0.9824[/C][/ROW]
[ROW][C]55[/C][C]161.3[/C][C]150.4967[/C][C]132.4579[/C][C]168.5355[/C][C]0.1202[/C][C]0.9754[/C][C]0.8515[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]139.8[/C][C]130.2966[/C][C]112.1819[/C][C]148.4113[/C][C]0.1519[/C][C]4e-04[/C][C]0.8504[/C][C]0.994[/C][/ROW]
[ROW][C]57[/C][C]146[/C][C]143.7966[/C][C]125.6065[/C][C]161.9867[/C][C]0.4062[/C][C]0.6666[/C][C]0.8494[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]154.6[/C][C]156.8966[/C][C]138.6314[/C][C]175.1617[/C][C]0.4027[/C][C]0.8789[/C][C]0.8484[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]142.1[/C][C]121.9966[/C][C]103.6566[/C][C]140.3365[/C][C]0.0158[/C][C]2e-04[/C][C]0.8475[/C][C]0.9443[/C][/ROW]
[ROW][C]60[/C][C]120.5[/C][C]116.6966[/C][C]98.2822[/C][C]135.1109[/C][C]0.3428[/C][C]0.0034[/C][C]0.8465[/C][C]0.8465[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3913&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3913&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])
3696.5-------
37118.7-------
38112.9-------
39130.5-------
40137.9-------
41115-------
42116.8-------
43140.9-------
44120.7-------
45134.2-------
46147.3-------
47112.4-------
48107.1-------
49128.4128.5714112.0655145.07730.49190.99460.87940.9946
50137.7122.5718105.0999140.04380.04480.25660.8610.9587
51135140.1172122.4265157.80780.28540.60560.85670.9999
52151147.5022129.7032165.30130.35010.91570.85481
53137.4124.5981106.7144142.48190.08030.00190.85360.9724
54132.4126.397108.4348144.35920.25620.11490.85250.9824
55161.3150.4967132.4579168.53550.12020.97540.85151
56139.8130.2966112.1819148.41130.15194e-040.85040.994
57146143.7966125.6065161.98670.40620.66660.84941
58154.6156.8966138.6314175.16170.40270.87890.84841
59142.1121.9966103.6566140.33650.01582e-040.84750.9443
60120.5116.696698.2822135.11090.34280.00340.84650.8465







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0655-0.00131e-040.02940.00240.0495
500.07270.12340.0103228.861119.07184.3671
510.0644-0.03650.00326.18562.18211.4772
520.06160.02370.00212.23451.01951.0097
530.07320.10270.0086163.888413.65743.6956
540.07250.04750.00436.03623.0031.7329
550.06120.07180.006116.71189.7263.1187
560.07090.07290.006190.31477.52622.7434
570.06450.01530.00134.85510.40460.6361
580.0594-0.01460.00125.27420.43950.663
590.07670.16480.0137404.148233.6795.8034
600.08050.03260.002714.46611.20551.098

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0655 & -0.0013 & 1e-04 & 0.0294 & 0.0024 & 0.0495 \tabularnewline
50 & 0.0727 & 0.1234 & 0.0103 & 228.8611 & 19.0718 & 4.3671 \tabularnewline
51 & 0.0644 & -0.0365 & 0.003 & 26.1856 & 2.1821 & 1.4772 \tabularnewline
52 & 0.0616 & 0.0237 & 0.002 & 12.2345 & 1.0195 & 1.0097 \tabularnewline
53 & 0.0732 & 0.1027 & 0.0086 & 163.8884 & 13.6574 & 3.6956 \tabularnewline
54 & 0.0725 & 0.0475 & 0.004 & 36.0362 & 3.003 & 1.7329 \tabularnewline
55 & 0.0612 & 0.0718 & 0.006 & 116.7118 & 9.726 & 3.1187 \tabularnewline
56 & 0.0709 & 0.0729 & 0.0061 & 90.3147 & 7.5262 & 2.7434 \tabularnewline
57 & 0.0645 & 0.0153 & 0.0013 & 4.8551 & 0.4046 & 0.6361 \tabularnewline
58 & 0.0594 & -0.0146 & 0.0012 & 5.2742 & 0.4395 & 0.663 \tabularnewline
59 & 0.0767 & 0.1648 & 0.0137 & 404.1482 & 33.679 & 5.8034 \tabularnewline
60 & 0.0805 & 0.0326 & 0.0027 & 14.4661 & 1.2055 & 1.098 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3913&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.0655[/C][C]-0.0013[/C][C]1e-04[/C][C]0.0294[/C][C]0.0024[/C][C]0.0495[/C][/ROW]
[ROW][C]50[/C][C]0.0727[/C][C]0.1234[/C][C]0.0103[/C][C]228.8611[/C][C]19.0718[/C][C]4.3671[/C][/ROW]
[ROW][C]51[/C][C]0.0644[/C][C]-0.0365[/C][C]0.003[/C][C]26.1856[/C][C]2.1821[/C][C]1.4772[/C][/ROW]
[ROW][C]52[/C][C]0.0616[/C][C]0.0237[/C][C]0.002[/C][C]12.2345[/C][C]1.0195[/C][C]1.0097[/C][/ROW]
[ROW][C]53[/C][C]0.0732[/C][C]0.1027[/C][C]0.0086[/C][C]163.8884[/C][C]13.6574[/C][C]3.6956[/C][/ROW]
[ROW][C]54[/C][C]0.0725[/C][C]0.0475[/C][C]0.004[/C][C]36.0362[/C][C]3.003[/C][C]1.7329[/C][/ROW]
[ROW][C]55[/C][C]0.0612[/C][C]0.0718[/C][C]0.006[/C][C]116.7118[/C][C]9.726[/C][C]3.1187[/C][/ROW]
[ROW][C]56[/C][C]0.0709[/C][C]0.0729[/C][C]0.0061[/C][C]90.3147[/C][C]7.5262[/C][C]2.7434[/C][/ROW]
[ROW][C]57[/C][C]0.0645[/C][C]0.0153[/C][C]0.0013[/C][C]4.8551[/C][C]0.4046[/C][C]0.6361[/C][/ROW]
[ROW][C]58[/C][C]0.0594[/C][C]-0.0146[/C][C]0.0012[/C][C]5.2742[/C][C]0.4395[/C][C]0.663[/C][/ROW]
[ROW][C]59[/C][C]0.0767[/C][C]0.1648[/C][C]0.0137[/C][C]404.1482[/C][C]33.679[/C][C]5.8034[/C][/ROW]
[ROW][C]60[/C][C]0.0805[/C][C]0.0326[/C][C]0.0027[/C][C]14.4661[/C][C]1.2055[/C][C]1.098[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3913&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3913&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.0655-0.00131e-040.02940.00240.0495
500.07270.12340.0103228.861119.07184.3671
510.0644-0.03650.00326.18562.18211.4772
520.06160.02370.00212.23451.01951.0097
530.07320.10270.0086163.888413.65743.6956
540.07250.04750.00436.03623.0031.7329
550.06120.07180.006116.71189.7263.1187
560.07090.07290.006190.31477.52622.7434
570.06450.01530.00134.85510.40460.6361
580.0594-0.01460.00125.27420.43950.663
590.07670.16480.0137404.148233.6795.8034
600.08050.03260.002714.46611.20551.098



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