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, 18 Dec 2008 09:22:35 -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/2008/Dec/18/t1229617432dj2ul8uxb0ok6x2.htm/, Retrieved Sat, 11 May 2024 14:56:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34875, Retrieved Sat, 11 May 2024 14:56:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact156
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:22:35] [e8f764b122b426f433a1e1038b457077] [Current]
-   PD    [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:37:07] [4ddbf81f78ea7c738951638c7e93f6ee]
-   PD      [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:45:58] [4ddbf81f78ea7c738951638c7e93f6ee]
Feedback Forum

Post a new message
Dataseries X:
7.5
7.6
7.9
7.9
8.1
8.2
8
7.5
6.8
6.5
6.6
7.6
8
8
7.7
7.5
7.6
7.7
7.9
7.8
7.5
7.5
7.1
7.5
7.5
7.6
7.7
7.7
7.9
8.1
8.2
8.2
8.1
7.9
7.3
6.9
6.6
6.7
6.9
7
7.1
7.2
7.1
6.9
7
6.8
6.4
6.7
6.7
6.4
6.3
6.2
6.5
6.8
6.8
6.5
6.3
5.9
5.9
6.4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34875&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 time4 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[48])
366.9-------
376.6-------
386.7-------
396.9-------
407-------
417.1-------
427.2-------
437.1-------
446.9-------
457-------
466.8-------
476.4-------
486.7-------
496.76.82776.42277.23260.26830.73170.86470.7317
506.46.99646.25557.73720.05730.78350.78350.7835
516.37.04156.02748.05560.07590.89250.60770.7454
526.26.95825.79498.12160.10070.86630.4720.6682
536.56.97135.73438.20820.22760.88920.41920.6663
546.87.03285.75378.3120.36060.79290.39890.695
556.87.03985.71798.36170.36110.63890.46440.6928
566.56.94335.5628.32460.26470.58060.52450.635
576.36.86115.40218.32020.22550.68620.4260.5857
585.96.72665.1858.26820.14660.70620.46280.5135
595.96.46254.8478.0780.24750.75250.53020.3866
606.46.66684.99038.34330.37760.8150.48450.4845

