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 computationThu, 16 Dec 2010 10:41:45 +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/16/t1292495987asr6rs6g0ybk2bo.htm/, Retrieved Fri, 03 May 2024 05:14:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110844, Retrieved Fri, 03 May 2024 05:14:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
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] [7c1b7ddc8e9000e55b944088fdfb52dc] [Current]
F   PD          [ARIMA Forecasting] [] [2010-12-16 19:42:36] [58af523ef9b33032fd2497c80088399b]
-   PD            [ARIMA Forecasting] [] [2010-12-18 12:13:53] [58af523ef9b33032fd2497c80088399b]
- R PD            [ARIMA Forecasting] [verbetering FORECAST] [2010-12-24 13:52:30] [2805bc4d0d3810b6cd96238758e5985d]
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'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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110844&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110844&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110844&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'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[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.013339.790240.23640.48840.51160.9990.5116
4640.0140.01339.698440.32760.49250.50750.98370.5075
474040.030939.646640.41520.43740.54250.99180.5425
4839.9140.074439.631840.51690.23330.6290.97280.6122
4939.8640.108439.614940.60180.1620.78460.93350.652
5039.7940.073939.534840.61310.1510.78160.9130.5919
5139.7940.077239.496440.6580.16630.83370.89850.5897
5239.840.060439.441140.67960.20490.80390.88570.5633
5339.6439.956939.301840.6120.17150.68060.72210.4369
5439.5539.994339.305740.6830.1030.84340.49360.4822
5539.3639.964439.244140.68480.050.87030.50480.4507
5639.2839.930539.180140.6810.04460.93190.41780.4178

\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.0133 & 39.7902 & 40.2364 & 0.4884 & 0.5116 & 0.999 & 0.5116 \tabularnewline
46 & 40.01 & 40.013 & 39.6984 & 40.3276 & 0.4925 & 0.5075 & 0.9837 & 0.5075 \tabularnewline
47 & 40 & 40.0309 & 39.6466 & 40.4152 & 0.4374 & 0.5425 & 0.9918 & 0.5425 \tabularnewline
48 & 39.91 & 40.0744 & 39.6318 & 40.5169 & 0.2333 & 0.629 & 0.9728 & 0.6122 \tabularnewline
49 & 39.86 & 40.1084 & 39.6149 & 40.6018 & 0.162 & 0.7846 & 0.9335 & 0.652 \tabularnewline
50 & 39.79 & 40.0739 & 39.5348 & 40.6131 & 0.151 & 0.7816 & 0.913 & 0.5919 \tabularnewline
51 & 39.79 & 40.0772 & 39.4964 & 40.658 & 0.1663 & 0.8337 & 0.8985 & 0.5897 \tabularnewline
52 & 39.8 & 40.0604 & 39.4411 & 40.6796 & 0.2049 & 0.8039 & 0.8857 & 0.5633 \tabularnewline
53 & 39.64 & 39.9569 & 39.3018 & 40.612 & 0.1715 & 0.6806 & 0.7221 & 0.4369 \tabularnewline
54 & 39.55 & 39.9943 & 39.3057 & 40.683 & 0.103 & 0.8434 & 0.4936 & 0.4822 \tabularnewline
55 & 39.36 & 39.9644 & 39.2441 & 40.6848 & 0.05 & 0.8703 & 0.5048 & 0.4507 \tabularnewline
56 & 39.28 & 39.9305 & 39.1801 & 40.681 & 0.0446 & 0.9319 & 0.4178 & 0.4178 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110844&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.0133[/C][C]39.7902[/C][C]40.2364[/C][C]0.4884[/C][C]0.5116[/C][C]0.999[/C][C]0.5116[/C][/ROW]
[ROW][C]46[/C][C]40.01[/C][C]40.013[/C][C]39.6984[/C][C]40.3276[/C][C]0.4925[/C][C]0.5075[/C][C]0.9837[/C][C]0.5075[/C][/ROW]
[ROW][C]47[/C][C]40[/C][C]40.0309[/C][C]39.6466[/C][C]40.4152[/C][C]0.4374[/C][C]0.5425[/C][C]0.9918[/C][C]0.5425[/C][/ROW]
[ROW][C]48[/C][C]39.91[/C][C]40.0744[/C][C]39.6318[/C][C]40.5169[/C][C]0.2333[/C][C]0.629[/C][C]0.9728[/C][C]0.6122[/C][/ROW]
[ROW][C]49[/C][C]39.86[/C][C]40.1084[/C][C]39.6149[/C][C]40.6018[/C][C]0.162[/C][C]0.7846[/C][C]0.9335[/C][C]0.652[/C][/ROW]
[ROW][C]50[/C][C]39.79[/C][C]40.0739[/C][C]39.5348[/C][C]40.6131[/C][C]0.151[/C][C]0.7816[/C][C]0.913[/C][C]0.5919[/C][/ROW]
[ROW][C]51[/C][C]39.79[/C][C]40.0772[/C][C]39.4964[/C][C]40.658[/C][C]0.1663[/C][C]0.8337[/C][C]0.8985[/C][C]0.5897[/C][/ROW]
[ROW][C]52[/C][C]39.8[/C][C]40.0604[/C][C]39.4411[/C][C]40.6796[/C][C]0.2049[/C][C]0.8039[/C][C]0.8857[/C][C]0.5633[/C][/ROW]
[ROW][C]53[/C][C]39.64[/C][C]39.9569[/C][C]39.3018[/C][C]40.612[/C][C]0.1715[/C][C]0.6806[/C][C]0.7221[/C][C]0.4369[/C][/ROW]
[ROW][C]54[/C][C]39.55[/C][C]39.9943[/C][C]39.3057[/C][C]40.683[/C][C]0.103[/C][C]0.8434[/C][C]0.4936[/C][C]0.4822[/C][/ROW]
[ROW][C]55[/C][C]39.36[/C][C]39.9644[/C][C]39.2441[/C][C]40.6848[/C][C]0.05[/C][C]0.8703[/C][C]0.5048[/C][C]0.4507[/C][/ROW]
[ROW][C]56[/C][C]39.28[/C][C]39.9305[/C][C]39.1801[/C][C]40.681[/C][C]0.0446[/C][C]0.9319[/C][C]0.4178[/C][C]0.4178[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110844&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110844&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.013339.790240.23640.48840.51160.9990.5116
4640.0140.01339.698440.32760.49250.50750.98370.5075
474040.030939.646640.41520.43740.54250.99180.5425
4839.9140.074439.631840.51690.23330.6290.97280.6122
4939.8640.108439.614940.60180.1620.78460.93350.652
5039.7940.073939.534840.61310.1510.78160.9130.5919
5139.7940.077239.496440.6580.16630.83370.89850.5897
5239.840.060439.441140.67960.20490.80390.88570.5633
5339.6439.956939.301840.6120.17150.68060.72210.4369
5439.5539.994339.305740.6830.1030.84340.49360.4822
5539.3639.964439.244140.68480.050.87030.50480.4507
5639.2839.930539.180140.6810.04460.93190.41780.4178







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.0028-1e-040000
460.004-1e-041e-04000.0032
470.0049-8e-043e-040.0013e-040.018
480.0056-0.00410.00130.0270.0070.0837
490.0063-0.00620.00220.06170.01790.1339
500.0069-0.00710.00310.08060.02840.1685
510.0074-0.00720.00360.08250.03610.19
520.0079-0.00650.0040.06780.04010.2002
530.0084-0.00790.00440.10040.04680.2163
540.0088-0.01110.00510.19740.06180.2487
550.0092-0.01510.0060.36530.08940.299
560.0096-0.01630.00690.42320.11720.3424

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.0028 & -1e-04 & 0 & 0 & 0 & 0 \tabularnewline
46 & 0.004 & -1e-04 & 1e-04 & 0 & 0 & 0.0032 \tabularnewline
47 & 0.0049 & -8e-04 & 3e-04 & 0.001 & 3e-04 & 0.018 \tabularnewline
48 & 0.0056 & -0.0041 & 0.0013 & 0.027 & 0.007 & 0.0837 \tabularnewline
49 & 0.0063 & -0.0062 & 0.0022 & 0.0617 & 0.0179 & 0.1339 \tabularnewline
50 & 0.0069 & -0.0071 & 0.0031 & 0.0806 & 0.0284 & 0.1685 \tabularnewline
51 & 0.0074 & -0.0072 & 0.0036 & 0.0825 & 0.0361 & 0.19 \tabularnewline
52 & 0.0079 & -0.0065 & 0.004 & 0.0678 & 0.0401 & 0.2002 \tabularnewline
53 & 0.0084 & -0.0079 & 0.0044 & 0.1004 & 0.0468 & 0.2163 \tabularnewline
54 & 0.0088 & -0.0111 & 0.0051 & 0.1974 & 0.0618 & 0.2487 \tabularnewline
55 & 0.0092 & -0.0151 & 0.006 & 0.3653 & 0.0894 & 0.299 \tabularnewline
56 & 0.0096 & -0.0163 & 0.0069 & 0.4232 & 0.1172 & 0.3424 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110844&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]-1e-04[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.004[/C][C]-1e-04[/C][C]1e-04[/C][C]0[/C][C]0[/C][C]0.0032[/C][/ROW]
[ROW][C]47[/C][C]0.0049[/C][C]-8e-04[/C][C]3e-04[/C][C]0.001[/C][C]3e-04[/C][C]0.018[/C][/ROW]
[ROW][C]48[/C][C]0.0056[/C][C]-0.0041[/C][C]0.0013[/C][C]0.027[/C][C]0.007[/C][C]0.0837[/C][/ROW]
[ROW][C]49[/C][C]0.0063[/C][C]-0.0062[/C][C]0.0022[/C][C]0.0617[/C][C]0.0179[/C][C]0.1339[/C][/ROW]
[ROW][C]50[/C][C]0.0069[/C][C]-0.0071[/C][C]0.0031[/C][C]0.0806[/C][C]0.0284[/C][C]0.1685[/C][/ROW]
[ROW][C]51[/C][C]0.0074[/C][C]-0.0072[/C][C]0.0036[/C][C]0.0825[/C][C]0.0361[/C][C]0.19[/C][/ROW]
[ROW][C]52[/C][C]0.0079[/C][C]-0.0065[/C][C]0.004[/C][C]0.0678[/C][C]0.0401[/C][C]0.2002[/C][/ROW]
[ROW][C]53[/C][C]0.0084[/C][C]-0.0079[/C][C]0.0044[/C][C]0.1004[/C][C]0.0468[/C][C]0.2163[/C][/ROW]
[ROW][C]54[/C][C]0.0088[/C][C]-0.0111[/C][C]0.0051[/C][C]0.1974[/C][C]0.0618[/C][C]0.2487[/C][/ROW]
[ROW][C]55[/C][C]0.0092[/C][C]-0.0151[/C][C]0.006[/C][C]0.3653[/C][C]0.0894[/C][C]0.299[/C][/ROW]
[ROW][C]56[/C][C]0.0096[/C][C]-0.0163[/C][C]0.0069[/C][C]0.4232[/C][C]0.1172[/C][C]0.3424[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110844&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110844&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-1e-040000
460.004-1e-041e-04000.0032
470.0049-8e-043e-040.0013e-040.018
480.0056-0.00410.00130.0270.0070.0837
490.0063-0.00620.00220.06170.01790.1339
500.0069-0.00710.00310.08060.02840.1685
510.0074-0.00720.00360.08250.03610.19
520.0079-0.00650.0040.06780.04010.2002
530.0084-0.00790.00440.10040.04680.2163
540.0088-0.01110.00510.19740.06180.2487
550.0092-0.01510.0060.36530.08940.299
560.0096-0.01630.00690.42320.11720.3424



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