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 computationWed, 23 Dec 2009 16:25:41 -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/24/t1261610775wz3k7wrh520lkj5.htm/, Retrieved Mon, 06 May 2024 12:10:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70596, Retrieved Mon, 06 May 2024 12:10:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact150
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-   P       [ARIMA Forecasting] [Paper ARIMA F IGP] [2009-12-14 21:07:10] [134dc66689e3d457a82860db6471d419]
-   P         [ARIMA Forecasting] [Paper ARIMA F IGP 12] [2009-12-15 20:24:19] [134dc66689e3d457a82860db6471d419]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 23:25:41] [ba02bcb7e07025bbb7f8a074d38ad767] [Current]
Feedback Forum

Post a new message
Dataseries X:
14.3
14.2
15.9
15.3
15.5
15.1
15
12.1
15.8
16.9
15.1
13.7
14.8
14.7
16
15.4
15
15.5
15.1
11.7
16.3
16.7
15
14.9
14.6
15.3
17.9
16.4
15.4
17.9
15.9
13.9
17.8
17.9
17.4
16.7
16
16.6
19.1
17.8
17.2
18.6
16.3
15.1
19.2
17.7
19.1
18
17.5
17.8
21.1
17.2
19.4
19.8
17.6
16.2
19.5
19.9
20
17.3
18.9
18.6
21.4
18.6
19.8
20.8
19.6
17.7
19.8
22.2
20.7
17.9




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70596&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]3 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=70596&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70596&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 time3 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])
4818-------
4917.5-------
5017.8-------
5121.1-------
5217.2-------
5319.4-------
5419.8-------
5517.6-------
5616.2-------
5719.5-------
5819.9-------
5920-------
6017.3-------
6118.918.942217.680120.20440.47390.99460.98740.9946
6218.618.514717.251319.77810.44740.2750.86620.9702
6321.420.978919.644422.31330.26810.99980.42941
6418.619.115217.553920.67660.25890.00210.99190.9887
6519.819.299517.736520.86260.26520.80980.44990.9939
6620.820.482618.822322.14290.35390.78980.78980.9999
6719.618.822317.074920.56970.19150.01330.91480.9561
6817.716.660614.918.42110.12365e-040.69590.2383
6919.820.40318.558122.24780.26090.9980.83130.9995
7022.220.749918.859122.64080.06640.83760.81080.9998
7120.720.380518.46422.29710.37190.03140.65140.9992
7217.918.611316.631420.59130.24070.01930.90290.9029

