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, 30 Dec 2010 01:16:10 +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/30/t1293671625zfwgcg5y5c4sert.htm/, Retrieved Fri, 03 May 2024 08:16:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=117209, Retrieved Fri, 03 May 2024 08:16:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact205
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2010-12-17 09:14:27] [9f0fea5f96e3630b8f903250153d0968]
-   PD  [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-29 15:04:33] [9f0fea5f96e3630b8f903250153d0968]
-   P       [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-30 01:16:10] [be9b1effb945c5b0652fb49bcca5faef] [Current]
Feedback Forum

Post a new message
Dataseries X:
45990
42904
49968
42831
42110
45002
42091
39457
44448
48208
49603
48093
43130
45599
52287
49732
49571
48933
49203
45018
49405
56007
61858
55740
48827
52043
60348
55615
56852
55630
56457
50013
56291
52477
59846
55732
49114
55382
61102
61219
55785
57941
58844
51479
59968
60747
61532
61292
55164
56292
66015
60829
57571
57619
55304
54181
61033
63886
67365
63707
53473
52531
62703
61004
60438
65272
64463
62449
67373
70307
75544
71966
66263
69550
75388
57716
55779
52927
45655
46487
48683
50010
48944
41341
32411
34763
39106
34472
32642
34248
32280
29990
29656
34071
34105
33717




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ www.wessa.org

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117209&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' @ www.wessa.org







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[84])
7271966-------
7366263-------
7469550-------
7575388-------
7657716-------
7755779-------
7852927-------
7945655-------
8046487-------
8148683-------
8250010-------
8348944-------
8441341-------
853241134581.287228165.215540997.3590.25370.019500.0195
863476336344.15927316.875945371.4420.36570.803400.139
873910643988.466332951.360855025.57180.1930.949300.6809
883447238436.353225702.793251169.91310.27090.4590.00150.3274
893264236887.818922658.644951116.99290.27930.63030.00460.2698
903424837633.291722051.403953215.17950.33510.73490.02720.3205
913228036018.057519191.856252844.25870.33160.58170.13080.2676
922999032741.973114757.344750726.60150.38210.52010.06710.1743
932965638187.323919114.498857260.14890.19030.80020.14040.3729
943407140250.396220148.196460352.5960.27340.84920.17070.4577
953410543543.333322461.962464624.70420.19010.81080.30780.5811
963371739711.849917694.812361728.88760.29680.69120.44230.4423

