Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 18 Dec 2007 02:59:22 -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/18/t1197971065ipnswmwjpl7fn06.htm/, Retrieved Sat, 04 May 2024 14:43:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4472, Retrieved Sat, 04 May 2024 14:43:31 +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] [] [2007-12-18 09:59:22] [6552dbdb87730106b738e8affc0d90fa] [Current]
- RMPD    [ARIMA Backward Selection] [Arima: Bel 20] [2008-12-14 20:05:06] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
Feedback Forum

Post a new message
Dataseries X:
0.96
1
1.05
1.03
1.07
1.12
1.1
1.06
1.11
1.08
1.07
1.02
1
1.04
1.02
1.07
1.12
1.08
1.02
1.01
1.04
0.98
0.95
0.94
0.94
0.96
0.97
1.03
1.01
0.99
1
1
1.02
1.01
0.99
0.98
1.01
1.03
1.03
1
0.96
0.97
0.98
1.02
1.04
1.01
1.01
1
1.01
1.02
1.03
1.06
1.12
1.12
1.13
1.13
1.13
1.17
1.14
1.08
1.07
1.12
1.14
1.21
1.2
1.23
1.29
1.31
1.37
1.35
1.26
1.26




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4472&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 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[60])
481-------
491.01-------
501.02-------
511.03-------
521.06-------
531.12-------
541.12-------
551.13-------
561.13-------
571.13-------
581.17-------
591.14-------
601.08-------
611.071.07351.01421.13270.45440.41440.98210.4144
621.121.07770.98371.17160.18860.56360.88550.4806
631.141.0750.96121.18870.13120.21890.78070.4654
641.211.07670.94321.21020.02510.17630.59690.4807
651.21.07560.92661.22450.05080.03850.27950.4768
661.231.07630.91241.24020.03310.06960.30070.4824
671.291.07580.89871.25290.00890.0440.27440.4816
681.311.07610.88651.26580.00780.01360.28890.4841
691.371.07590.87471.27720.00210.01130.29930.4843
701.351.07610.86371.28840.00570.00330.1930.4855
711.261.0760.85321.29880.05280.0080.28670.4859
721.261.0760.84321.30890.06080.06080.48670.4867

