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 computationMon, 14 Dec 2009 12:02:57 -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/14/t1260817471j5sgifhropvdcrm.htm/, Retrieved Sun, 05 May 2024 20:16:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67623, Retrieved Sun, 05 May 2024 20:16:16 +0000
QR Codes:

Original text written by user:Uitleg in Word document
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact154
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [estimation of ARM...] [2007-12-06 10:08:23] [dc28704e2f48edede7e5c93fa6811a5e]
- RMPD    [ARIMA Forecasting] [Forecasting beste...] [2009-12-14 19:02:57] [8eb8270f5a1cfdf0409dcfcbf10be18b] [Current]
-   PD      [ARIMA Forecasting] [] [2010-12-14 19:44:34] [1ec36cc0fd92fd0f07d0b885ce2c369b]
- R PD        [ARIMA Forecasting] [] [2010-12-16 20:55:17] [82643889efeee0b265cd2ff213e5137b]
- RMPD      [(Partial) Autocorrelation Function] [] [2010-12-29 13:10:17] [adca540665f1dd1a5a4406fd7f55bdf4]
Feedback Forum

Post a new message
Dataseries X:
96.96
93.11
95.62
98.30
96.38
100.82
99.06
94.03
102.07
99.31
98.64
101.82
99.14
97.63
100.06
101.32
101.49
105.43
105.09
99.48
108.53
104.34
106.10
107.35
103.00
104.50
105.17
104.84
106.18
108.86
107.77
102.74
112.63
106.26
108.86
111.38
106.85
107.86
107.94
111.38
111.29
113.72
111.88
109.87
113.72
111.71
114.81
112.05
111.54
110.87
110.87
115.48
111.63
116.24
113.56
106.01
110.45
107.77
108.61
108.19




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=67623&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=67623&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67623&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[48])
36111.38-------
37106.85-------
38107.86-------
39107.94-------
40111.38-------
41111.29-------
42113.72-------
43111.88-------
44109.87-------
45113.72-------
46111.71-------
47114.81-------
48112.05-------
49111.54112.3663109.5743115.15830.28090.58790.99990.5879
50110.87112.1559109.36114.95180.18370.66710.99870.5296
51110.87110.0181107.0665112.96970.28580.28580.91620.0886
52115.48116.5051112.899120.11120.28870.99890.99730.9923
53111.63114.8952111.2632118.52730.0390.37620.97410.9377
54116.24116.6984112.8337120.5630.40810.99490.93450.9908
55113.56116.5417112.3576120.72580.08120.55620.98550.9823
56106.01113.2775109.0328117.52224e-040.44810.94220.7146
57110.45117.1998112.7246121.67510.001610.93630.9879
58107.77115.9931111.3204120.66573e-040.990.96380.9509
59108.61118.2353113.4709122.9997010.92060.9945
60108.19115.7704110.8044120.73630.00140.99760.9290.929

