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 computationTue, 21 Dec 2010 14:41:20 +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/21/t1292942348i7iuqkmpf3duihh.htm/, Retrieved Wed, 15 May 2024 10:48:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113625, Retrieved Wed, 15 May 2024 10:48:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact135
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [test 7] [2010-12-05 11:13:06] [74be16979710d4c4e7c6647856088456]
-   P         [ARIMA Forecasting] [W9 - Blog 9] [2010-12-06 16:23:47] [1aa8d85d6b335d32b1f6be940e33a166]
-   PD          [ARIMA Forecasting] [ARIMA forecast Li...] [2010-12-20 15:06:20] [1aa8d85d6b335d32b1f6be940e33a166]
-   PD              [ARIMA Forecasting] [ARIMA forecast Wh...] [2010-12-21 14:41:20] [47bfda5353cd53c1cf7ea7aa9038654a] [Current]
Feedback Forum

Post a new message
Dataseries X:
16,46
16,49
16,59
16,58
16,60
16,55
16,57
16,51
16,50
16,49
16,44
16,26
16,33
16,72
16,75
16,74
16,84
16,79
16,66
16,69
16,84
16,86
16,76
16,72
16,29
16,29
16,46
16,54
16,70
16,82
16,88
16,89
16,92
16,88
16,91
16,80
16,78
17,03
17,18
17,12
17,11
17,14
17,17
17,21
17,22
17,19
17,15
17,10
17,21
17,33
17,30
17,33
17,35
17,43
17,46
17,50
17,54
17,56
17,44
17,41
17,72
17,79
17,83
17,76
17,95
17,91
17,96
17,98
17,89
17,88
17,91
17,51
17,63




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113625&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[61])
4917.21-------
5017.33-------
5117.3-------
5217.33-------
5317.35-------
5417.43-------
5517.46-------
5617.5-------
5717.54-------
5817.56-------
5917.44-------
6017.41-------
6117.72-------
6217.7917.7217.493117.94690.27270.50.99960.5
6317.8317.7217.399218.04080.25080.33450.99490.5
6417.7617.7217.327118.11290.42090.29160.97410.5
6517.9517.7217.266318.17370.16020.43140.9450.5
6617.9117.7217.212718.22730.23140.18710.86880.5
6717.9617.7217.164318.27570.19860.25140.82040.5
6817.9817.7217.119818.32020.19790.21660.76370.5
6917.8917.7217.078318.36170.30180.21350.70880.5
7017.8817.7217.039418.40060.32250.31220.67750.5
7117.9117.7217.002618.43740.30180.3310.77790.5
7217.5117.7216.967618.47240.29220.31030.79030.5
7317.6317.7216.934118.50590.41120.69980.50.5