\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[48]) \tabularnewline
36 & 6.9 & - & - & - & - & - & - & - \tabularnewline
37 & 6.6 & - & - & - & - & - & - & - \tabularnewline
38 & 6.7 & - & - & - & - & - & - & - \tabularnewline
39 & 6.9 & - & - & - & - & - & - & - \tabularnewline
40 & 7 & - & - & - & - & - & - & - \tabularnewline
41 & 7.1 & - & - & - & - & - & - & - \tabularnewline
42 & 7.2 & - & - & - & - & - & - & - \tabularnewline
43 & 7.1 & - & - & - & - & - & - & - \tabularnewline
44 & 6.9 & - & - & - & - & - & - & - \tabularnewline
45 & 7 & - & - & - & - & - & - & - \tabularnewline
46 & 6.8 & - & - & - & - & - & - & - \tabularnewline
47 & 6.4 & - & - & - & - & - & - & - \tabularnewline
48 & 6.7 & - & - & - & - & - & - & - \tabularnewline
49 & 6.7 & 6.8277 & 6.4227 & 7.2326 & 0.2683 & 0.7317 & 0.8647 & 0.7317 \tabularnewline
50 & 6.4 & 6.9964 & 6.2555 & 7.7372 & 0.0573 & 0.7835 & 0.7835 & 0.7835 \tabularnewline
51 & 6.3 & 7.0415 & 6.0274 & 8.0556 & 0.0759 & 0.8925 & 0.6077 & 0.7454 \tabularnewline
52 & 6.2 & 6.9582 & 5.7949 & 8.1216 & 0.1007 & 0.8663 & 0.472 & 0.6682 \tabularnewline
53 & 6.5 & 6.9713 & 5.7343 & 8.2082 & 0.2276 & 0.8892 & 0.4192 & 0.6663 \tabularnewline
54 & 6.8 & 7.0328 & 5.7537 & 8.312 & 0.3606 & 0.7929 & 0.3989 & 0.695 \tabularnewline
55 & 6.8 & 7.0398 & 5.7179 & 8.3617 & 0.3611 & 0.6389 & 0.4644 & 0.6928 \tabularnewline
56 & 6.5 & 6.9433 & 5.562 & 8.3246 & 0.2647 & 0.5806 & 0.5245 & 0.635 \tabularnewline
57 & 6.3 & 6.8611 & 5.4021 & 8.3202 & 0.2255 & 0.6862 & 0.426 & 0.5857 \tabularnewline
58 & 5.9 & 6.7266 & 5.185 & 8.2682 & 0.1466 & 0.7062 & 0.4628 & 0.5135 \tabularnewline
59 & 5.9 & 6.4625 & 4.847 & 8.078 & 0.2475 & 0.7525 & 0.5302 & 0.3866 \tabularnewline
60 & 6.4 & 6.6668 & 4.9903 & 8.3433 & 0.3776 & 0.815 & 0.4845 & 0.4845 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34875&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[48])[/C][/ROW]
[ROW][C]36[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]6.7[/C][C]6.8277[/C][C]6.4227[/C][C]7.2326[/C][C]0.2683[/C][C]0.7317[/C][C]0.8647[/C][C]0.7317[/C][/ROW]
[ROW][C]50[/C][C]6.4[/C][C]6.9964[/C][C]6.2555[/C][C]7.7372[/C][C]0.0573[/C][C]0.7835[/C][C]0.7835[/C][C]0.7835[/C][/ROW]
[ROW][C]51[/C][C]6.3[/C][C]7.0415[/C][C]6.0274[/C][C]8.0556[/C][C]0.0759[/C][C]0.8925[/C][C]0.6077[/C][C]0.7454[/C][/ROW]
[ROW][C]52[/C][C]6.2[/C][C]6.9582[/C][C]5.7949[/C][C]8.1216[/C][C]0.1007[/C][C]0.8663[/C][C]0.472[/C][C]0.6682[/C][/ROW]
[ROW][C]53[/C][C]6.5[/C][C]6.9713[/C][C]5.7343[/C][C]8.2082[/C][C]0.2276[/C][C]0.8892[/C][C]0.4192[/C][C]0.6663[/C][/ROW]
[ROW][C]54[/C][C]6.8[/C][C]7.0328[/C][C]5.7537[/C][C]8.312[/C][C]0.3606[/C][C]0.7929[/C][C]0.3989[/C][C]0.695[/C][/ROW]
[ROW][C]55[/C][C]6.8[/C][C]7.0398[/C][C]5.7179[/C][C]8.3617[/C][C]0.3611[/C][C]0.6389[/C][C]0.4644[/C][C]0.6928[/C][/ROW]
[ROW][C]56[/C][C]6.5[/C][C]6.9433[/C][C]5.562[/C][C]8.3246[/C][C]0.2647[/C][C]0.5806[/C][C]0.5245[/C][C]0.635[/C][/ROW]
[ROW][C]57[/C][C]6.3[/C][C]6.8611[/C][C]5.4021[/C][C]8.3202[/C][C]0.2255[/C][C]0.6862[/C][C]0.426[/C][C]0.5857[/C][/ROW]
[ROW][C]58[/C][C]5.9[/C][C]6.7266[/C][C]5.185[/C][C]8.2682[/C][C]0.1466[/C][C]0.7062[/C][C]0.4628[/C][C]0.5135[/C][/ROW]
[ROW][C]59[/C][C]5.9[/C][C]6.4625[/C][C]4.847[/C][C]8.078[/C][C]0.2475[/C][C]0.7525[/C][C]0.5302[/C][C]0.3866[/C][/ROW]
[ROW][C]60[/C][C]6.4[/C][C]6.6668[/C][C]4.9903[/C][C]8.3433[/C][C]0.3776[/C][C]0.815[/C][C]0.4845[/C][C]0.4845[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34875&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34875&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[48])
366.9-------
376.6-------
386.7-------
396.9-------
407-------
417.1-------
427.2-------
437.1-------
446.9-------
457-------
466.8-------
476.4-------
486.7-------
496.76.82776.42277.23260.26830.73170.86470.7317
506.46.99646.25557.73720.05730.78350.78350.7835
516.37.04156.02748.05560.07590.89250.60770.7454
526.26.95825.79498.12160.10070.86630.4720.6682
536.56.97135.73438.20820.22760.88920.41920.6663
546.87.03285.75378.3120.36060.79290.39890.695
556.87.03985.71798.36170.36110.63890.46440.6928
566.56.94335.5628.32460.26470.58060.52450.635
576.36.86115.40218.32020.22550.68620.4260.5857
585.96.72665.1858.26820.14660.70620.46280.5135
595.96.46254.8478.0780.24750.75250.53020.3866
606.46.66684.99038.34330.37760.8150.48450.4845







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0303-0.01870.00160.01630.00140.0369
500.054-0.08520.00710.35560.02960.1722
510.0735-0.10530.00880.54980.04580.214
520.0853-0.1090.00910.57490.04790.2189
530.0905-0.06760.00560.22210.01850.136
540.0928-0.03310.00280.05420.00450.0672
550.0958-0.03410.00280.05750.00480.0692
560.1015-0.06380.00530.19650.01640.128
570.1085-0.08180.00680.31490.02620.162
580.1169-0.12290.01020.68330.05690.2386
590.1275-0.0870.00730.31640.02640.1624
600.1283-0.040.00330.07120.00590.077

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0303 & -0.0187 & 0.0016 & 0.0163 & 0.0014 & 0.0369 \tabularnewline
50 & 0.054 & -0.0852 & 0.0071 & 0.3556 & 0.0296 & 0.1722 \tabularnewline
51 & 0.0735 & -0.1053 & 0.0088 & 0.5498 & 0.0458 & 0.214 \tabularnewline
52 & 0.0853 & -0.109 & 0.0091 & 0.5749 & 0.0479 & 0.2189 \tabularnewline
53 & 0.0905 & -0.0676 & 0.0056 & 0.2221 & 0.0185 & 0.136 \tabularnewline
54 & 0.0928 & -0.0331 & 0.0028 & 0.0542 & 0.0045 & 0.0672 \tabularnewline
55 & 0.0958 & -0.0341 & 0.0028 & 0.0575 & 0.0048 & 0.0692 \tabularnewline
56 & 0.1015 & -0.0638 & 0.0053 & 0.1965 & 0.0164 & 0.128 \tabularnewline
57 & 0.1085 & -0.0818 & 0.0068 & 0.3149 & 0.0262 & 0.162 \tabularnewline
58 & 0.1169 & -0.1229 & 0.0102 & 0.6833 & 0.0569 & 0.2386 \tabularnewline
59 & 0.1275 & -0.087 & 0.0073 & 0.3164 & 0.0264 & 0.1624 \tabularnewline
60 & 0.1283 & -0.04 & 0.0033 & 0.0712 & 0.0059 & 0.077 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34875&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]49[/C][C]0.0303[/C][C]-0.0187[/C][C]0.0016[/C][C]0.0163[/C][C]0.0014[/C][C]0.0369[/C][/ROW]
[ROW][C]50[/C][C]0.054[/C][C]-0.0852[/C][C]0.0071[/C][C]0.3556[/C][C]0.0296[/C][C]0.1722[/C][/ROW]
[ROW][C]51[/C][C]0.0735[/C][C]-0.1053[/C][C]0.0088[/C][C]0.5498[/C][C]0.0458[/C][C]0.214[/C][/ROW]
[ROW][C]52[/C][C]0.0853[/C][C]-0.109[/C][C]0.0091[/C][C]0.5749[/C][C]0.0479[/C][C]0.2189[/C][/ROW]
[ROW][C]53[/C][C]0.0905[/C][C]-0.0676[/C][C]0.0056[/C][C]0.2221[/C][C]0.0185[/C][C]0.136[/C][/ROW]
[ROW][C]54[/C][C]0.0928[/C][C]-0.0331[/C][C]0.0028[/C][C]0.0542[/C][C]0.0045[/C][C]0.0672[/C][/ROW]
[ROW][C]55[/C][C]0.0958[/C][C]-0.0341[/C][C]0.0028[/C][C]0.0575[/C][C]0.0048[/C][C]0.0692[/C][/ROW]
[ROW][C]56[/C][C]0.1015[/C][C]-0.0638[/C][C]0.0053[/C][C]0.1965[/C][C]0.0164[/C][C]0.128[/C][/ROW]
[ROW][C]57[/C][C]0.1085[/C][C]-0.0818[/C][C]0.0068[/C][C]0.3149[/C][C]0.0262[/C][C]0.162[/C][/ROW]
[ROW][C]58[/C][C]0.1169[/C][C]-0.1229[/C][C]0.0102[/C][C]0.6833[/C][C]0.0569[/C][C]0.2386[/C][/ROW]
[ROW][C]59[/C][C]0.1275[/C][C]-0.087[/C][C]0.0073[/C][C]0.3164[/C][C]0.0264[/C][C]0.1624[/C][/ROW]
[ROW][C]60[/C][C]0.1283[/C][C]-0.04[/C][C]0.0033[/C][C]0.0712[/C][C]0.0059[/C][C]0.077[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34875&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34875&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
490.0303-0.01870.00160.01630.00140.0369
500.054-0.08520.00710.35560.02960.1722
510.0735-0.10530.00880.54980.04580.214
520.0853-0.1090.00910.57490.04790.2189
530.0905-0.06760.00560.22210.01850.136
540.0928-0.03310.00280.05420.00450.0672
550.0958-0.03410.00280.05750.00480.0692
560.1015-0.06380.00530.19650.01640.128
570.1085-0.08180.00680.31490.02620.162
580.1169-0.12290.01020.68330.05690.2386
590.1275-0.0870.00730.31640.02640.1624
600.1283-0.040.00330.07120.00590.077



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')