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 computationMon, 21 Dec 2009 04:34:13 -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/21/t1261395385cx89d5yngrbfkar.htm/, Retrieved Sun, 05 May 2024 13:53:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70110, Retrieved Sun, 05 May 2024 13:53:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  MPD      [ARIMA Forecasting] [ARIMA Forecasting...] [2009-12-21 11:34:13] [8cd69d0f4298074aa572ca2f9b39b6ae] [Current]
Feedback Forum

Post a new message
Dataseries X:
-1.2
-2.4
0.8
-0.1
-1.5
-4.4
-4.2
3.5
10
8.6
9.5
9.9
10.4
16
12.7
10.2
8.9
12.6
13.6
14.8
9.5
13.7
17
14.7
17.4
9
9.1
12.2
15.9
12.9
10.9
10.6
13.2
9.6
6.4
5.8
-1
-0.2
2.7
3.6
-0.9
0.3
-1.1
-2.5
-3.4
-3.5
-3.9
-4.6
-0.1
4.3
10.2
8.7
13.3
15
20.7
20.7
26.4
31.2
31.4
26.6
26.6
19.2
6.5
3.1
-0.2
-4
-12.6
-13
-17.6
-21.7
-23.2
-16.8
-19.8




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70110&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 time7 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])
49-0.1-------
504.3-------
5110.2-------
528.7-------
5313.3-------
5415-------
5520.7-------
5620.7-------
5726.4-------
5831.2-------
5931.4-------
6026.6-------
6126.6-------
6219.224.441716.566632.31680.0960.295610.2956
636.526.304612.969139.64020.00180.85180.9910.4827
643.127.56338.854446.27210.00520.98630.97590.5402
65-0.228.08613.954252.21810.01080.97880.88510.548
66-427.9277-3.163259.01870.02210.96190.79250.5334
67-12.626.8869-11.698865.47260.02240.94170.62330.5058
68-1326.2566-20.184872.6980.04880.94950.59270.4942
69-17.627.5922-26.99882.18240.05230.92750.51710.5142
70-21.726.37-36.990589.73060.06850.91310.44060.4972
71-23.225.0592-47.520697.6390.09620.89670.4320.4834
72-16.824.6166-57.5653106.79840.16160.87290.48110.4811
73-19.823.5771-68.5486115.70280.1780.80480.47440.4744

