Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Module--
Title produced by softwareARIMA Forecasting
Date of computationTue, 04 Dec 2012 14:36:44 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/04/t1354649817mift529n5srcb56.htm/, Retrieved Thu, 25 Apr 2024 07:49:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=196554, Retrieved Thu, 25 Apr 2024 07:49:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2011-12-06 14:28:31] [bdca8f3e7c3554be8c1291e54f61d441]
- R P   [ARIMA Forecasting] [] [2011-12-06 15:22:46] [bdca8f3e7c3554be8c1291e54f61d441]
- RM        [ARIMA Forecasting] [] [2012-12-04 19:36:44] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
9007
8106
8928
9137
10017
10826
11317
10744
9713
9938
9161
8927
7750
6981
8038
8422
8714
9512
10120
9823
8743
9129
8710
8680
8162
7306
8124
7870
9387
9556
10093
9620
8285
8433
8160
8034
7717
7461
7776
7925
8634
8945
10078
9179
8037
8488
7874
8647
7792
6957
7726
8106
8890
9299
10625
9302
8314
8850
8265
8796
7836
6892
7791
8129
9115
9434
10484
9827
9110
9070
8633
9240




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\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 & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=196554&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]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=196554&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=196554&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'Sir Maurice George Kendall' @ kendall.wessa.net







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])
488647-------
497792-------
506957-------
517726-------
528106-------
538890-------
549299-------
5510625-------
569302-------
578314-------
588850-------
598265-------
608796-------
6178368099.2847426.66378771.90430.22150.02120.81470.0212
6268927483.33766717.18498249.49030.06520.18350.91094e-04
6377918080.57547231.12748930.02340.2520.9970.79340.0494
6481298373.1817447.90599298.4560.30250.89130.71430.1852
6591159128.80628133.464110124.14820.48920.97550.68090.7439
6694349500.72978439.938710561.52080.45090.7620.64530.9036
671048410753.71199631.281611876.14210.31880.98940.58890.9997
6898279591.12428410.267910771.98050.34770.06920.68430.9065
6991108544.86127308.33649781.3860.18520.02110.64280.3453
7090709048.70317758.910310338.49590.48710.46290.61870.6495
7186338452.73157111.7859793.6780.39610.18350.60810.3079
7292409075.28767685.068410465.50670.40820.73350.65310.6531