\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[61]) \tabularnewline
49 & 17.21 & - & - & - & - & - & - & - \tabularnewline
50 & 17.33 & - & - & - & - & - & - & - \tabularnewline
51 & 17.3 & - & - & - & - & - & - & - \tabularnewline
52 & 17.33 & - & - & - & - & - & - & - \tabularnewline
53 & 17.35 & - & - & - & - & - & - & - \tabularnewline
54 & 17.43 & - & - & - & - & - & - & - \tabularnewline
55 & 17.46 & - & - & - & - & - & - & - \tabularnewline
56 & 17.5 & - & - & - & - & - & - & - \tabularnewline
57 & 17.54 & - & - & - & - & - & - & - \tabularnewline
58 & 17.56 & - & - & - & - & - & - & - \tabularnewline
59 & 17.44 & - & - & - & - & - & - & - \tabularnewline
60 & 17.41 & - & - & - & - & - & - & - \tabularnewline
61 & 17.72 & - & - & - & - & - & - & - \tabularnewline
62 & 17.79 & 17.72 & 17.4931 & 17.9469 & 0.2727 & 0.5 & 0.9996 & 0.5 \tabularnewline
63 & 17.83 & 17.72 & 17.3992 & 18.0408 & 0.2508 & 0.3345 & 0.9949 & 0.5 \tabularnewline
64 & 17.76 & 17.72 & 17.3271 & 18.1129 & 0.4209 & 0.2916 & 0.9741 & 0.5 \tabularnewline
65 & 17.95 & 17.72 & 17.2663 & 18.1737 & 0.1602 & 0.4314 & 0.945 & 0.5 \tabularnewline
66 & 17.91 & 17.72 & 17.2127 & 18.2273 & 0.2314 & 0.1871 & 0.8688 & 0.5 \tabularnewline
67 & 17.96 & 17.72 & 17.1643 & 18.2757 & 0.1986 & 0.2514 & 0.8204 & 0.5 \tabularnewline
68 & 17.98 & 17.72 & 17.1198 & 18.3202 & 0.1979 & 0.2166 & 0.7637 & 0.5 \tabularnewline
69 & 17.89 & 17.72 & 17.0783 & 18.3617 & 0.3018 & 0.2135 & 0.7088 & 0.5 \tabularnewline
70 & 17.88 & 17.72 & 17.0394 & 18.4006 & 0.3225 & 0.3122 & 0.6775 & 0.5 \tabularnewline
71 & 17.91 & 17.72 & 17.0026 & 18.4374 & 0.3018 & 0.331 & 0.7779 & 0.5 \tabularnewline
72 & 17.51 & 17.72 & 16.9676 & 18.4724 & 0.2922 & 0.3103 & 0.7903 & 0.5 \tabularnewline
73 & 17.63 & 17.72 & 16.9341 & 18.5059 & 0.4112 & 0.6998 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113625&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[61])[/C][/ROW]
[ROW][C]49[/C][C]17.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]17.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]17.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]17.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]17.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]17.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]17.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]17.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]17.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]17.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]17.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]17.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]17.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]17.79[/C][C]17.72[/C][C]17.4931[/C][C]17.9469[/C][C]0.2727[/C][C]0.5[/C][C]0.9996[/C][C]0.5[/C][/ROW]
[ROW][C]63[/C][C]17.83[/C][C]17.72[/C][C]17.3992[/C][C]18.0408[/C][C]0.2508[/C][C]0.3345[/C][C]0.9949[/C][C]0.5[/C][/ROW]
[ROW][C]64[/C][C]17.76[/C][C]17.72[/C][C]17.3271[/C][C]18.1129[/C][C]0.4209[/C][C]0.2916[/C][C]0.9741[/C][C]0.5[/C][/ROW]
[ROW][C]65[/C][C]17.95[/C][C]17.72[/C][C]17.2663[/C][C]18.1737[/C][C]0.1602[/C][C]0.4314[/C][C]0.945[/C][C]0.5[/C][/ROW]
[ROW][C]66[/C][C]17.91[/C][C]17.72[/C][C]17.2127[/C][C]18.2273[/C][C]0.2314[/C][C]0.1871[/C][C]0.8688[/C][C]0.5[/C][/ROW]
[ROW][C]67[/C][C]17.96[/C][C]17.72[/C][C]17.1643[/C][C]18.2757[/C][C]0.1986[/C][C]0.2514[/C][C]0.8204[/C][C]0.5[/C][/ROW]
[ROW][C]68[/C][C]17.98[/C][C]17.72[/C][C]17.1198[/C][C]18.3202[/C][C]0.1979[/C][C]0.2166[/C][C]0.7637[/C][C]0.5[/C][/ROW]
[ROW][C]69[/C][C]17.89[/C][C]17.72[/C][C]17.0783[/C][C]18.3617[/C][C]0.3018[/C][C]0.2135[/C][C]0.7088[/C][C]0.5[/C][/ROW]
[ROW][C]70[/C][C]17.88[/C][C]17.72[/C][C]17.0394[/C][C]18.4006[/C][C]0.3225[/C][C]0.3122[/C][C]0.6775[/C][C]0.5[/C][/ROW]
[ROW][C]71[/C][C]17.91[/C][C]17.72[/C][C]17.0026[/C][C]18.4374[/C][C]0.3018[/C][C]0.331[/C][C]0.7779[/C][C]0.5[/C][/ROW]
[ROW][C]72[/C][C]17.51[/C][C]17.72[/C][C]16.9676[/C][C]18.4724[/C][C]0.2922[/C][C]0.3103[/C][C]0.7903[/C][C]0.5[/C][/ROW]
[ROW][C]73[/C][C]17.63[/C][C]17.72[/C][C]16.9341[/C][C]18.5059[/C][C]0.4112[/C][C]0.6998[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113625&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113625&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[61])
4917.21-------
5017.33-------
5117.3-------
5217.33-------
5317.35-------
5417.43-------
5517.46-------
5617.5-------
5717.54-------
5817.56-------
5917.44-------
6017.41-------
6117.72-------
6217.7917.7217.493117.94690.27270.50.99960.5
6317.8317.7217.399218.04080.25080.33450.99490.5
6417.7617.7217.327118.11290.42090.29160.97410.5
6517.9517.7217.266318.17370.16020.43140.9450.5
6617.9117.7217.212718.22730.23140.18710.86880.5
6717.9617.7217.164318.27570.19860.25140.82040.5
6817.9817.7217.119818.32020.19790.21660.76370.5
6917.8917.7217.078318.36170.30180.21350.70880.5
7017.8817.7217.039418.40060.32250.31220.67750.5
7117.9117.7217.002618.43740.30180.3310.77790.5
7217.5117.7216.967618.47240.29220.31030.79030.5
7317.6317.7216.934118.50590.41120.69980.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.00650.00400.004900
630.00920.00620.00510.01210.00850.0922
640.01130.00230.00410.00160.00620.0787
650.01310.0130.00630.05290.01790.1337
660.01460.01070.00720.03610.02150.1467
670.0160.01350.00830.05760.02750.1659
680.01730.01470.00920.06760.03330.1824
690.01850.00960.00920.02890.03270.1809
700.01960.0090.00920.02560.03190.1787
710.02070.01070.00940.03610.03230.1798
720.0217-0.01190.00960.04410.03340.1828
730.0226-0.00510.00920.00810.03130.1769

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0065 & 0.004 & 0 & 0.0049 & 0 & 0 \tabularnewline
63 & 0.0092 & 0.0062 & 0.0051 & 0.0121 & 0.0085 & 0.0922 \tabularnewline
64 & 0.0113 & 0.0023 & 0.0041 & 0.0016 & 0.0062 & 0.0787 \tabularnewline
65 & 0.0131 & 0.013 & 0.0063 & 0.0529 & 0.0179 & 0.1337 \tabularnewline
66 & 0.0146 & 0.0107 & 0.0072 & 0.0361 & 0.0215 & 0.1467 \tabularnewline
67 & 0.016 & 0.0135 & 0.0083 & 0.0576 & 0.0275 & 0.1659 \tabularnewline
68 & 0.0173 & 0.0147 & 0.0092 & 0.0676 & 0.0333 & 0.1824 \tabularnewline
69 & 0.0185 & 0.0096 & 0.0092 & 0.0289 & 0.0327 & 0.1809 \tabularnewline
70 & 0.0196 & 0.009 & 0.0092 & 0.0256 & 0.0319 & 0.1787 \tabularnewline
71 & 0.0207 & 0.0107 & 0.0094 & 0.0361 & 0.0323 & 0.1798 \tabularnewline
72 & 0.0217 & -0.0119 & 0.0096 & 0.0441 & 0.0334 & 0.1828 \tabularnewline
73 & 0.0226 & -0.0051 & 0.0092 & 0.0081 & 0.0313 & 0.1769 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113625&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]62[/C][C]0.0065[/C][C]0.004[/C][C]0[/C][C]0.0049[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0092[/C][C]0.0062[/C][C]0.0051[/C][C]0.0121[/C][C]0.0085[/C][C]0.0922[/C][/ROW]
[ROW][C]64[/C][C]0.0113[/C][C]0.0023[/C][C]0.0041[/C][C]0.0016[/C][C]0.0062[/C][C]0.0787[/C][/ROW]
[ROW][C]65[/C][C]0.0131[/C][C]0.013[/C][C]0.0063[/C][C]0.0529[/C][C]0.0179[/C][C]0.1337[/C][/ROW]
[ROW][C]66[/C][C]0.0146[/C][C]0.0107[/C][C]0.0072[/C][C]0.0361[/C][C]0.0215[/C][C]0.1467[/C][/ROW]
[ROW][C]67[/C][C]0.016[/C][C]0.0135[/C][C]0.0083[/C][C]0.0576[/C][C]0.0275[/C][C]0.1659[/C][/ROW]
[ROW][C]68[/C][C]0.0173[/C][C]0.0147[/C][C]0.0092[/C][C]0.0676[/C][C]0.0333[/C][C]0.1824[/C][/ROW]
[ROW][C]69[/C][C]0.0185[/C][C]0.0096[/C][C]0.0092[/C][C]0.0289[/C][C]0.0327[/C][C]0.1809[/C][/ROW]
[ROW][C]70[/C][C]0.0196[/C][C]0.009[/C][C]0.0092[/C][C]0.0256[/C][C]0.0319[/C][C]0.1787[/C][/ROW]
[ROW][C]71[/C][C]0.0207[/C][C]0.0107[/C][C]0.0094[/C][C]0.0361[/C][C]0.0323[/C][C]0.1798[/C][/ROW]
[ROW][C]72[/C][C]0.0217[/C][C]-0.0119[/C][C]0.0096[/C][C]0.0441[/C][C]0.0334[/C][C]0.1828[/C][/ROW]
[ROW][C]73[/C][C]0.0226[/C][C]-0.0051[/C][C]0.0092[/C][C]0.0081[/C][C]0.0313[/C][C]0.1769[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113625&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113625&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
620.00650.00400.004900
630.00920.00620.00510.01210.00850.0922
640.01130.00230.00410.00160.00620.0787
650.01310.0130.00630.05290.01790.1337
660.01460.01070.00720.03610.02150.1467
670.0160.01350.00830.05760.02750.1659
680.01730.01470.00920.06760.03330.1824
690.01850.00960.00920.02890.03270.1809
700.01960.0090.00920.02560.03190.1787
710.02070.01070.00940.03610.03230.1798
720.0217-0.01190.00960.04410.03340.1828
730.0226-0.00510.00920.00810.03130.1769



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