\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[84]) \tabularnewline
72 & 71966 & - & - & - & - & - & - & - \tabularnewline
73 & 66263 & - & - & - & - & - & - & - \tabularnewline
74 & 69550 & - & - & - & - & - & - & - \tabularnewline
75 & 75388 & - & - & - & - & - & - & - \tabularnewline
76 & 57716 & - & - & - & - & - & - & - \tabularnewline
77 & 55779 & - & - & - & - & - & - & - \tabularnewline
78 & 52927 & - & - & - & - & - & - & - \tabularnewline
79 & 45655 & - & - & - & - & - & - & - \tabularnewline
80 & 46487 & - & - & - & - & - & - & - \tabularnewline
81 & 48683 & - & - & - & - & - & - & - \tabularnewline
82 & 50010 & - & - & - & - & - & - & - \tabularnewline
83 & 48944 & - & - & - & - & - & - & - \tabularnewline
84 & 41341 & - & - & - & - & - & - & - \tabularnewline
85 & 32411 & 34581.2872 & 28165.2155 & 40997.359 & 0.2537 & 0.0195 & 0 & 0.0195 \tabularnewline
86 & 34763 & 36344.159 & 27316.8759 & 45371.442 & 0.3657 & 0.8034 & 0 & 0.139 \tabularnewline
87 & 39106 & 43988.4663 & 32951.3608 & 55025.5718 & 0.193 & 0.9493 & 0 & 0.6809 \tabularnewline
88 & 34472 & 38436.3532 & 25702.7932 & 51169.9131 & 0.2709 & 0.459 & 0.0015 & 0.3274 \tabularnewline
89 & 32642 & 36887.8189 & 22658.6449 & 51116.9929 & 0.2793 & 0.6303 & 0.0046 & 0.2698 \tabularnewline
90 & 34248 & 37633.2917 & 22051.4039 & 53215.1795 & 0.3351 & 0.7349 & 0.0272 & 0.3205 \tabularnewline
91 & 32280 & 36018.0575 & 19191.8562 & 52844.2587 & 0.3316 & 0.5817 & 0.1308 & 0.2676 \tabularnewline
92 & 29990 & 32741.9731 & 14757.3447 & 50726.6015 & 0.3821 & 0.5201 & 0.0671 & 0.1743 \tabularnewline
93 & 29656 & 38187.3239 & 19114.4988 & 57260.1489 & 0.1903 & 0.8002 & 0.1404 & 0.3729 \tabularnewline
94 & 34071 & 40250.3962 & 20148.1964 & 60352.596 & 0.2734 & 0.8492 & 0.1707 & 0.4577 \tabularnewline
95 & 34105 & 43543.3333 & 22461.9624 & 64624.7042 & 0.1901 & 0.8108 & 0.3078 & 0.5811 \tabularnewline
96 & 33717 & 39711.8499 & 17694.8123 & 61728.8876 & 0.2968 & 0.6912 & 0.4423 & 0.4423 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=117209&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[84])[/C][/ROW]
[ROW][C]72[/C][C]71966[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]66263[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]69550[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]75388[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]57716[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]55779[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]52927[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]45655[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]46487[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]48683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]50010[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]48944[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]41341[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]32411[/C][C]34581.2872[/C][C]28165.2155[/C][C]40997.359[/C][C]0.2537[/C][C]0.0195[/C][C]0[/C][C]0.0195[/C][/ROW]
[ROW][C]86[/C][C]34763[/C][C]36344.159[/C][C]27316.8759[/C][C]45371.442[/C][C]0.3657[/C][C]0.8034[/C][C]0[/C][C]0.139[/C][/ROW]
[ROW][C]87[/C][C]39106[/C][C]43988.4663[/C][C]32951.3608[/C][C]55025.5718[/C][C]0.193[/C][C]0.9493[/C][C]0[/C][C]0.6809[/C][/ROW]
[ROW][C]88[/C][C]34472[/C][C]38436.3532[/C][C]25702.7932[/C][C]51169.9131[/C][C]0.2709[/C][C]0.459[/C][C]0.0015[/C][C]0.3274[/C][/ROW]
[ROW][C]89[/C][C]32642[/C][C]36887.8189[/C][C]22658.6449[/C][C]51116.9929[/C][C]0.2793[/C][C]0.6303[/C][C]0.0046[/C][C]0.2698[/C][/ROW]
[ROW][C]90[/C][C]34248[/C][C]37633.2917[/C][C]22051.4039[/C][C]53215.1795[/C][C]0.3351[/C][C]0.7349[/C][C]0.0272[/C][C]0.3205[/C][/ROW]
[ROW][C]91[/C][C]32280[/C][C]36018.0575[/C][C]19191.8562[/C][C]52844.2587[/C][C]0.3316[/C][C]0.5817[/C][C]0.1308[/C][C]0.2676[/C][/ROW]
[ROW][C]92[/C][C]29990[/C][C]32741.9731[/C][C]14757.3447[/C][C]50726.6015[/C][C]0.3821[/C][C]0.5201[/C][C]0.0671[/C][C]0.1743[/C][/ROW]
[ROW][C]93[/C][C]29656[/C][C]38187.3239[/C][C]19114.4988[/C][C]57260.1489[/C][C]0.1903[/C][C]0.8002[/C][C]0.1404[/C][C]0.3729[/C][/ROW]
[ROW][C]94[/C][C]34071[/C][C]40250.3962[/C][C]20148.1964[/C][C]60352.596[/C][C]0.2734[/C][C]0.8492[/C][C]0.1707[/C][C]0.4577[/C][/ROW]
[ROW][C]95[/C][C]34105[/C][C]43543.3333[/C][C]22461.9624[/C][C]64624.7042[/C][C]0.1901[/C][C]0.8108[/C][C]0.3078[/C][C]0.5811[/C][/ROW]
[ROW][C]96[/C][C]33717[/C][C]39711.8499[/C][C]17694.8123[/C][C]61728.8876[/C][C]0.2968[/C][C]0.6912[/C][C]0.4423[/C][C]0.4423[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=117209&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117209&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[84])
7271966-------
7366263-------
7469550-------
7575388-------
7657716-------
7755779-------
7852927-------
7945655-------
8046487-------
8148683-------
8250010-------
8348944-------
8441341-------
853241134581.287228165.215540997.3590.25370.019500.0195
863476336344.15927316.875945371.4420.36570.803400.139
873910643988.466332951.360855025.57180.1930.949300.6809
883447238436.353225702.793251169.91310.27090.4590.00150.3274
893264236887.818922658.644951116.99290.27930.63030.00460.2698
903424837633.291722051.403953215.17950.33510.73490.02720.3205
913228036018.057519191.856252844.25870.33160.58170.13080.2676
922999032741.973114757.344750726.60150.38210.52010.06710.1743
932965638187.323919114.498857260.14890.19030.80020.14040.3729
943407140250.396220148.196460352.5960.27340.84920.17070.4577
953410543543.333322461.962464624.70420.19010.81080.30780.5811
963371739711.849917694.812361728.88760.29680.69120.44230.4423







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0947-0.062804710146.715300
860.1267-0.04350.05312500063.64663605105.1811898.7115
870.128-0.1110.072423838477.127110349562.49643217.0736
880.169-0.10310.080115716096.211691195.92233419.2391
890.1968-0.11510.087118026977.945312958352.32693599.7711
900.2112-0.090.087611460199.894612708660.25483564.9208
910.2383-0.10380.089913973073.616312889290.7353590.1658
920.2802-0.08410.08927573356.043412224798.89863496.398
930.2548-0.22340.104172783486.88918953542.00864353.5666
940.2548-0.15350.10938184937.620920876681.56984569.1007
950.247-0.21680.118889082135.868727077177.41525203.5735
960.2829-0.1510.121535938225.741127815598.1095274.0495

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0947 & -0.0628 & 0 & 4710146.7153 & 0 & 0 \tabularnewline
86 & 0.1267 & -0.0435 & 0.0531 & 2500063.6466 & 3605105.181 & 1898.7115 \tabularnewline
87 & 0.128 & -0.111 & 0.0724 & 23838477.1271 & 10349562.4964 & 3217.0736 \tabularnewline
88 & 0.169 & -0.1031 & 0.0801 & 15716096.2 & 11691195.9223 & 3419.2391 \tabularnewline
89 & 0.1968 & -0.1151 & 0.0871 & 18026977.9453 & 12958352.3269 & 3599.7711 \tabularnewline
90 & 0.2112 & -0.09 & 0.0876 & 11460199.8946 & 12708660.2548 & 3564.9208 \tabularnewline
91 & 0.2383 & -0.1038 & 0.0899 & 13973073.6163 & 12889290.735 & 3590.1658 \tabularnewline
92 & 0.2802 & -0.0841 & 0.0892 & 7573356.0434 & 12224798.8986 & 3496.398 \tabularnewline
93 & 0.2548 & -0.2234 & 0.1041 & 72783486.889 & 18953542.0086 & 4353.5666 \tabularnewline
94 & 0.2548 & -0.1535 & 0.109 & 38184937.6209 & 20876681.5698 & 4569.1007 \tabularnewline
95 & 0.247 & -0.2168 & 0.1188 & 89082135.8687 & 27077177.4152 & 5203.5735 \tabularnewline
96 & 0.2829 & -0.151 & 0.1215 & 35938225.7411 & 27815598.109 & 5274.0495 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=117209&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]85[/C][C]0.0947[/C][C]-0.0628[/C][C]0[/C][C]4710146.7153[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.1267[/C][C]-0.0435[/C][C]0.0531[/C][C]2500063.6466[/C][C]3605105.181[/C][C]1898.7115[/C][/ROW]
[ROW][C]87[/C][C]0.128[/C][C]-0.111[/C][C]0.0724[/C][C]23838477.1271[/C][C]10349562.4964[/C][C]3217.0736[/C][/ROW]
[ROW][C]88[/C][C]0.169[/C][C]-0.1031[/C][C]0.0801[/C][C]15716096.2[/C][C]11691195.9223[/C][C]3419.2391[/C][/ROW]
[ROW][C]89[/C][C]0.1968[/C][C]-0.1151[/C][C]0.0871[/C][C]18026977.9453[/C][C]12958352.3269[/C][C]3599.7711[/C][/ROW]
[ROW][C]90[/C][C]0.2112[/C][C]-0.09[/C][C]0.0876[/C][C]11460199.8946[/C][C]12708660.2548[/C][C]3564.9208[/C][/ROW]
[ROW][C]91[/C][C]0.2383[/C][C]-0.1038[/C][C]0.0899[/C][C]13973073.6163[/C][C]12889290.735[/C][C]3590.1658[/C][/ROW]
[ROW][C]92[/C][C]0.2802[/C][C]-0.0841[/C][C]0.0892[/C][C]7573356.0434[/C][C]12224798.8986[/C][C]3496.398[/C][/ROW]
[ROW][C]93[/C][C]0.2548[/C][C]-0.2234[/C][C]0.1041[/C][C]72783486.889[/C][C]18953542.0086[/C][C]4353.5666[/C][/ROW]
[ROW][C]94[/C][C]0.2548[/C][C]-0.1535[/C][C]0.109[/C][C]38184937.6209[/C][C]20876681.5698[/C][C]4569.1007[/C][/ROW]
[ROW][C]95[/C][C]0.247[/C][C]-0.2168[/C][C]0.1188[/C][C]89082135.8687[/C][C]27077177.4152[/C][C]5203.5735[/C][/ROW]
[ROW][C]96[/C][C]0.2829[/C][C]-0.151[/C][C]0.1215[/C][C]35938225.7411[/C][C]27815598.109[/C][C]5274.0495[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=117209&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117209&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
850.0947-0.062804710146.715300
860.1267-0.04350.05312500063.64663605105.1811898.7115
870.128-0.1110.072423838477.127110349562.49643217.0736
880.169-0.10310.080115716096.211691195.92233419.2391
890.1968-0.11510.087118026977.945312958352.32693599.7711
900.2112-0.090.087611460199.894612708660.25483564.9208
910.2383-0.10380.089913973073.616312889290.7353590.1658
920.2802-0.08410.08927573356.043412224798.89863496.398
930.2548-0.22340.104172783486.88918953542.00864353.5666
940.2548-0.15350.10938184937.620920876681.56984569.1007
950.247-0.21680.118889082135.868727077177.41525203.5735
960.2829-0.1510.121535938225.741127815598.1095274.0495



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