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, 24 Dec 2010 13:52:30 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/24/t1293198607b4ctaj0jwncr1oc.htm/, Retrieved Tue, 30 Apr 2024 02:08:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114967, Retrieved Tue, 30 Apr 2024 02:08:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact110
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [Spectral Analysis] [spectrum analyse ...] [2010-12-14 18:46:58] [d6e648f00513dd750579ba7880c5fbf5]
- RMP     [ARIMA Forecasting] [arima forecast] [2010-12-14 19:31:52] [d6e648f00513dd750579ba7880c5fbf5]
- R  D      [ARIMA Forecasting] [] [2010-12-16 10:41:45] [58af523ef9b33032fd2497c80088399b]
F   PD        [ARIMA Forecasting] [] [2010-12-16 19:42:36] [58af523ef9b33032fd2497c80088399b]
- R PD            [ARIMA Forecasting] [verbetering FORECAST] [2010-12-24 13:52:30] [aedc5b8e4f26bdca34b1a0cf88d6dfa2] [Current]
Feedback Forum

Post a new message
Dataseries X:
41.85
41.75
41.75
41.75
41.58
41.61
41.42
41.37
41.37
41.33
41.37
41.34
41.33
41.29
41.29
41.27
41.04
40.90
40.89
40.72
40.72
40.58
40.24
40.07
40.12
40.10
40.10
40.08
40.06
39.99
40.05
39.66
39.66
39.67
39.56
39.64
39.73
39.70
39.70
39.68
39.76
40.00
39.96
40.01
40.01
40.01
40.00
39.91
39.86
39.79
39.79
39.80
39.64
39.55
39.36
39.28




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114967&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[44])
3239.66-------
3339.66-------
3439.67-------
3539.56-------
3639.64-------
3739.73-------
3839.7-------
3939.7-------
4039.68-------
4139.76-------
4240-------
4339.96-------
4440.01-------
4540.0140.0839.86340.2970.26360.73640.99990.7364
4640.0140.081139.758140.4040.33310.66690.99370.6669
474040.103239.685440.5210.31420.6690.99460.669
4839.9140.125839.591740.65990.21420.67780.96270.6645
4939.8640.130839.492940.76870.20270.75120.89090.6447
5039.7940.140139.40540.87530.17530.77240.87970.6357
5139.7940.148139.316840.97950.19920.80080.85460.6277
5239.840.151439.230141.07270.22730.7790.84210.6182
5339.6440.155339.148941.16180.15780.75550.77930.6114
5439.5540.158439.070341.24650.13660.82480.61230.6054
5539.3640.160138.994541.32570.08930.84750.63170.5996
5639.2840.161738.922241.40120.08160.89760.59480.5948