\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 & 18 & - & - & - & - & - & - & - \tabularnewline
49 & 17.5 & - & - & - & - & - & - & - \tabularnewline
50 & 17.8 & - & - & - & - & - & - & - \tabularnewline
51 & 21.1 & - & - & - & - & - & - & - \tabularnewline
52 & 17.2 & - & - & - & - & - & - & - \tabularnewline
53 & 19.4 & - & - & - & - & - & - & - \tabularnewline
54 & 19.8 & - & - & - & - & - & - & - \tabularnewline
55 & 17.6 & - & - & - & - & - & - & - \tabularnewline
56 & 16.2 & - & - & - & - & - & - & - \tabularnewline
57 & 19.5 & - & - & - & - & - & - & - \tabularnewline
58 & 19.9 & - & - & - & - & - & - & - \tabularnewline
59 & 20 & - & - & - & - & - & - & - \tabularnewline
60 & 17.3 & - & - & - & - & - & - & - \tabularnewline
61 & 18.9 & 18.9422 & 17.6801 & 20.2044 & 0.4739 & 0.9946 & 0.9874 & 0.9946 \tabularnewline
62 & 18.6 & 18.5147 & 17.2513 & 19.7781 & 0.4474 & 0.275 & 0.8662 & 0.9702 \tabularnewline
63 & 21.4 & 20.9789 & 19.6444 & 22.3133 & 0.2681 & 0.9998 & 0.4294 & 1 \tabularnewline
64 & 18.6 & 19.1152 & 17.5539 & 20.6766 & 0.2589 & 0.0021 & 0.9919 & 0.9887 \tabularnewline
65 & 19.8 & 19.2995 & 17.7365 & 20.8626 & 0.2652 & 0.8098 & 0.4499 & 0.9939 \tabularnewline
66 & 20.8 & 20.4826 & 18.8223 & 22.1429 & 0.3539 & 0.7898 & 0.7898 & 0.9999 \tabularnewline
67 & 19.6 & 18.8223 & 17.0749 & 20.5697 & 0.1915 & 0.0133 & 0.9148 & 0.9561 \tabularnewline
68 & 17.7 & 16.6606 & 14.9 & 18.4211 & 0.1236 & 5e-04 & 0.6959 & 0.2383 \tabularnewline
69 & 19.8 & 20.403 & 18.5581 & 22.2478 & 0.2609 & 0.998 & 0.8313 & 0.9995 \tabularnewline
70 & 22.2 & 20.7499 & 18.8591 & 22.6408 & 0.0664 & 0.8376 & 0.8108 & 0.9998 \tabularnewline
71 & 20.7 & 20.3805 & 18.464 & 22.2971 & 0.3719 & 0.0314 & 0.6514 & 0.9992 \tabularnewline
72 & 17.9 & 18.6113 & 16.6314 & 20.5913 & 0.2407 & 0.0193 & 0.9029 & 0.9029 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70596&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]18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]17.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]17.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]21.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]17.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]19.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]19.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]17.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]16.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]19.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]19.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]17.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]18.9[/C][C]18.9422[/C][C]17.6801[/C][C]20.2044[/C][C]0.4739[/C][C]0.9946[/C][C]0.9874[/C][C]0.9946[/C][/ROW]
[ROW][C]62[/C][C]18.6[/C][C]18.5147[/C][C]17.2513[/C][C]19.7781[/C][C]0.4474[/C][C]0.275[/C][C]0.8662[/C][C]0.9702[/C][/ROW]
[ROW][C]63[/C][C]21.4[/C][C]20.9789[/C][C]19.6444[/C][C]22.3133[/C][C]0.2681[/C][C]0.9998[/C][C]0.4294[/C][C]1[/C][/ROW]
[ROW][C]64[/C][C]18.6[/C][C]19.1152[/C][C]17.5539[/C][C]20.6766[/C][C]0.2589[/C][C]0.0021[/C][C]0.9919[/C][C]0.9887[/C][/ROW]
[ROW][C]65[/C][C]19.8[/C][C]19.2995[/C][C]17.7365[/C][C]20.8626[/C][C]0.2652[/C][C]0.8098[/C][C]0.4499[/C][C]0.9939[/C][/ROW]
[ROW][C]66[/C][C]20.8[/C][C]20.4826[/C][C]18.8223[/C][C]22.1429[/C][C]0.3539[/C][C]0.7898[/C][C]0.7898[/C][C]0.9999[/C][/ROW]
[ROW][C]67[/C][C]19.6[/C][C]18.8223[/C][C]17.0749[/C][C]20.5697[/C][C]0.1915[/C][C]0.0133[/C][C]0.9148[/C][C]0.9561[/C][/ROW]
[ROW][C]68[/C][C]17.7[/C][C]16.6606[/C][C]14.9[/C][C]18.4211[/C][C]0.1236[/C][C]5e-04[/C][C]0.6959[/C][C]0.2383[/C][/ROW]
[ROW][C]69[/C][C]19.8[/C][C]20.403[/C][C]18.5581[/C][C]22.2478[/C][C]0.2609[/C][C]0.998[/C][C]0.8313[/C][C]0.9995[/C][/ROW]
[ROW][C]70[/C][C]22.2[/C][C]20.7499[/C][C]18.8591[/C][C]22.6408[/C][C]0.0664[/C][C]0.8376[/C][C]0.8108[/C][C]0.9998[/C][/ROW]
[ROW][C]71[/C][C]20.7[/C][C]20.3805[/C][C]18.464[/C][C]22.2971[/C][C]0.3719[/C][C]0.0314[/C][C]0.6514[/C][C]0.9992[/C][/ROW]
[ROW][C]72[/C][C]17.9[/C][C]18.6113[/C][C]16.6314[/C][C]20.5913[/C][C]0.2407[/C][C]0.0193[/C][C]0.9029[/C][C]0.9029[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70596&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70596&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])
4818-------
4917.5-------
5017.8-------
5121.1-------
5217.2-------
5319.4-------
5419.8-------
5517.6-------
5616.2-------
5719.5-------
5819.9-------
5920-------
6017.3-------
6118.918.942217.680120.20440.47390.99460.98740.9946
6218.618.514717.251319.77810.44740.2750.86620.9702
6321.420.978919.644422.31330.26810.99980.42941
6418.619.115217.553920.67660.25890.00210.99190.9887
6519.819.299517.736520.86260.26520.80980.44990.9939
6620.820.482618.822322.14290.35390.78980.78980.9999
6719.618.822317.074920.56970.19150.01330.91480.9561
6817.716.660614.918.42110.12365e-040.69590.2383
6919.820.40318.558122.24780.26090.9980.83130.9995
7022.220.749918.859122.64080.06640.83760.81080.9998
7120.720.380518.46422.29710.37190.03140.65140.9992
7217.918.611316.631420.59130.24070.01930.90290.9029







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.034-0.002200.001800
620.03480.00460.00340.00730.00450.0673
630.03250.02010.0090.17740.06210.2493
640.0417-0.0270.01350.26540.1130.3361
650.04130.02590.0160.25050.14050.3748
660.04140.01550.01590.10080.13380.3658
670.04740.04130.01950.60480.20110.4485
680.05390.06240.02491.08040.3110.5577
690.0461-0.02960.02540.36360.31690.5629
700.04650.06990.02982.10270.49550.7039
710.0480.01570.02860.10210.45970.678
720.0543-0.03820.02940.5060.46360.6808

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.034 & -0.0022 & 0 & 0.0018 & 0 & 0 \tabularnewline
62 & 0.0348 & 0.0046 & 0.0034 & 0.0073 & 0.0045 & 0.0673 \tabularnewline
63 & 0.0325 & 0.0201 & 0.009 & 0.1774 & 0.0621 & 0.2493 \tabularnewline
64 & 0.0417 & -0.027 & 0.0135 & 0.2654 & 0.113 & 0.3361 \tabularnewline
65 & 0.0413 & 0.0259 & 0.016 & 0.2505 & 0.1405 & 0.3748 \tabularnewline
66 & 0.0414 & 0.0155 & 0.0159 & 0.1008 & 0.1338 & 0.3658 \tabularnewline
67 & 0.0474 & 0.0413 & 0.0195 & 0.6048 & 0.2011 & 0.4485 \tabularnewline
68 & 0.0539 & 0.0624 & 0.0249 & 1.0804 & 0.311 & 0.5577 \tabularnewline
69 & 0.0461 & -0.0296 & 0.0254 & 0.3636 & 0.3169 & 0.5629 \tabularnewline
70 & 0.0465 & 0.0699 & 0.0298 & 2.1027 & 0.4955 & 0.7039 \tabularnewline
71 & 0.048 & 0.0157 & 0.0286 & 0.1021 & 0.4597 & 0.678 \tabularnewline
72 & 0.0543 & -0.0382 & 0.0294 & 0.506 & 0.4636 & 0.6808 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70596&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.034[/C][C]-0.0022[/C][C]0[/C][C]0.0018[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0348[/C][C]0.0046[/C][C]0.0034[/C][C]0.0073[/C][C]0.0045[/C][C]0.0673[/C][/ROW]
[ROW][C]63[/C][C]0.0325[/C][C]0.0201[/C][C]0.009[/C][C]0.1774[/C][C]0.0621[/C][C]0.2493[/C][/ROW]
[ROW][C]64[/C][C]0.0417[/C][C]-0.027[/C][C]0.0135[/C][C]0.2654[/C][C]0.113[/C][C]0.3361[/C][/ROW]
[ROW][C]65[/C][C]0.0413[/C][C]0.0259[/C][C]0.016[/C][C]0.2505[/C][C]0.1405[/C][C]0.3748[/C][/ROW]
[ROW][C]66[/C][C]0.0414[/C][C]0.0155[/C][C]0.0159[/C][C]0.1008[/C][C]0.1338[/C][C]0.3658[/C][/ROW]
[ROW][C]67[/C][C]0.0474[/C][C]0.0413[/C][C]0.0195[/C][C]0.6048[/C][C]0.2011[/C][C]0.4485[/C][/ROW]
[ROW][C]68[/C][C]0.0539[/C][C]0.0624[/C][C]0.0249[/C][C]1.0804[/C][C]0.311[/C][C]0.5577[/C][/ROW]
[ROW][C]69[/C][C]0.0461[/C][C]-0.0296[/C][C]0.0254[/C][C]0.3636[/C][C]0.3169[/C][C]0.5629[/C][/ROW]
[ROW][C]70[/C][C]0.0465[/C][C]0.0699[/C][C]0.0298[/C][C]2.1027[/C][C]0.4955[/C][C]0.7039[/C][/ROW]
[ROW][C]71[/C][C]0.048[/C][C]0.0157[/C][C]0.0286[/C][C]0.1021[/C][C]0.4597[/C][C]0.678[/C][/ROW]
[ROW][C]72[/C][C]0.0543[/C][C]-0.0382[/C][C]0.0294[/C][C]0.506[/C][C]0.4636[/C][C]0.6808[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70596&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70596&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.034-0.002200.001800
620.03480.00460.00340.00730.00450.0673
630.03250.02010.0090.17740.06210.2493
640.0417-0.0270.01350.26540.1130.3361
650.04130.02590.0160.25050.14050.3748
660.04140.01550.01590.10080.13380.3658
670.04740.04130.01950.60480.20110.4485
680.05390.06240.02491.08040.3110.5577
690.0461-0.02960.02540.36360.31690.5629
700.04650.06990.02982.10270.49550.7039
710.0480.01570.02860.10210.45970.678
720.0543-0.03820.02940.5060.46360.6808



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