\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 & 8647 & - & - & - & - & - & - & - \tabularnewline
49 & 7792 & - & - & - & - & - & - & - \tabularnewline
50 & 6957 & - & - & - & - & - & - & - \tabularnewline
51 & 7726 & - & - & - & - & - & - & - \tabularnewline
52 & 8106 & - & - & - & - & - & - & - \tabularnewline
53 & 8890 & - & - & - & - & - & - & - \tabularnewline
54 & 9299 & - & - & - & - & - & - & - \tabularnewline
55 & 10625 & - & - & - & - & - & - & - \tabularnewline
56 & 9302 & - & - & - & - & - & - & - \tabularnewline
57 & 8314 & - & - & - & - & - & - & - \tabularnewline
58 & 8850 & - & - & - & - & - & - & - \tabularnewline
59 & 8265 & - & - & - & - & - & - & - \tabularnewline
60 & 8796 & - & - & - & - & - & - & - \tabularnewline
61 & 7836 & 8099.284 & 7426.6637 & 8771.9043 & 0.2215 & 0.0212 & 0.8147 & 0.0212 \tabularnewline
62 & 6892 & 7483.3376 & 6717.1849 & 8249.4903 & 0.0652 & 0.1835 & 0.9109 & 4e-04 \tabularnewline
63 & 7791 & 8080.5754 & 7231.1274 & 8930.0234 & 0.252 & 0.997 & 0.7934 & 0.0494 \tabularnewline
64 & 8129 & 8373.181 & 7447.9059 & 9298.456 & 0.3025 & 0.8913 & 0.7143 & 0.1852 \tabularnewline
65 & 9115 & 9128.8062 & 8133.4641 & 10124.1482 & 0.4892 & 0.9755 & 0.6809 & 0.7439 \tabularnewline
66 & 9434 & 9500.7297 & 8439.9387 & 10561.5208 & 0.4509 & 0.762 & 0.6453 & 0.9036 \tabularnewline
67 & 10484 & 10753.7119 & 9631.2816 & 11876.1421 & 0.3188 & 0.9894 & 0.5889 & 0.9997 \tabularnewline
68 & 9827 & 9591.1242 & 8410.2679 & 10771.9805 & 0.3477 & 0.0692 & 0.6843 & 0.9065 \tabularnewline
69 & 9110 & 8544.8612 & 7308.3364 & 9781.386 & 0.1852 & 0.0211 & 0.6428 & 0.3453 \tabularnewline
70 & 9070 & 9048.7031 & 7758.9103 & 10338.4959 & 0.4871 & 0.4629 & 0.6187 & 0.6495 \tabularnewline
71 & 8633 & 8452.7315 & 7111.785 & 9793.678 & 0.3961 & 0.1835 & 0.6081 & 0.3079 \tabularnewline
72 & 9240 & 9075.2876 & 7685.0684 & 10465.5067 & 0.4082 & 0.7335 & 0.6531 & 0.6531 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=196554&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]8647[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7792[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]6957[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]7726[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]8106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]8890[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]9299[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]10625[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]9302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]8314[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]8850[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]8265[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]8796[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]7836[/C][C]8099.284[/C][C]7426.6637[/C][C]8771.9043[/C][C]0.2215[/C][C]0.0212[/C][C]0.8147[/C][C]0.0212[/C][/ROW]
[ROW][C]62[/C][C]6892[/C][C]7483.3376[/C][C]6717.1849[/C][C]8249.4903[/C][C]0.0652[/C][C]0.1835[/C][C]0.9109[/C][C]4e-04[/C][/ROW]
[ROW][C]63[/C][C]7791[/C][C]8080.5754[/C][C]7231.1274[/C][C]8930.0234[/C][C]0.252[/C][C]0.997[/C][C]0.7934[/C][C]0.0494[/C][/ROW]
[ROW][C]64[/C][C]8129[/C][C]8373.181[/C][C]7447.9059[/C][C]9298.456[/C][C]0.3025[/C][C]0.8913[/C][C]0.7143[/C][C]0.1852[/C][/ROW]
[ROW][C]65[/C][C]9115[/C][C]9128.8062[/C][C]8133.4641[/C][C]10124.1482[/C][C]0.4892[/C][C]0.9755[/C][C]0.6809[/C][C]0.7439[/C][/ROW]
[ROW][C]66[/C][C]9434[/C][C]9500.7297[/C][C]8439.9387[/C][C]10561.5208[/C][C]0.4509[/C][C]0.762[/C][C]0.6453[/C][C]0.9036[/C][/ROW]
[ROW][C]67[/C][C]10484[/C][C]10753.7119[/C][C]9631.2816[/C][C]11876.1421[/C][C]0.3188[/C][C]0.9894[/C][C]0.5889[/C][C]0.9997[/C][/ROW]
[ROW][C]68[/C][C]9827[/C][C]9591.1242[/C][C]8410.2679[/C][C]10771.9805[/C][C]0.3477[/C][C]0.0692[/C][C]0.6843[/C][C]0.9065[/C][/ROW]
[ROW][C]69[/C][C]9110[/C][C]8544.8612[/C][C]7308.3364[/C][C]9781.386[/C][C]0.1852[/C][C]0.0211[/C][C]0.6428[/C][C]0.3453[/C][/ROW]
[ROW][C]70[/C][C]9070[/C][C]9048.7031[/C][C]7758.9103[/C][C]10338.4959[/C][C]0.4871[/C][C]0.4629[/C][C]0.6187[/C][C]0.6495[/C][/ROW]
[ROW][C]71[/C][C]8633[/C][C]8452.7315[/C][C]7111.785[/C][C]9793.678[/C][C]0.3961[/C][C]0.1835[/C][C]0.6081[/C][C]0.3079[/C][/ROW]
[ROW][C]72[/C][C]9240[/C][C]9075.2876[/C][C]7685.0684[/C][C]10465.5067[/C][C]0.4082[/C][C]0.7335[/C][C]0.6531[/C][C]0.6531[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=196554&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=196554&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])
488647-------
497792-------
506957-------
517726-------
528106-------
538890-------
549299-------
5510625-------
569302-------
578314-------
588850-------
598265-------
608796-------
6178368099.2847426.66378771.90430.22150.02120.81470.0212
6268927483.33766717.18498249.49030.06520.18350.91094e-04
6377918080.57547231.12748930.02340.2520.9970.79340.0494
6481298373.1817447.90599298.4560.30250.89130.71430.1852
6591159128.80628133.464110124.14820.48920.97550.68090.7439
6694349500.72978439.938710561.52080.45090.7620.64530.9036
671048410753.71199631.281611876.14210.31880.98940.58890.9997
6898279591.12428410.267910771.98050.34770.06920.68430.9065
6991108544.86127308.33649781.3860.18520.02110.64280.3453
7090709048.70317758.910310338.49590.48710.46290.61870.6495
7186338452.73157111.7859793.6780.39610.18350.60810.3079
7292409075.28767685.068410465.50670.40820.73350.65310.6531







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0424-0.0325069318.484500
620.0522-0.0790.0558349680.1362209499.3104457.7109
630.0536-0.03580.049183853.9066167617.5091409.4112
640.0564-0.02920.044159624.3465140619.2185374.9923
650.0556-0.00150.0356190.61112533.4968335.4601
660.057-0.0070.03084452.858194520.057307.4411
670.0533-0.02510.0372744.504191409.2637302.3396
680.06280.02460.029355637.412786937.7823294.8521
690.07380.06610.0334319381.8495112764.9009335.8049
700.07270.00240.0303453.5583101533.7666318.6436
710.08090.02130.029532496.732695257.6726308.6384
720.07820.01810.028627130.188989580.3823299.2998

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0424 & -0.0325 & 0 & 69318.4845 & 0 & 0 \tabularnewline
62 & 0.0522 & -0.079 & 0.0558 & 349680.1362 & 209499.3104 & 457.7109 \tabularnewline
63 & 0.0536 & -0.0358 & 0.0491 & 83853.9066 & 167617.5091 & 409.4112 \tabularnewline
64 & 0.0564 & -0.0292 & 0.0441 & 59624.3465 & 140619.2185 & 374.9923 \tabularnewline
65 & 0.0556 & -0.0015 & 0.0356 & 190.61 & 112533.4968 & 335.4601 \tabularnewline
66 & 0.057 & -0.007 & 0.0308 & 4452.8581 & 94520.057 & 307.4411 \tabularnewline
67 & 0.0533 & -0.0251 & 0.03 & 72744.5041 & 91409.2637 & 302.3396 \tabularnewline
68 & 0.0628 & 0.0246 & 0.0293 & 55637.4127 & 86937.7823 & 294.8521 \tabularnewline
69 & 0.0738 & 0.0661 & 0.0334 & 319381.8495 & 112764.9009 & 335.8049 \tabularnewline
70 & 0.0727 & 0.0024 & 0.0303 & 453.5583 & 101533.7666 & 318.6436 \tabularnewline
71 & 0.0809 & 0.0213 & 0.0295 & 32496.7326 & 95257.6726 & 308.6384 \tabularnewline
72 & 0.0782 & 0.0181 & 0.0286 & 27130.1889 & 89580.3823 & 299.2998 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=196554&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.0424[/C][C]-0.0325[/C][C]0[/C][C]69318.4845[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0522[/C][C]-0.079[/C][C]0.0558[/C][C]349680.1362[/C][C]209499.3104[/C][C]457.7109[/C][/ROW]
[ROW][C]63[/C][C]0.0536[/C][C]-0.0358[/C][C]0.0491[/C][C]83853.9066[/C][C]167617.5091[/C][C]409.4112[/C][/ROW]
[ROW][C]64[/C][C]0.0564[/C][C]-0.0292[/C][C]0.0441[/C][C]59624.3465[/C][C]140619.2185[/C][C]374.9923[/C][/ROW]
[ROW][C]65[/C][C]0.0556[/C][C]-0.0015[/C][C]0.0356[/C][C]190.61[/C][C]112533.4968[/C][C]335.4601[/C][/ROW]
[ROW][C]66[/C][C]0.057[/C][C]-0.007[/C][C]0.0308[/C][C]4452.8581[/C][C]94520.057[/C][C]307.4411[/C][/ROW]
[ROW][C]67[/C][C]0.0533[/C][C]-0.0251[/C][C]0.03[/C][C]72744.5041[/C][C]91409.2637[/C][C]302.3396[/C][/ROW]
[ROW][C]68[/C][C]0.0628[/C][C]0.0246[/C][C]0.0293[/C][C]55637.4127[/C][C]86937.7823[/C][C]294.8521[/C][/ROW]
[ROW][C]69[/C][C]0.0738[/C][C]0.0661[/C][C]0.0334[/C][C]319381.8495[/C][C]112764.9009[/C][C]335.8049[/C][/ROW]
[ROW][C]70[/C][C]0.0727[/C][C]0.0024[/C][C]0.0303[/C][C]453.5583[/C][C]101533.7666[/C][C]318.6436[/C][/ROW]
[ROW][C]71[/C][C]0.0809[/C][C]0.0213[/C][C]0.0295[/C][C]32496.7326[/C][C]95257.6726[/C][C]308.6384[/C][/ROW]
[ROW][C]72[/C][C]0.0782[/C][C]0.0181[/C][C]0.0286[/C][C]27130.1889[/C][C]89580.3823[/C][C]299.2998[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=196554&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=196554&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.0424-0.0325069318.484500
620.0522-0.0790.0558349680.1362209499.3104457.7109
630.0536-0.03580.049183853.9066167617.5091409.4112
640.0564-0.02920.044159624.3465140619.2185374.9923
650.0556-0.00150.0356190.61112533.4968335.4601
660.057-0.0070.03084452.858194520.057307.4411
670.0533-0.02510.0372744.504191409.2637302.3396
680.06280.02460.029355637.412786937.7823294.8521
690.07380.06610.0334319381.8495112764.9009335.8049
700.07270.00240.0303453.5583101533.7666318.6436
710.08090.02130.029532496.732695257.6726308.6384
720.07820.01810.028627130.188989580.3823299.2998



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')