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 computationSat, 20 Dec 2008 15:37:59 -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/2008/Dec/20/t12298127019w52h9obe77b8yq.htm/, Retrieved Wed, 22 May 2024 14:02:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35459, Retrieved Wed, 22 May 2024 14:02:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact188
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [Arima backward] [2008-12-20 17:03:24] [8d78428855b119373cac369316c08983]
- RMP     [ARIMA Forecasting] [] [2008-12-20 22:37:59] [d76b387543b13b5e3afd8ff9e5fdc89f] [Current]
Feedback Forum

Post a new message
Dataseries X:
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738
31566
30111
30019
31934
25826
26835
20205
17789
20520
22518
15572




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35459&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35459&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35459&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
3717382-------
389367-------
3931124-------
4026551-------
4130651-------
4225859-------
4325100-------
4425778-------
4520418-------
4618688-------
4720424-------
4824776-------
4919814-------
501273893673885.020214848.97980.11411e-040.51e-04
51315663112425642.020236605.97980.437210.51
52301112655121069.020232032.97980.10150.03650.50.992
53300193065125169.020236132.97980.41060.57650.50.9999
54319342585920377.020231340.97980.01490.06850.50.9847
55258262510019618.020230581.97980.39760.00730.50.9706
56268352577820296.020231259.97980.35270.49320.50.9835
57202052041814936.020225899.97980.46960.01090.50.5855
58177891868813206.020224169.97980.37390.29380.50.3436
59205202042414942.020225905.97980.48630.82690.50.5863
60225182477619294.020230257.97980.20970.9360.50.962
61155721981414332.020225295.97980.06470.16680.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 & 17382 & - & - & - & - & - & - & - \tabularnewline
38 & 9367 & - & - & - & - & - & - & - \tabularnewline
39 & 31124 & - & - & - & - & - & - & - \tabularnewline
40 & 26551 & - & - & - & - & - & - & - \tabularnewline
41 & 30651 & - & - & - & - & - & - & - \tabularnewline
42 & 25859 & - & - & - & - & - & - & - \tabularnewline
43 & 25100 & - & - & - & - & - & - & - \tabularnewline
44 & 25778 & - & - & - & - & - & - & - \tabularnewline
45 & 20418 & - & - & - & - & - & - & - \tabularnewline
46 & 18688 & - & - & - & - & - & - & - \tabularnewline
47 & 20424 & - & - & - & - & - & - & - \tabularnewline
48 & 24776 & - & - & - & - & - & - & - \tabularnewline
49 & 19814 & - & - & - & - & - & - & - \tabularnewline
50 & 12738 & 9367 & 3885.0202 & 14848.9798 & 0.1141 & 1e-04 & 0.5 & 1e-04 \tabularnewline
51 & 31566 & 31124 & 25642.0202 & 36605.9798 & 0.4372 & 1 & 0.5 & 1 \tabularnewline
52 & 30111 & 26551 & 21069.0202 & 32032.9798 & 0.1015 & 0.0365 & 0.5 & 0.992 \tabularnewline
53 & 30019 & 30651 & 25169.0202 & 36132.9798 & 0.4106 & 0.5765 & 0.5 & 0.9999 \tabularnewline
54 & 31934 & 25859 & 20377.0202 & 31340.9798 & 0.0149 & 0.0685 & 0.5 & 0.9847 \tabularnewline
55 & 25826 & 25100 & 19618.0202 & 30581.9798 & 0.3976 & 0.0073 & 0.5 & 0.9706 \tabularnewline
56 & 26835 & 25778 & 20296.0202 & 31259.9798 & 0.3527 & 0.4932 & 0.5 & 0.9835 \tabularnewline
57 & 20205 & 20418 & 14936.0202 & 25899.9798 & 0.4696 & 0.0109 & 0.5 & 0.5855 \tabularnewline
58 & 17789 & 18688 & 13206.0202 & 24169.9798 & 0.3739 & 0.2938 & 0.5 & 0.3436 \tabularnewline
59 & 20520 & 20424 & 14942.0202 & 25905.9798 & 0.4863 & 0.8269 & 0.5 & 0.5863 \tabularnewline
60 & 22518 & 24776 & 19294.0202 & 30257.9798 & 0.2097 & 0.936 & 0.5 & 0.962 \tabularnewline
61 & 15572 & 19814 & 14332.0202 & 25295.9798 & 0.0647 & 0.1668 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35459&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]17382[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]9367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]31124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]26551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]30651[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]25859[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]25100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]25778[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]20418[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]18688[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]20424[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]24776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]19814[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]12738[/C][C]9367[/C][C]3885.0202[/C][C]14848.9798[/C][C]0.1141[/C][C]1e-04[/C][C]0.5[/C][C]1e-04[/C][/ROW]
[ROW][C]51[/C][C]31566[/C][C]31124[/C][C]25642.0202[/C][C]36605.9798[/C][C]0.4372[/C][C]1[/C][C]0.5[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]30111[/C][C]26551[/C][C]21069.0202[/C][C]32032.9798[/C][C]0.1015[/C][C]0.0365[/C][C]0.5[/C][C]0.992[/C][/ROW]
[ROW][C]53[/C][C]30019[/C][C]30651[/C][C]25169.0202[/C][C]36132.9798[/C][C]0.4106[/C][C]0.5765[/C][C]0.5[/C][C]0.9999[/C][/ROW]
[ROW][C]54[/C][C]31934[/C][C]25859[/C][C]20377.0202[/C][C]31340.9798[/C][C]0.0149[/C][C]0.0685[/C][C]0.5[/C][C]0.9847[/C][/ROW]
[ROW][C]55[/C][C]25826[/C][C]25100[/C][C]19618.0202[/C][C]30581.9798[/C][C]0.3976[/C][C]0.0073[/C][C]0.5[/C][C]0.9706[/C][/ROW]
[ROW][C]56[/C][C]26835[/C][C]25778[/C][C]20296.0202[/C][C]31259.9798[/C][C]0.3527[/C][C]0.4932[/C][C]0.5[/C][C]0.9835[/C][/ROW]
[ROW][C]57[/C][C]20205[/C][C]20418[/C][C]14936.0202[/C][C]25899.9798[/C][C]0.4696[/C][C]0.0109[/C][C]0.5[/C][C]0.5855[/C][/ROW]
[ROW][C]58[/C][C]17789[/C][C]18688[/C][C]13206.0202[/C][C]24169.9798[/C][C]0.3739[/C][C]0.2938[/C][C]0.5[/C][C]0.3436[/C][/ROW]
[ROW][C]59[/C][C]20520[/C][C]20424[/C][C]14942.0202[/C][C]25905.9798[/C][C]0.4863[/C][C]0.8269[/C][C]0.5[/C][C]0.5863[/C][/ROW]
[ROW][C]60[/C][C]22518[/C][C]24776[/C][C]19294.0202[/C][C]30257.9798[/C][C]0.2097[/C][C]0.936[/C][C]0.5[/C][C]0.962[/C][/ROW]
[ROW][C]61[/C][C]15572[/C][C]19814[/C][C]14332.0202[/C][C]25295.9798[/C][C]0.0647[/C][C]0.1668[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35459&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35459&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])
3717382-------
389367-------
3931124-------
4026551-------
4130651-------
4225859-------
4325100-------
4425778-------
4520418-------
4618688-------
4720424-------
4824776-------
4919814-------
501273893673885.020214848.97980.11411e-040.51e-04
51315663112425642.020236605.97980.437210.51
52301112655121069.020232032.97980.10150.03650.50.992
53300193065125169.020236132.97980.41060.57650.50.9999
54319342585920377.020231340.97980.01490.06850.50.9847
55258262510019618.020230581.97980.39760.00730.50.9706
56268352577820296.020231259.97980.35270.49320.50.9835
57202052041814936.020225899.97980.46960.01090.50.5855
58177891868813206.020224169.97980.37390.29380.50.3436
59205202042414942.020225905.97980.48630.82690.50.5863
60225182477619294.020230257.97980.20970.9360.50.962
61155721981414332.020225295.97980.06470.16680.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.29860.35990.0311363641946970.0833973.1239
510.08990.01420.001219536416280.3333127.5944
520.10530.13410.0112126736001056133.33331027.6835
530.0913-0.02060.001739942433285.3333182.4427
540.10820.23490.0196369056253075468.751753.7014
550.11140.02890.002452707643923209.5781
560.10850.0410.0034111724993104.0833305.1296
570.137-0.01049e-04453693780.7561.4878
580.1497-0.04810.00480820167350.0833259.5189
590.13690.00474e-04921676827.7128
600.1129-0.09110.00765098564424880.3333651.8285
610.1412-0.21410.01781799456414995471224.5599

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.2986 & 0.3599 & 0.03 & 11363641 & 946970.0833 & 973.1239 \tabularnewline
51 & 0.0899 & 0.0142 & 0.0012 & 195364 & 16280.3333 & 127.5944 \tabularnewline
52 & 0.1053 & 0.1341 & 0.0112 & 12673600 & 1056133.3333 & 1027.6835 \tabularnewline
53 & 0.0913 & -0.0206 & 0.0017 & 399424 & 33285.3333 & 182.4427 \tabularnewline
54 & 0.1082 & 0.2349 & 0.0196 & 36905625 & 3075468.75 & 1753.7014 \tabularnewline
55 & 0.1114 & 0.0289 & 0.0024 & 527076 & 43923 & 209.5781 \tabularnewline
56 & 0.1085 & 0.041 & 0.0034 & 1117249 & 93104.0833 & 305.1296 \tabularnewline
57 & 0.137 & -0.0104 & 9e-04 & 45369 & 3780.75 & 61.4878 \tabularnewline
58 & 0.1497 & -0.0481 & 0.004 & 808201 & 67350.0833 & 259.5189 \tabularnewline
59 & 0.1369 & 0.0047 & 4e-04 & 9216 & 768 & 27.7128 \tabularnewline
60 & 0.1129 & -0.0911 & 0.0076 & 5098564 & 424880.3333 & 651.8285 \tabularnewline
61 & 0.1412 & -0.2141 & 0.0178 & 17994564 & 1499547 & 1224.5599 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35459&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.2986[/C][C]0.3599[/C][C]0.03[/C][C]11363641[/C][C]946970.0833[/C][C]973.1239[/C][/ROW]
[ROW][C]51[/C][C]0.0899[/C][C]0.0142[/C][C]0.0012[/C][C]195364[/C][C]16280.3333[/C][C]127.5944[/C][/ROW]
[ROW][C]52[/C][C]0.1053[/C][C]0.1341[/C][C]0.0112[/C][C]12673600[/C][C]1056133.3333[/C][C]1027.6835[/C][/ROW]
[ROW][C]53[/C][C]0.0913[/C][C]-0.0206[/C][C]0.0017[/C][C]399424[/C][C]33285.3333[/C][C]182.4427[/C][/ROW]
[ROW][C]54[/C][C]0.1082[/C][C]0.2349[/C][C]0.0196[/C][C]36905625[/C][C]3075468.75[/C][C]1753.7014[/C][/ROW]
[ROW][C]55[/C][C]0.1114[/C][C]0.0289[/C][C]0.0024[/C][C]527076[/C][C]43923[/C][C]209.5781[/C][/ROW]
[ROW][C]56[/C][C]0.1085[/C][C]0.041[/C][C]0.0034[/C][C]1117249[/C][C]93104.0833[/C][C]305.1296[/C][/ROW]
[ROW][C]57[/C][C]0.137[/C][C]-0.0104[/C][C]9e-04[/C][C]45369[/C][C]3780.75[/C][C]61.4878[/C][/ROW]
[ROW][C]58[/C][C]0.1497[/C][C]-0.0481[/C][C]0.004[/C][C]808201[/C][C]67350.0833[/C][C]259.5189[/C][/ROW]
[ROW][C]59[/C][C]0.1369[/C][C]0.0047[/C][C]4e-04[/C][C]9216[/C][C]768[/C][C]27.7128[/C][/ROW]
[ROW][C]60[/C][C]0.1129[/C][C]-0.0911[/C][C]0.0076[/C][C]5098564[/C][C]424880.3333[/C][C]651.8285[/C][/ROW]
[ROW][C]61[/C][C]0.1412[/C][C]-0.2141[/C][C]0.0178[/C][C]17994564[/C][C]1499547[/C][C]1224.5599[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35459&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35459&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.29860.35990.0311363641946970.0833973.1239
510.08990.01420.001219536416280.3333127.5944
520.10530.13410.0112126736001056133.33331027.6835
530.0913-0.02060.001739942433285.3333182.4427
540.10820.23490.0196369056253075468.751753.7014
550.11140.02890.002452707643923209.5781
560.10850.0410.0034111724993104.0833305.1296
570.137-0.01049e-04453693780.7561.4878
580.1497-0.04810.00480820167350.0833259.5189
590.13690.00474e-04921676827.7128
600.1129-0.09110.00765098564424880.3333651.8285
610.1412-0.21410.01781799456414995471224.5599



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