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, 28 Dec 2010 00:01:57 +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/28/t1293494435fvjkn0en0brzlj1.htm/, Retrieved Sun, 05 May 2024 00:20:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116195, Retrieved Sun, 05 May 2024 00:20:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2010-12-28 00:01:57] [c984196f1244e05baf3e7c2e52d47a33] [Current]
-   P     [ARIMA Forecasting] [] [2010-12-28 19:34:07] [f57e4c4cbbe8f12a19647529ae7266aa]
- RMPD      [Kendall tau Rank Correlation] [] [2010-12-28 22:20:21] [f57e4c4cbbe8f12a19647529ae7266aa]
- RMPD      [Pearson Correlation] [] [2010-12-28 22:33:33] [f57e4c4cbbe8f12a19647529ae7266aa]
Feedback Forum

Post a new message
Dataseries X:
110.43
114.77
132.21
122.86
118.5
130.3
113.25
104.54
132.78
122.99
133.14
125.83
122.99
125.7
148.47
120.75
136.7
139.17
123.47
112.76
137.99
139.75
140.22
121.6
132.33
130.34
149.05
130.47
139.29
146.55
137.79
122.95
139.51
155.77
143.95
125.07
142.35
144.34
145.87
156.01
146.74
156.45
152.29
122.56
154.59
149.68
118.75
109.22
104.19
107.33
114.07
107.92
103.53
117.3
112.09
95.08
123.28
121.98
121.74
119.93
115.11




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116195&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116195&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116195&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[49])
37142.35-------
38144.34-------
39145.87-------
40156.01-------
41146.74-------
42156.45-------
43152.29-------
44122.56-------
45154.59-------
46149.68-------
47118.75-------
48109.22-------
49104.19-------
50107.33105.646588.3738126.29530.43650.5551e-040.555
51114.07106.766482.9446137.42990.32030.48560.00620.5654
52107.92114.188183.817155.56440.38330.50220.02380.6821
53103.53107.403275.1542153.49020.43460.49120.04720.5543
54117.3114.510276.8206170.6910.46120.64920.07170.6406
55112.09111.465471.9824172.6050.4920.42580.09530.5922
5695.0889.705155.9355143.86240.42290.20890.11720.3001
57123.28113.148868.2899187.47490.39470.68310.13720.5934
58121.98109.55564.1264187.16640.37680.36440.15550.5539
59121.7486.916549.4225152.85490.15030.14860.1720.3038
60119.9379.941244.2208144.51560.11240.10230.18710.2309
61115.1176.259641.0881141.53790.12170.09490.20080.2008