\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[44]) \tabularnewline
32 & 39.66 & - & - & - & - & - & - & - \tabularnewline
33 & 39.66 & - & - & - & - & - & - & - \tabularnewline
34 & 39.67 & - & - & - & - & - & - & - \tabularnewline
35 & 39.56 & - & - & - & - & - & - & - \tabularnewline
36 & 39.64 & - & - & - & - & - & - & - \tabularnewline
37 & 39.73 & - & - & - & - & - & - & - \tabularnewline
38 & 39.7 & - & - & - & - & - & - & - \tabularnewline
39 & 39.7 & - & - & - & - & - & - & - \tabularnewline
40 & 39.68 & - & - & - & - & - & - & - \tabularnewline
41 & 39.76 & - & - & - & - & - & - & - \tabularnewline
42 & 40 & - & - & - & - & - & - & - \tabularnewline
43 & 39.96 & - & - & - & - & - & - & - \tabularnewline
44 & 40.01 & - & - & - & - & - & - & - \tabularnewline
45 & 40.01 & 40.08 & 39.863 & 40.297 & 0.2636 & 0.7364 & 0.9999 & 0.7364 \tabularnewline
46 & 40.01 & 40.0811 & 39.7581 & 40.404 & 0.3331 & 0.6669 & 0.9937 & 0.6669 \tabularnewline
47 & 40 & 40.1032 & 39.6854 & 40.521 & 0.3142 & 0.669 & 0.9946 & 0.669 \tabularnewline
48 & 39.91 & 40.1258 & 39.5917 & 40.6599 & 0.2142 & 0.6778 & 0.9627 & 0.6645 \tabularnewline
49 & 39.86 & 40.1308 & 39.4929 & 40.7687 & 0.2027 & 0.7512 & 0.8909 & 0.6447 \tabularnewline
50 & 39.79 & 40.1401 & 39.405 & 40.8753 & 0.1753 & 0.7724 & 0.8797 & 0.6357 \tabularnewline
51 & 39.79 & 40.1481 & 39.3168 & 40.9795 & 0.1992 & 0.8008 & 0.8546 & 0.6277 \tabularnewline
52 & 39.8 & 40.1514 & 39.2301 & 41.0727 & 0.2273 & 0.779 & 0.8421 & 0.6182 \tabularnewline
53 & 39.64 & 40.1553 & 39.1489 & 41.1618 & 0.1578 & 0.7555 & 0.7793 & 0.6114 \tabularnewline
54 & 39.55 & 40.1584 & 39.0703 & 41.2465 & 0.1366 & 0.8248 & 0.6123 & 0.6054 \tabularnewline
55 & 39.36 & 40.1601 & 38.9945 & 41.3257 & 0.0893 & 0.8475 & 0.6317 & 0.5996 \tabularnewline
56 & 39.28 & 40.1617 & 38.9222 & 41.4012 & 0.0816 & 0.8976 & 0.5948 & 0.5948 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114967&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[44])[/C][/ROW]
[ROW][C]32[/C][C]39.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]39.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]39.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]39.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]39.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]39.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]39.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]39.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]39.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]39.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]40[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]39.96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]40.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]40.01[/C][C]40.08[/C][C]39.863[/C][C]40.297[/C][C]0.2636[/C][C]0.7364[/C][C]0.9999[/C][C]0.7364[/C][/ROW]
[ROW][C]46[/C][C]40.01[/C][C]40.0811[/C][C]39.7581[/C][C]40.404[/C][C]0.3331[/C][C]0.6669[/C][C]0.9937[/C][C]0.6669[/C][/ROW]
[ROW][C]47[/C][C]40[/C][C]40.1032[/C][C]39.6854[/C][C]40.521[/C][C]0.3142[/C][C]0.669[/C][C]0.9946[/C][C]0.669[/C][/ROW]
[ROW][C]48[/C][C]39.91[/C][C]40.1258[/C][C]39.5917[/C][C]40.6599[/C][C]0.2142[/C][C]0.6778[/C][C]0.9627[/C][C]0.6645[/C][/ROW]
[ROW][C]49[/C][C]39.86[/C][C]40.1308[/C][C]39.4929[/C][C]40.7687[/C][C]0.2027[/C][C]0.7512[/C][C]0.8909[/C][C]0.6447[/C][/ROW]
[ROW][C]50[/C][C]39.79[/C][C]40.1401[/C][C]39.405[/C][C]40.8753[/C][C]0.1753[/C][C]0.7724[/C][C]0.8797[/C][C]0.6357[/C][/ROW]
[ROW][C]51[/C][C]39.79[/C][C]40.1481[/C][C]39.3168[/C][C]40.9795[/C][C]0.1992[/C][C]0.8008[/C][C]0.8546[/C][C]0.6277[/C][/ROW]
[ROW][C]52[/C][C]39.8[/C][C]40.1514[/C][C]39.2301[/C][C]41.0727[/C][C]0.2273[/C][C]0.779[/C][C]0.8421[/C][C]0.6182[/C][/ROW]
[ROW][C]53[/C][C]39.64[/C][C]40.1553[/C][C]39.1489[/C][C]41.1618[/C][C]0.1578[/C][C]0.7555[/C][C]0.7793[/C][C]0.6114[/C][/ROW]
[ROW][C]54[/C][C]39.55[/C][C]40.1584[/C][C]39.0703[/C][C]41.2465[/C][C]0.1366[/C][C]0.8248[/C][C]0.6123[/C][C]0.6054[/C][/ROW]
[ROW][C]55[/C][C]39.36[/C][C]40.1601[/C][C]38.9945[/C][C]41.3257[/C][C]0.0893[/C][C]0.8475[/C][C]0.6317[/C][C]0.5996[/C][/ROW]
[ROW][C]56[/C][C]39.28[/C][C]40.1617[/C][C]38.9222[/C][C]41.4012[/C][C]0.0816[/C][C]0.8976[/C][C]0.5948[/C][C]0.5948[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114967&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114967&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[44])
3239.66-------
3339.66-------
3439.67-------
3539.56-------
3639.64-------
3739.73-------
3839.7-------
3939.7-------
4039.68-------
4139.76-------
4240-------
4339.96-------
4440.01-------
4540.0140.0839.86340.2970.26360.73640.99990.7364
4640.0140.081139.758140.4040.33310.66690.99370.6669
474040.103239.685440.5210.31420.6690.99460.669
4839.9140.125839.591740.65990.21420.67780.96270.6645
4939.8640.130839.492940.76870.20270.75120.89090.6447
5039.7940.140139.40540.87530.17530.77240.87970.6357
5139.7940.148139.316840.97950.19920.80080.85460.6277
5239.840.151439.230141.07270.22730.7790.84210.6182
5339.6440.155339.148941.16180.15780.75550.77930.6114
5439.5540.158439.070341.24650.13660.82480.61230.6054
5539.3640.160138.994541.32570.08930.84750.63170.5996
5639.2840.161738.922241.40120.08160.89760.59480.5948







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.0028-0.001700.004900
460.0041-0.00180.00180.00510.0050.0705
470.0053-0.00260.0020.01060.00690.0829
480.0068-0.00540.00290.04660.01680.1296
490.0081-0.00670.00360.07330.02810.1676
500.0093-0.00870.00450.12260.04380.2094
510.0106-0.00890.00510.12830.05590.2364
520.0117-0.00880.00560.12350.06440.2537
530.0128-0.01280.00640.26560.08670.2945
540.0138-0.01520.00730.37020.11510.3392
550.0148-0.01990.00840.64010.16280.4035
560.0157-0.0220.00950.77740.2140.4626

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.0028 & -0.0017 & 0 & 0.0049 & 0 & 0 \tabularnewline
46 & 0.0041 & -0.0018 & 0.0018 & 0.0051 & 0.005 & 0.0705 \tabularnewline
47 & 0.0053 & -0.0026 & 0.002 & 0.0106 & 0.0069 & 0.0829 \tabularnewline
48 & 0.0068 & -0.0054 & 0.0029 & 0.0466 & 0.0168 & 0.1296 \tabularnewline
49 & 0.0081 & -0.0067 & 0.0036 & 0.0733 & 0.0281 & 0.1676 \tabularnewline
50 & 0.0093 & -0.0087 & 0.0045 & 0.1226 & 0.0438 & 0.2094 \tabularnewline
51 & 0.0106 & -0.0089 & 0.0051 & 0.1283 & 0.0559 & 0.2364 \tabularnewline
52 & 0.0117 & -0.0088 & 0.0056 & 0.1235 & 0.0644 & 0.2537 \tabularnewline
53 & 0.0128 & -0.0128 & 0.0064 & 0.2656 & 0.0867 & 0.2945 \tabularnewline
54 & 0.0138 & -0.0152 & 0.0073 & 0.3702 & 0.1151 & 0.3392 \tabularnewline
55 & 0.0148 & -0.0199 & 0.0084 & 0.6401 & 0.1628 & 0.4035 \tabularnewline
56 & 0.0157 & -0.022 & 0.0095 & 0.7774 & 0.214 & 0.4626 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114967&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]45[/C][C]0.0028[/C][C]-0.0017[/C][C]0[/C][C]0.0049[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.0041[/C][C]-0.0018[/C][C]0.0018[/C][C]0.0051[/C][C]0.005[/C][C]0.0705[/C][/ROW]
[ROW][C]47[/C][C]0.0053[/C][C]-0.0026[/C][C]0.002[/C][C]0.0106[/C][C]0.0069[/C][C]0.0829[/C][/ROW]
[ROW][C]48[/C][C]0.0068[/C][C]-0.0054[/C][C]0.0029[/C][C]0.0466[/C][C]0.0168[/C][C]0.1296[/C][/ROW]
[ROW][C]49[/C][C]0.0081[/C][C]-0.0067[/C][C]0.0036[/C][C]0.0733[/C][C]0.0281[/C][C]0.1676[/C][/ROW]
[ROW][C]50[/C][C]0.0093[/C][C]-0.0087[/C][C]0.0045[/C][C]0.1226[/C][C]0.0438[/C][C]0.2094[/C][/ROW]
[ROW][C]51[/C][C]0.0106[/C][C]-0.0089[/C][C]0.0051[/C][C]0.1283[/C][C]0.0559[/C][C]0.2364[/C][/ROW]
[ROW][C]52[/C][C]0.0117[/C][C]-0.0088[/C][C]0.0056[/C][C]0.1235[/C][C]0.0644[/C][C]0.2537[/C][/ROW]
[ROW][C]53[/C][C]0.0128[/C][C]-0.0128[/C][C]0.0064[/C][C]0.2656[/C][C]0.0867[/C][C]0.2945[/C][/ROW]
[ROW][C]54[/C][C]0.0138[/C][C]-0.0152[/C][C]0.0073[/C][C]0.3702[/C][C]0.1151[/C][C]0.3392[/C][/ROW]
[ROW][C]55[/C][C]0.0148[/C][C]-0.0199[/C][C]0.0084[/C][C]0.6401[/C][C]0.1628[/C][C]0.4035[/C][/ROW]
[ROW][C]56[/C][C]0.0157[/C][C]-0.022[/C][C]0.0095[/C][C]0.7774[/C][C]0.214[/C][C]0.4626[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114967&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114967&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
450.0028-0.001700.004900
460.0041-0.00180.00180.00510.0050.0705
470.0053-0.00260.0020.01060.00690.0829
480.0068-0.00540.00290.04660.01680.1296
490.0081-0.00670.00360.07330.02810.1676
500.0093-0.00870.00450.12260.04380.2094
510.0106-0.00890.00510.12830.05590.2364
520.0117-0.00880.00560.12350.06440.2537
530.0128-0.01280.00640.26560.08670.2945
540.0138-0.01520.00730.37020.11510.3392
550.0148-0.01990.00840.64010.16280.4035
560.0157-0.0220.00950.77740.2140.4626



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