\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 & 111.38 & - & - & - & - & - & - & - \tabularnewline
37 & 106.85 & - & - & - & - & - & - & - \tabularnewline
38 & 107.86 & - & - & - & - & - & - & - \tabularnewline
39 & 107.94 & - & - & - & - & - & - & - \tabularnewline
40 & 111.38 & - & - & - & - & - & - & - \tabularnewline
41 & 111.29 & - & - & - & - & - & - & - \tabularnewline
42 & 113.72 & - & - & - & - & - & - & - \tabularnewline
43 & 111.88 & - & - & - & - & - & - & - \tabularnewline
44 & 109.87 & - & - & - & - & - & - & - \tabularnewline
45 & 113.72 & - & - & - & - & - & - & - \tabularnewline
46 & 111.71 & - & - & - & - & - & - & - \tabularnewline
47 & 114.81 & - & - & - & - & - & - & - \tabularnewline
48 & 112.05 & - & - & - & - & - & - & - \tabularnewline
49 & 111.54 & 112.3663 & 109.5743 & 115.1583 & 0.2809 & 0.5879 & 0.9999 & 0.5879 \tabularnewline
50 & 110.87 & 112.1559 & 109.36 & 114.9518 & 0.1837 & 0.6671 & 0.9987 & 0.5296 \tabularnewline
51 & 110.87 & 110.0181 & 107.0665 & 112.9697 & 0.2858 & 0.2858 & 0.9162 & 0.0886 \tabularnewline
52 & 115.48 & 116.5051 & 112.899 & 120.1112 & 0.2887 & 0.9989 & 0.9973 & 0.9923 \tabularnewline
53 & 111.63 & 114.8952 & 111.2632 & 118.5273 & 0.039 & 0.3762 & 0.9741 & 0.9377 \tabularnewline
54 & 116.24 & 116.6984 & 112.8337 & 120.563 & 0.4081 & 0.9949 & 0.9345 & 0.9908 \tabularnewline
55 & 113.56 & 116.5417 & 112.3576 & 120.7258 & 0.0812 & 0.5562 & 0.9855 & 0.9823 \tabularnewline
56 & 106.01 & 113.2775 & 109.0328 & 117.5222 & 4e-04 & 0.4481 & 0.9422 & 0.7146 \tabularnewline
57 & 110.45 & 117.1998 & 112.7246 & 121.6751 & 0.0016 & 1 & 0.9363 & 0.9879 \tabularnewline
58 & 107.77 & 115.9931 & 111.3204 & 120.6657 & 3e-04 & 0.99 & 0.9638 & 0.9509 \tabularnewline
59 & 108.61 & 118.2353 & 113.4709 & 122.9997 & 0 & 1 & 0.9206 & 0.9945 \tabularnewline
60 & 108.19 & 115.7704 & 110.8044 & 120.7363 & 0.0014 & 0.9976 & 0.929 & 0.929 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67623&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]111.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]106.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]107.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]107.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]111.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]111.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]113.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]111.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]109.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]113.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]111.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]114.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]112.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]111.54[/C][C]112.3663[/C][C]109.5743[/C][C]115.1583[/C][C]0.2809[/C][C]0.5879[/C][C]0.9999[/C][C]0.5879[/C][/ROW]
[ROW][C]50[/C][C]110.87[/C][C]112.1559[/C][C]109.36[/C][C]114.9518[/C][C]0.1837[/C][C]0.6671[/C][C]0.9987[/C][C]0.5296[/C][/ROW]
[ROW][C]51[/C][C]110.87[/C][C]110.0181[/C][C]107.0665[/C][C]112.9697[/C][C]0.2858[/C][C]0.2858[/C][C]0.9162[/C][C]0.0886[/C][/ROW]
[ROW][C]52[/C][C]115.48[/C][C]116.5051[/C][C]112.899[/C][C]120.1112[/C][C]0.2887[/C][C]0.9989[/C][C]0.9973[/C][C]0.9923[/C][/ROW]
[ROW][C]53[/C][C]111.63[/C][C]114.8952[/C][C]111.2632[/C][C]118.5273[/C][C]0.039[/C][C]0.3762[/C][C]0.9741[/C][C]0.9377[/C][/ROW]
[ROW][C]54[/C][C]116.24[/C][C]116.6984[/C][C]112.8337[/C][C]120.563[/C][C]0.4081[/C][C]0.9949[/C][C]0.9345[/C][C]0.9908[/C][/ROW]
[ROW][C]55[/C][C]113.56[/C][C]116.5417[/C][C]112.3576[/C][C]120.7258[/C][C]0.0812[/C][C]0.5562[/C][C]0.9855[/C][C]0.9823[/C][/ROW]
[ROW][C]56[/C][C]106.01[/C][C]113.2775[/C][C]109.0328[/C][C]117.5222[/C][C]4e-04[/C][C]0.4481[/C][C]0.9422[/C][C]0.7146[/C][/ROW]
[ROW][C]57[/C][C]110.45[/C][C]117.1998[/C][C]112.7246[/C][C]121.6751[/C][C]0.0016[/C][C]1[/C][C]0.9363[/C][C]0.9879[/C][/ROW]
[ROW][C]58[/C][C]107.77[/C][C]115.9931[/C][C]111.3204[/C][C]120.6657[/C][C]3e-04[/C][C]0.99[/C][C]0.9638[/C][C]0.9509[/C][/ROW]
[ROW][C]59[/C][C]108.61[/C][C]118.2353[/C][C]113.4709[/C][C]122.9997[/C][C]0[/C][C]1[/C][C]0.9206[/C][C]0.9945[/C][/ROW]
[ROW][C]60[/C][C]108.19[/C][C]115.7704[/C][C]110.8044[/C][C]120.7363[/C][C]0.0014[/C][C]0.9976[/C][C]0.929[/C][C]0.929[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67623&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67623&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])
36111.38-------
37106.85-------
38107.86-------
39107.94-------
40111.38-------
41111.29-------
42113.72-------
43111.88-------
44109.87-------
45113.72-------
46111.71-------
47114.81-------
48112.05-------
49111.54112.3663109.5743115.15830.28090.58790.99990.5879
50110.87112.1559109.36114.95180.18370.66710.99870.5296
51110.87110.0181107.0665112.96970.28580.28580.91620.0886
52115.48116.5051112.899120.11120.28870.99890.99730.9923
53111.63114.8952111.2632118.52730.0390.37620.97410.9377
54116.24116.6984112.8337120.5630.40810.99490.93450.9908
55113.56116.5417112.3576120.72580.08120.55620.98550.9823
56106.01113.2775109.0328117.52224e-040.44810.94220.7146
57110.45117.1998112.7246121.67510.001610.93630.9879
58107.77115.9931111.3204120.66573e-040.990.96380.9509
59108.61118.2353113.4709122.9997010.92060.9945
60108.19115.7704110.8044120.73630.00140.99760.9290.929







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0127-0.00746e-040.68280.05690.2385
500.0127-0.01150.0011.65360.13780.3712
510.01370.00776e-040.72580.06050.2459
520.0158-0.00887e-041.05080.08760.2959
530.0161-0.02840.002410.66180.88850.9426
540.0169-0.00393e-040.21010.01750.1323
550.0183-0.02560.00218.89050.74090.8607
560.0191-0.06420.005352.81624.40142.0979
570.0195-0.05760.004845.56033.79671.9485
580.0206-0.07090.005967.61875.63492.3738
590.0206-0.08140.006892.64637.72052.7786
600.0219-0.06550.005557.46184.78852.1883

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0127 & -0.0074 & 6e-04 & 0.6828 & 0.0569 & 0.2385 \tabularnewline
50 & 0.0127 & -0.0115 & 0.001 & 1.6536 & 0.1378 & 0.3712 \tabularnewline
51 & 0.0137 & 0.0077 & 6e-04 & 0.7258 & 0.0605 & 0.2459 \tabularnewline
52 & 0.0158 & -0.0088 & 7e-04 & 1.0508 & 0.0876 & 0.2959 \tabularnewline
53 & 0.0161 & -0.0284 & 0.0024 & 10.6618 & 0.8885 & 0.9426 \tabularnewline
54 & 0.0169 & -0.0039 & 3e-04 & 0.2101 & 0.0175 & 0.1323 \tabularnewline
55 & 0.0183 & -0.0256 & 0.0021 & 8.8905 & 0.7409 & 0.8607 \tabularnewline
56 & 0.0191 & -0.0642 & 0.0053 & 52.8162 & 4.4014 & 2.0979 \tabularnewline
57 & 0.0195 & -0.0576 & 0.0048 & 45.5603 & 3.7967 & 1.9485 \tabularnewline
58 & 0.0206 & -0.0709 & 0.0059 & 67.6187 & 5.6349 & 2.3738 \tabularnewline
59 & 0.0206 & -0.0814 & 0.0068 & 92.6463 & 7.7205 & 2.7786 \tabularnewline
60 & 0.0219 & -0.0655 & 0.0055 & 57.4618 & 4.7885 & 2.1883 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67623&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.0127[/C][C]-0.0074[/C][C]6e-04[/C][C]0.6828[/C][C]0.0569[/C][C]0.2385[/C][/ROW]
[ROW][C]50[/C][C]0.0127[/C][C]-0.0115[/C][C]0.001[/C][C]1.6536[/C][C]0.1378[/C][C]0.3712[/C][/ROW]
[ROW][C]51[/C][C]0.0137[/C][C]0.0077[/C][C]6e-04[/C][C]0.7258[/C][C]0.0605[/C][C]0.2459[/C][/ROW]
[ROW][C]52[/C][C]0.0158[/C][C]-0.0088[/C][C]7e-04[/C][C]1.0508[/C][C]0.0876[/C][C]0.2959[/C][/ROW]
[ROW][C]53[/C][C]0.0161[/C][C]-0.0284[/C][C]0.0024[/C][C]10.6618[/C][C]0.8885[/C][C]0.9426[/C][/ROW]
[ROW][C]54[/C][C]0.0169[/C][C]-0.0039[/C][C]3e-04[/C][C]0.2101[/C][C]0.0175[/C][C]0.1323[/C][/ROW]
[ROW][C]55[/C][C]0.0183[/C][C]-0.0256[/C][C]0.0021[/C][C]8.8905[/C][C]0.7409[/C][C]0.8607[/C][/ROW]
[ROW][C]56[/C][C]0.0191[/C][C]-0.0642[/C][C]0.0053[/C][C]52.8162[/C][C]4.4014[/C][C]2.0979[/C][/ROW]
[ROW][C]57[/C][C]0.0195[/C][C]-0.0576[/C][C]0.0048[/C][C]45.5603[/C][C]3.7967[/C][C]1.9485[/C][/ROW]
[ROW][C]58[/C][C]0.0206[/C][C]-0.0709[/C][C]0.0059[/C][C]67.6187[/C][C]5.6349[/C][C]2.3738[/C][/ROW]
[ROW][C]59[/C][C]0.0206[/C][C]-0.0814[/C][C]0.0068[/C][C]92.6463[/C][C]7.7205[/C][C]2.7786[/C][/ROW]
[ROW][C]60[/C][C]0.0219[/C][C]-0.0655[/C][C]0.0055[/C][C]57.4618[/C][C]4.7885[/C][C]2.1883[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67623&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67623&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.0127-0.00746e-040.68280.05690.2385
500.0127-0.01150.0011.65360.13780.3712
510.01370.00776e-040.72580.06050.2459
520.0158-0.00887e-041.05080.08760.2959
530.0161-0.02840.002410.66180.88850.9426
540.0169-0.00393e-040.21010.01750.1323
550.0183-0.02560.00218.89050.74090.8607
560.0191-0.06420.005352.81624.40142.0979
570.0195-0.05760.004845.56033.79671.9485
580.0206-0.07090.005967.61875.63492.3738
590.0206-0.08140.006892.64637.72052.7786
600.0219-0.06550.005557.46184.78852.1883



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