\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[49]) \tabularnewline
37 & 142.35 & - & - & - & - & - & - & - \tabularnewline
38 & 144.34 & - & - & - & - & - & - & - \tabularnewline
39 & 145.87 & - & - & - & - & - & - & - \tabularnewline
40 & 156.01 & - & - & - & - & - & - & - \tabularnewline
41 & 146.74 & - & - & - & - & - & - & - \tabularnewline
42 & 156.45 & - & - & - & - & - & - & - \tabularnewline
43 & 152.29 & - & - & - & - & - & - & - \tabularnewline
44 & 122.56 & - & - & - & - & - & - & - \tabularnewline
45 & 154.59 & - & - & - & - & - & - & - \tabularnewline
46 & 149.68 & - & - & - & - & - & - & - \tabularnewline
47 & 118.75 & - & - & - & - & - & - & - \tabularnewline
48 & 109.22 & - & - & - & - & - & - & - \tabularnewline
49 & 104.19 & - & - & - & - & - & - & - \tabularnewline
50 & 107.33 & 105.6465 & 88.3738 & 126.2953 & 0.4365 & 0.555 & 1e-04 & 0.555 \tabularnewline
51 & 114.07 & 106.7664 & 82.9446 & 137.4299 & 0.3203 & 0.4856 & 0.0062 & 0.5654 \tabularnewline
52 & 107.92 & 114.1881 & 83.817 & 155.5644 & 0.3833 & 0.5022 & 0.0238 & 0.6821 \tabularnewline
53 & 103.53 & 107.4032 & 75.1542 & 153.4902 & 0.4346 & 0.4912 & 0.0472 & 0.5543 \tabularnewline
54 & 117.3 & 114.5102 & 76.8206 & 170.691 & 0.4612 & 0.6492 & 0.0717 & 0.6406 \tabularnewline
55 & 112.09 & 111.4654 & 71.9824 & 172.605 & 0.492 & 0.4258 & 0.0953 & 0.5922 \tabularnewline
56 & 95.08 & 89.7051 & 55.9355 & 143.8624 & 0.4229 & 0.2089 & 0.1172 & 0.3001 \tabularnewline
57 & 123.28 & 113.1488 & 68.2899 & 187.4749 & 0.3947 & 0.6831 & 0.1372 & 0.5934 \tabularnewline
58 & 121.98 & 109.555 & 64.1264 & 187.1664 & 0.3768 & 0.3644 & 0.1555 & 0.5539 \tabularnewline
59 & 121.74 & 86.9165 & 49.4225 & 152.8549 & 0.1503 & 0.1486 & 0.172 & 0.3038 \tabularnewline
60 & 119.93 & 79.9412 & 44.2208 & 144.5156 & 0.1124 & 0.1023 & 0.1871 & 0.2309 \tabularnewline
61 & 115.11 & 76.2596 & 41.0881 & 141.5379 & 0.1217 & 0.0949 & 0.2008 & 0.2008 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116195&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[49])[/C][/ROW]
[ROW][C]37[/C][C]142.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]144.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]145.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]156.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]146.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]156.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]152.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]122.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]154.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]149.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]118.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]109.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]104.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]107.33[/C][C]105.6465[/C][C]88.3738[/C][C]126.2953[/C][C]0.4365[/C][C]0.555[/C][C]1e-04[/C][C]0.555[/C][/ROW]
[ROW][C]51[/C][C]114.07[/C][C]106.7664[/C][C]82.9446[/C][C]137.4299[/C][C]0.3203[/C][C]0.4856[/C][C]0.0062[/C][C]0.5654[/C][/ROW]
[ROW][C]52[/C][C]107.92[/C][C]114.1881[/C][C]83.817[/C][C]155.5644[/C][C]0.3833[/C][C]0.5022[/C][C]0.0238[/C][C]0.6821[/C][/ROW]
[ROW][C]53[/C][C]103.53[/C][C]107.4032[/C][C]75.1542[/C][C]153.4902[/C][C]0.4346[/C][C]0.4912[/C][C]0.0472[/C][C]0.5543[/C][/ROW]
[ROW][C]54[/C][C]117.3[/C][C]114.5102[/C][C]76.8206[/C][C]170.691[/C][C]0.4612[/C][C]0.6492[/C][C]0.0717[/C][C]0.6406[/C][/ROW]
[ROW][C]55[/C][C]112.09[/C][C]111.4654[/C][C]71.9824[/C][C]172.605[/C][C]0.492[/C][C]0.4258[/C][C]0.0953[/C][C]0.5922[/C][/ROW]
[ROW][C]56[/C][C]95.08[/C][C]89.7051[/C][C]55.9355[/C][C]143.8624[/C][C]0.4229[/C][C]0.2089[/C][C]0.1172[/C][C]0.3001[/C][/ROW]
[ROW][C]57[/C][C]123.28[/C][C]113.1488[/C][C]68.2899[/C][C]187.4749[/C][C]0.3947[/C][C]0.6831[/C][C]0.1372[/C][C]0.5934[/C][/ROW]
[ROW][C]58[/C][C]121.98[/C][C]109.555[/C][C]64.1264[/C][C]187.1664[/C][C]0.3768[/C][C]0.3644[/C][C]0.1555[/C][C]0.5539[/C][/ROW]
[ROW][C]59[/C][C]121.74[/C][C]86.9165[/C][C]49.4225[/C][C]152.8549[/C][C]0.1503[/C][C]0.1486[/C][C]0.172[/C][C]0.3038[/C][/ROW]
[ROW][C]60[/C][C]119.93[/C][C]79.9412[/C][C]44.2208[/C][C]144.5156[/C][C]0.1124[/C][C]0.1023[/C][C]0.1871[/C][C]0.2309[/C][/ROW]
[ROW][C]61[/C][C]115.11[/C][C]76.2596[/C][C]41.0881[/C][C]141.5379[/C][C]0.1217[/C][C]0.0949[/C][C]0.2008[/C][C]0.2008[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116195&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116195&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[49])
37142.35-------
38144.34-------
39145.87-------
40156.01-------
41146.74-------
42156.45-------
43152.29-------
44122.56-------
45154.59-------
46149.68-------
47118.75-------
48109.22-------
49104.19-------
50107.33105.646588.3738126.29530.43650.5551e-040.555
51114.07106.766482.9446137.42990.32030.48560.00620.5654
52107.92114.188183.817155.56440.38330.50220.02380.6821
53103.53107.403275.1542153.49020.43460.49120.04720.5543
54117.3114.510276.8206170.6910.46120.64920.07170.6406
55112.09111.465471.9824172.6050.4920.42580.09530.5922
5695.0889.705155.9355143.86240.42290.20890.11720.3001
57123.28113.148868.2899187.47490.39470.68310.13720.5934
58121.98109.55564.1264187.16640.37680.36440.15550.5539
59121.7486.916549.4225152.85490.15030.14860.1720.3038
60119.9379.941244.2208144.51560.11240.10230.18710.2309
61115.1176.259641.0881141.53790.12170.09490.20080.2008







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.09970.015902.83400
510.14650.06840.042253.342828.08845.2998
520.1849-0.05490.046439.289631.82215.6411
530.2189-0.03610.043815.001427.6175.2552
540.25030.02440.03997.78323.65024.8631
550.27990.00560.03420.390219.77354.4467
560.3080.05990.037928.889121.07574.5908
570.33510.08950.0443102.641231.27145.5921
580.36140.11340.052154.379844.95016.7045
590.38710.40070.08691212.6768161.722812.717
600.41210.50020.12451599.103292.393717.0995
610.43670.50940.15651509.3525393.806919.8446

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0997 & 0.0159 & 0 & 2.834 & 0 & 0 \tabularnewline
51 & 0.1465 & 0.0684 & 0.0422 & 53.3428 & 28.0884 & 5.2998 \tabularnewline
52 & 0.1849 & -0.0549 & 0.0464 & 39.2896 & 31.8221 & 5.6411 \tabularnewline
53 & 0.2189 & -0.0361 & 0.0438 & 15.0014 & 27.617 & 5.2552 \tabularnewline
54 & 0.2503 & 0.0244 & 0.0399 & 7.783 & 23.6502 & 4.8631 \tabularnewline
55 & 0.2799 & 0.0056 & 0.0342 & 0.3902 & 19.7735 & 4.4467 \tabularnewline
56 & 0.308 & 0.0599 & 0.0379 & 28.8891 & 21.0757 & 4.5908 \tabularnewline
57 & 0.3351 & 0.0895 & 0.0443 & 102.6412 & 31.2714 & 5.5921 \tabularnewline
58 & 0.3614 & 0.1134 & 0.052 & 154.3798 & 44.9501 & 6.7045 \tabularnewline
59 & 0.3871 & 0.4007 & 0.0869 & 1212.6768 & 161.7228 & 12.717 \tabularnewline
60 & 0.4121 & 0.5002 & 0.1245 & 1599.103 & 292.3937 & 17.0995 \tabularnewline
61 & 0.4367 & 0.5094 & 0.1565 & 1509.3525 & 393.8069 & 19.8446 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116195&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]50[/C][C]0.0997[/C][C]0.0159[/C][C]0[/C][C]2.834[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.1465[/C][C]0.0684[/C][C]0.0422[/C][C]53.3428[/C][C]28.0884[/C][C]5.2998[/C][/ROW]
[ROW][C]52[/C][C]0.1849[/C][C]-0.0549[/C][C]0.0464[/C][C]39.2896[/C][C]31.8221[/C][C]5.6411[/C][/ROW]
[ROW][C]53[/C][C]0.2189[/C][C]-0.0361[/C][C]0.0438[/C][C]15.0014[/C][C]27.617[/C][C]5.2552[/C][/ROW]
[ROW][C]54[/C][C]0.2503[/C][C]0.0244[/C][C]0.0399[/C][C]7.783[/C][C]23.6502[/C][C]4.8631[/C][/ROW]
[ROW][C]55[/C][C]0.2799[/C][C]0.0056[/C][C]0.0342[/C][C]0.3902[/C][C]19.7735[/C][C]4.4467[/C][/ROW]
[ROW][C]56[/C][C]0.308[/C][C]0.0599[/C][C]0.0379[/C][C]28.8891[/C][C]21.0757[/C][C]4.5908[/C][/ROW]
[ROW][C]57[/C][C]0.3351[/C][C]0.0895[/C][C]0.0443[/C][C]102.6412[/C][C]31.2714[/C][C]5.5921[/C][/ROW]
[ROW][C]58[/C][C]0.3614[/C][C]0.1134[/C][C]0.052[/C][C]154.3798[/C][C]44.9501[/C][C]6.7045[/C][/ROW]
[ROW][C]59[/C][C]0.3871[/C][C]0.4007[/C][C]0.0869[/C][C]1212.6768[/C][C]161.7228[/C][C]12.717[/C][/ROW]
[ROW][C]60[/C][C]0.4121[/C][C]0.5002[/C][C]0.1245[/C][C]1599.103[/C][C]292.3937[/C][C]17.0995[/C][/ROW]
[ROW][C]61[/C][C]0.4367[/C][C]0.5094[/C][C]0.1565[/C][C]1509.3525[/C][C]393.8069[/C][C]19.8446[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116195&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116195&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
500.09970.015902.83400
510.14650.06840.042253.342828.08845.2998
520.1849-0.05490.046439.289631.82215.6411
530.2189-0.03610.043815.001427.6175.2552
540.25030.02440.03997.78323.65024.8631
550.27990.00560.03420.390219.77354.4467
560.3080.05990.037928.889121.07574.5908
570.33510.08950.0443102.641231.27145.5921
580.36140.11340.052154.379844.95016.7045
590.38710.40070.08691212.6768161.722812.717
600.41210.50020.12451599.103292.393717.0995
610.43670.50940.15651509.3525393.806919.8446



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