\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 & -0.1 & - & - & - & - & - & - & - \tabularnewline
50 & 4.3 & - & - & - & - & - & - & - \tabularnewline
51 & 10.2 & - & - & - & - & - & - & - \tabularnewline
52 & 8.7 & - & - & - & - & - & - & - \tabularnewline
53 & 13.3 & - & - & - & - & - & - & - \tabularnewline
54 & 15 & - & - & - & - & - & - & - \tabularnewline
55 & 20.7 & - & - & - & - & - & - & - \tabularnewline
56 & 20.7 & - & - & - & - & - & - & - \tabularnewline
57 & 26.4 & - & - & - & - & - & - & - \tabularnewline
58 & 31.2 & - & - & - & - & - & - & - \tabularnewline
59 & 31.4 & - & - & - & - & - & - & - \tabularnewline
60 & 26.6 & - & - & - & - & - & - & - \tabularnewline
61 & 26.6 & - & - & - & - & - & - & - \tabularnewline
62 & 19.2 & 24.4417 & 16.5666 & 32.3168 & 0.096 & 0.2956 & 1 & 0.2956 \tabularnewline
63 & 6.5 & 26.3046 & 12.9691 & 39.6402 & 0.0018 & 0.8518 & 0.991 & 0.4827 \tabularnewline
64 & 3.1 & 27.5633 & 8.8544 & 46.2721 & 0.0052 & 0.9863 & 0.9759 & 0.5402 \tabularnewline
65 & -0.2 & 28.0861 & 3.9542 & 52.2181 & 0.0108 & 0.9788 & 0.8851 & 0.548 \tabularnewline
66 & -4 & 27.9277 & -3.1632 & 59.0187 & 0.0221 & 0.9619 & 0.7925 & 0.5334 \tabularnewline
67 & -12.6 & 26.8869 & -11.6988 & 65.4726 & 0.0224 & 0.9417 & 0.6233 & 0.5058 \tabularnewline
68 & -13 & 26.2566 & -20.1848 & 72.698 & 0.0488 & 0.9495 & 0.5927 & 0.4942 \tabularnewline
69 & -17.6 & 27.5922 & -26.998 & 82.1824 & 0.0523 & 0.9275 & 0.5171 & 0.5142 \tabularnewline
70 & -21.7 & 26.37 & -36.9905 & 89.7306 & 0.0685 & 0.9131 & 0.4406 & 0.4972 \tabularnewline
71 & -23.2 & 25.0592 & -47.5206 & 97.639 & 0.0962 & 0.8967 & 0.432 & 0.4834 \tabularnewline
72 & -16.8 & 24.6166 & -57.5653 & 106.7984 & 0.1616 & 0.8729 & 0.4811 & 0.4811 \tabularnewline
73 & -19.8 & 23.5771 & -68.5486 & 115.7028 & 0.178 & 0.8048 & 0.4744 & 0.4744 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70110&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]-0.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]4.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]10.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]13.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]20.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]20.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]26.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]31.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]31.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]26.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]26.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]19.2[/C][C]24.4417[/C][C]16.5666[/C][C]32.3168[/C][C]0.096[/C][C]0.2956[/C][C]1[/C][C]0.2956[/C][/ROW]
[ROW][C]63[/C][C]6.5[/C][C]26.3046[/C][C]12.9691[/C][C]39.6402[/C][C]0.0018[/C][C]0.8518[/C][C]0.991[/C][C]0.4827[/C][/ROW]
[ROW][C]64[/C][C]3.1[/C][C]27.5633[/C][C]8.8544[/C][C]46.2721[/C][C]0.0052[/C][C]0.9863[/C][C]0.9759[/C][C]0.5402[/C][/ROW]
[ROW][C]65[/C][C]-0.2[/C][C]28.0861[/C][C]3.9542[/C][C]52.2181[/C][C]0.0108[/C][C]0.9788[/C][C]0.8851[/C][C]0.548[/C][/ROW]
[ROW][C]66[/C][C]-4[/C][C]27.9277[/C][C]-3.1632[/C][C]59.0187[/C][C]0.0221[/C][C]0.9619[/C][C]0.7925[/C][C]0.5334[/C][/ROW]
[ROW][C]67[/C][C]-12.6[/C][C]26.8869[/C][C]-11.6988[/C][C]65.4726[/C][C]0.0224[/C][C]0.9417[/C][C]0.6233[/C][C]0.5058[/C][/ROW]
[ROW][C]68[/C][C]-13[/C][C]26.2566[/C][C]-20.1848[/C][C]72.698[/C][C]0.0488[/C][C]0.9495[/C][C]0.5927[/C][C]0.4942[/C][/ROW]
[ROW][C]69[/C][C]-17.6[/C][C]27.5922[/C][C]-26.998[/C][C]82.1824[/C][C]0.0523[/C][C]0.9275[/C][C]0.5171[/C][C]0.5142[/C][/ROW]
[ROW][C]70[/C][C]-21.7[/C][C]26.37[/C][C]-36.9905[/C][C]89.7306[/C][C]0.0685[/C][C]0.9131[/C][C]0.4406[/C][C]0.4972[/C][/ROW]
[ROW][C]71[/C][C]-23.2[/C][C]25.0592[/C][C]-47.5206[/C][C]97.639[/C][C]0.0962[/C][C]0.8967[/C][C]0.432[/C][C]0.4834[/C][/ROW]
[ROW][C]72[/C][C]-16.8[/C][C]24.6166[/C][C]-57.5653[/C][C]106.7984[/C][C]0.1616[/C][C]0.8729[/C][C]0.4811[/C][C]0.4811[/C][/ROW]
[ROW][C]73[/C][C]-19.8[/C][C]23.5771[/C][C]-68.5486[/C][C]115.7028[/C][C]0.178[/C][C]0.8048[/C][C]0.4744[/C][C]0.4744[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70110&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70110&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])
49-0.1-------
504.3-------
5110.2-------
528.7-------
5313.3-------
5415-------
5520.7-------
5620.7-------
5726.4-------
5831.2-------
5931.4-------
6026.6-------
6126.6-------
6219.224.441716.566632.31680.0960.295610.2956
636.526.304612.969139.64020.00180.85180.9910.4827
643.127.56338.854446.27210.00520.98630.97590.5402
65-0.228.08613.954252.21810.01080.97880.88510.548
66-427.9277-3.163259.01870.02210.96190.79250.5334
67-12.626.8869-11.698865.47260.02240.94170.62330.5058
68-1326.2566-20.184872.6980.04880.94950.59270.4942
69-17.627.5922-26.99882.18240.05230.92750.51710.5142
70-21.726.37-36.990589.73060.06850.91310.44060.4972
71-23.225.0592-47.520697.6390.09620.89670.4320.4834
72-16.824.6166-57.5653106.79840.16160.87290.48110.4811
73-19.823.5771-68.5486115.70280.1780.80480.47440.4744







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.1644-0.21450.017927.47552.28961.5131
630.2587-0.75290.0627392.222732.68525.7171
640.3463-0.88750.074598.450749.87097.0619
650.4384-1.00710.0839800.106266.67558.1655
660.568-1.14320.09531019.379684.94839.2167
670.7322-1.46860.12241559.2149129.934611.3989
680.9024-1.49510.12461541.0797128.423311.3324
691.0094-1.63790.13652042.3348170.194613.0459
701.2259-1.82290.15192310.729192.560713.8766
711.4777-1.92580.16052328.9472194.078913.9312
721.7033-1.68250.14021715.331142.944211.9559
731.9936-1.83980.15331881.5719156.797712.5219

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.1644 & -0.2145 & 0.0179 & 27.4755 & 2.2896 & 1.5131 \tabularnewline
63 & 0.2587 & -0.7529 & 0.0627 & 392.2227 & 32.6852 & 5.7171 \tabularnewline
64 & 0.3463 & -0.8875 & 0.074 & 598.4507 & 49.8709 & 7.0619 \tabularnewline
65 & 0.4384 & -1.0071 & 0.0839 & 800.1062 & 66.6755 & 8.1655 \tabularnewline
66 & 0.568 & -1.1432 & 0.0953 & 1019.3796 & 84.9483 & 9.2167 \tabularnewline
67 & 0.7322 & -1.4686 & 0.1224 & 1559.2149 & 129.9346 & 11.3989 \tabularnewline
68 & 0.9024 & -1.4951 & 0.1246 & 1541.0797 & 128.4233 & 11.3324 \tabularnewline
69 & 1.0094 & -1.6379 & 0.1365 & 2042.3348 & 170.1946 & 13.0459 \tabularnewline
70 & 1.2259 & -1.8229 & 0.1519 & 2310.729 & 192.5607 & 13.8766 \tabularnewline
71 & 1.4777 & -1.9258 & 0.1605 & 2328.9472 & 194.0789 & 13.9312 \tabularnewline
72 & 1.7033 & -1.6825 & 0.1402 & 1715.331 & 142.9442 & 11.9559 \tabularnewline
73 & 1.9936 & -1.8398 & 0.1533 & 1881.5719 & 156.7977 & 12.5219 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70110&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.1644[/C][C]-0.2145[/C][C]0.0179[/C][C]27.4755[/C][C]2.2896[/C][C]1.5131[/C][/ROW]
[ROW][C]63[/C][C]0.2587[/C][C]-0.7529[/C][C]0.0627[/C][C]392.2227[/C][C]32.6852[/C][C]5.7171[/C][/ROW]
[ROW][C]64[/C][C]0.3463[/C][C]-0.8875[/C][C]0.074[/C][C]598.4507[/C][C]49.8709[/C][C]7.0619[/C][/ROW]
[ROW][C]65[/C][C]0.4384[/C][C]-1.0071[/C][C]0.0839[/C][C]800.1062[/C][C]66.6755[/C][C]8.1655[/C][/ROW]
[ROW][C]66[/C][C]0.568[/C][C]-1.1432[/C][C]0.0953[/C][C]1019.3796[/C][C]84.9483[/C][C]9.2167[/C][/ROW]
[ROW][C]67[/C][C]0.7322[/C][C]-1.4686[/C][C]0.1224[/C][C]1559.2149[/C][C]129.9346[/C][C]11.3989[/C][/ROW]
[ROW][C]68[/C][C]0.9024[/C][C]-1.4951[/C][C]0.1246[/C][C]1541.0797[/C][C]128.4233[/C][C]11.3324[/C][/ROW]
[ROW][C]69[/C][C]1.0094[/C][C]-1.6379[/C][C]0.1365[/C][C]2042.3348[/C][C]170.1946[/C][C]13.0459[/C][/ROW]
[ROW][C]70[/C][C]1.2259[/C][C]-1.8229[/C][C]0.1519[/C][C]2310.729[/C][C]192.5607[/C][C]13.8766[/C][/ROW]
[ROW][C]71[/C][C]1.4777[/C][C]-1.9258[/C][C]0.1605[/C][C]2328.9472[/C][C]194.0789[/C][C]13.9312[/C][/ROW]
[ROW][C]72[/C][C]1.7033[/C][C]-1.6825[/C][C]0.1402[/C][C]1715.331[/C][C]142.9442[/C][C]11.9559[/C][/ROW]
[ROW][C]73[/C][C]1.9936[/C][C]-1.8398[/C][C]0.1533[/C][C]1881.5719[/C][C]156.7977[/C][C]12.5219[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70110&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70110&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.1644-0.21450.017927.47552.28961.5131
630.2587-0.75290.0627392.222732.68525.7171
640.3463-0.88750.074598.450749.87097.0619
650.4384-1.00710.0839800.106266.67558.1655
660.568-1.14320.09531019.379684.94839.2167
670.7322-1.46860.12241559.2149129.934611.3989
680.9024-1.49510.12461541.0797128.423311.3324
691.0094-1.63790.13652042.3348170.194613.0459
701.2259-1.82290.15192310.729192.560713.8766
711.4777-1.92580.16052328.9472194.078913.9312
721.7033-1.68250.14021715.331142.944211.9559
731.9936-1.83980.15331881.5719156.797712.5219



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