\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 & 1 & - & - & - & - & - & - & - \tabularnewline
49 & 1.01 & - & - & - & - & - & - & - \tabularnewline
50 & 1.02 & - & - & - & - & - & - & - \tabularnewline
51 & 1.03 & - & - & - & - & - & - & - \tabularnewline
52 & 1.06 & - & - & - & - & - & - & - \tabularnewline
53 & 1.12 & - & - & - & - & - & - & - \tabularnewline
54 & 1.12 & - & - & - & - & - & - & - \tabularnewline
55 & 1.13 & - & - & - & - & - & - & - \tabularnewline
56 & 1.13 & - & - & - & - & - & - & - \tabularnewline
57 & 1.13 & - & - & - & - & - & - & - \tabularnewline
58 & 1.17 & - & - & - & - & - & - & - \tabularnewline
59 & 1.14 & - & - & - & - & - & - & - \tabularnewline
60 & 1.08 & - & - & - & - & - & - & - \tabularnewline
61 & 1.07 & 1.0735 & 1.0142 & 1.1327 & 0.4544 & 0.4144 & 0.9821 & 0.4144 \tabularnewline
62 & 1.12 & 1.0777 & 0.9837 & 1.1716 & 0.1886 & 0.5636 & 0.8855 & 0.4806 \tabularnewline
63 & 1.14 & 1.075 & 0.9612 & 1.1887 & 0.1312 & 0.2189 & 0.7807 & 0.4654 \tabularnewline
64 & 1.21 & 1.0767 & 0.9432 & 1.2102 & 0.0251 & 0.1763 & 0.5969 & 0.4807 \tabularnewline
65 & 1.2 & 1.0756 & 0.9266 & 1.2245 & 0.0508 & 0.0385 & 0.2795 & 0.4768 \tabularnewline
66 & 1.23 & 1.0763 & 0.9124 & 1.2402 & 0.0331 & 0.0696 & 0.3007 & 0.4824 \tabularnewline
67 & 1.29 & 1.0758 & 0.8987 & 1.2529 & 0.0089 & 0.044 & 0.2744 & 0.4816 \tabularnewline
68 & 1.31 & 1.0761 & 0.8865 & 1.2658 & 0.0078 & 0.0136 & 0.2889 & 0.4841 \tabularnewline
69 & 1.37 & 1.0759 & 0.8747 & 1.2772 & 0.0021 & 0.0113 & 0.2993 & 0.4843 \tabularnewline
70 & 1.35 & 1.0761 & 0.8637 & 1.2884 & 0.0057 & 0.0033 & 0.193 & 0.4855 \tabularnewline
71 & 1.26 & 1.076 & 0.8532 & 1.2988 & 0.0528 & 0.008 & 0.2867 & 0.4859 \tabularnewline
72 & 1.26 & 1.076 & 0.8432 & 1.3089 & 0.0608 & 0.0608 & 0.4867 & 0.4867 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4472&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]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]1.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]1.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.07[/C][C]1.0735[/C][C]1.0142[/C][C]1.1327[/C][C]0.4544[/C][C]0.4144[/C][C]0.9821[/C][C]0.4144[/C][/ROW]
[ROW][C]62[/C][C]1.12[/C][C]1.0777[/C][C]0.9837[/C][C]1.1716[/C][C]0.1886[/C][C]0.5636[/C][C]0.8855[/C][C]0.4806[/C][/ROW]
[ROW][C]63[/C][C]1.14[/C][C]1.075[/C][C]0.9612[/C][C]1.1887[/C][C]0.1312[/C][C]0.2189[/C][C]0.7807[/C][C]0.4654[/C][/ROW]
[ROW][C]64[/C][C]1.21[/C][C]1.0767[/C][C]0.9432[/C][C]1.2102[/C][C]0.0251[/C][C]0.1763[/C][C]0.5969[/C][C]0.4807[/C][/ROW]
[ROW][C]65[/C][C]1.2[/C][C]1.0756[/C][C]0.9266[/C][C]1.2245[/C][C]0.0508[/C][C]0.0385[/C][C]0.2795[/C][C]0.4768[/C][/ROW]
[ROW][C]66[/C][C]1.23[/C][C]1.0763[/C][C]0.9124[/C][C]1.2402[/C][C]0.0331[/C][C]0.0696[/C][C]0.3007[/C][C]0.4824[/C][/ROW]
[ROW][C]67[/C][C]1.29[/C][C]1.0758[/C][C]0.8987[/C][C]1.2529[/C][C]0.0089[/C][C]0.044[/C][C]0.2744[/C][C]0.4816[/C][/ROW]
[ROW][C]68[/C][C]1.31[/C][C]1.0761[/C][C]0.8865[/C][C]1.2658[/C][C]0.0078[/C][C]0.0136[/C][C]0.2889[/C][C]0.4841[/C][/ROW]
[ROW][C]69[/C][C]1.37[/C][C]1.0759[/C][C]0.8747[/C][C]1.2772[/C][C]0.0021[/C][C]0.0113[/C][C]0.2993[/C][C]0.4843[/C][/ROW]
[ROW][C]70[/C][C]1.35[/C][C]1.0761[/C][C]0.8637[/C][C]1.2884[/C][C]0.0057[/C][C]0.0033[/C][C]0.193[/C][C]0.4855[/C][/ROW]
[ROW][C]71[/C][C]1.26[/C][C]1.076[/C][C]0.8532[/C][C]1.2988[/C][C]0.0528[/C][C]0.008[/C][C]0.2867[/C][C]0.4859[/C][/ROW]
[ROW][C]72[/C][C]1.26[/C][C]1.076[/C][C]0.8432[/C][C]1.3089[/C][C]0.0608[/C][C]0.0608[/C][C]0.4867[/C][C]0.4867[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4472&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4472&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])
481-------
491.01-------
501.02-------
511.03-------
521.06-------
531.12-------
541.12-------
551.13-------
561.13-------
571.13-------
581.17-------
591.14-------
601.08-------
611.071.07351.01421.13270.45440.41440.98210.4144
621.121.07770.98371.17160.18860.56360.88550.4806
631.141.0750.96121.18870.13120.21890.78070.4654
641.211.07670.94321.21020.02510.17630.59690.4807
651.21.07560.92661.22450.05080.03850.27950.4768
661.231.07630.91241.24020.03310.06960.30070.4824
671.291.07580.89871.25290.00890.0440.27440.4816
681.311.07610.88651.26580.00780.01360.28890.4841
691.371.07590.87471.27720.00210.01130.29930.4843
701.351.07610.86371.28840.00570.00330.1930.4855
711.261.0760.85321.29880.05280.0080.28670.4859
721.261.0760.84321.30890.06080.06080.48670.4867







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0282-0.00323e-04000.001
620.04450.03930.00330.00181e-040.0122
630.0540.06050.0050.00424e-040.0188
640.06320.12380.01030.01780.00150.0385
650.07070.11570.00960.01550.00130.0359
660.07770.14280.01190.02360.0020.0444
670.0840.19910.01660.04590.00380.0618
680.08990.21730.01810.05470.00460.0675
690.09540.27330.02280.08650.00720.0849
700.10070.25460.02120.0750.00630.0791
710.10570.1710.01430.03390.00280.0531
720.11040.1710.01420.03380.00280.0531

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0282 & -0.0032 & 3e-04 & 0 & 0 & 0.001 \tabularnewline
62 & 0.0445 & 0.0393 & 0.0033 & 0.0018 & 1e-04 & 0.0122 \tabularnewline
63 & 0.054 & 0.0605 & 0.005 & 0.0042 & 4e-04 & 0.0188 \tabularnewline
64 & 0.0632 & 0.1238 & 0.0103 & 0.0178 & 0.0015 & 0.0385 \tabularnewline
65 & 0.0707 & 0.1157 & 0.0096 & 0.0155 & 0.0013 & 0.0359 \tabularnewline
66 & 0.0777 & 0.1428 & 0.0119 & 0.0236 & 0.002 & 0.0444 \tabularnewline
67 & 0.084 & 0.1991 & 0.0166 & 0.0459 & 0.0038 & 0.0618 \tabularnewline
68 & 0.0899 & 0.2173 & 0.0181 & 0.0547 & 0.0046 & 0.0675 \tabularnewline
69 & 0.0954 & 0.2733 & 0.0228 & 0.0865 & 0.0072 & 0.0849 \tabularnewline
70 & 0.1007 & 0.2546 & 0.0212 & 0.075 & 0.0063 & 0.0791 \tabularnewline
71 & 0.1057 & 0.171 & 0.0143 & 0.0339 & 0.0028 & 0.0531 \tabularnewline
72 & 0.1104 & 0.171 & 0.0142 & 0.0338 & 0.0028 & 0.0531 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4472&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.0282[/C][C]-0.0032[/C][C]3e-04[/C][C]0[/C][C]0[/C][C]0.001[/C][/ROW]
[ROW][C]62[/C][C]0.0445[/C][C]0.0393[/C][C]0.0033[/C][C]0.0018[/C][C]1e-04[/C][C]0.0122[/C][/ROW]
[ROW][C]63[/C][C]0.054[/C][C]0.0605[/C][C]0.005[/C][C]0.0042[/C][C]4e-04[/C][C]0.0188[/C][/ROW]
[ROW][C]64[/C][C]0.0632[/C][C]0.1238[/C][C]0.0103[/C][C]0.0178[/C][C]0.0015[/C][C]0.0385[/C][/ROW]
[ROW][C]65[/C][C]0.0707[/C][C]0.1157[/C][C]0.0096[/C][C]0.0155[/C][C]0.0013[/C][C]0.0359[/C][/ROW]
[ROW][C]66[/C][C]0.0777[/C][C]0.1428[/C][C]0.0119[/C][C]0.0236[/C][C]0.002[/C][C]0.0444[/C][/ROW]
[ROW][C]67[/C][C]0.084[/C][C]0.1991[/C][C]0.0166[/C][C]0.0459[/C][C]0.0038[/C][C]0.0618[/C][/ROW]
[ROW][C]68[/C][C]0.0899[/C][C]0.2173[/C][C]0.0181[/C][C]0.0547[/C][C]0.0046[/C][C]0.0675[/C][/ROW]
[ROW][C]69[/C][C]0.0954[/C][C]0.2733[/C][C]0.0228[/C][C]0.0865[/C][C]0.0072[/C][C]0.0849[/C][/ROW]
[ROW][C]70[/C][C]0.1007[/C][C]0.2546[/C][C]0.0212[/C][C]0.075[/C][C]0.0063[/C][C]0.0791[/C][/ROW]
[ROW][C]71[/C][C]0.1057[/C][C]0.171[/C][C]0.0143[/C][C]0.0339[/C][C]0.0028[/C][C]0.0531[/C][/ROW]
[ROW][C]72[/C][C]0.1104[/C][C]0.171[/C][C]0.0142[/C][C]0.0338[/C][C]0.0028[/C][C]0.0531[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4472&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4472&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.0282-0.00323e-04000.001
620.04450.03930.00330.00181e-040.0122
630.0540.06050.0050.00424e-040.0188
640.06320.12380.01030.01780.00150.0385
650.07070.11570.00960.01550.00130.0359
660.07770.14280.01190.02360.0020.0444
670.0840.19910.01660.04590.00380.0618
680.08990.21730.01810.05470.00460.0675
690.09540.27330.02280.08650.00720.0849
700.10070.25460.02120.0750.00630.0791
710.10570.1710.01430.03390.00280.0531
720.11040.1710.01420.03380.00280.0531



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