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 computationWed, 23 Dec 2009 15:37:42 -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/23/t126160791767vvkr2uolulh5r.htm/, Retrieved Mon, 29 Apr 2024 10:49:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70595, Retrieved Mon, 29 Apr 2024 10:49:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-   P       [ARIMA Forecasting] [Paper ARIMA F IGP] [2009-12-14 21:07:10] [134dc66689e3d457a82860db6471d419]
-   P         [ARIMA Forecasting] [Paper ARIMA F IGP 12] [2009-12-15 20:24:19] [134dc66689e3d457a82860db6471d419]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 22:37:42] [ba02bcb7e07025bbb7f8a074d38ad767] [Current]
Feedback Forum

Post a new message
Dataseries X:
13.4
13.5
14.8
14.3
14.3
14
13.2
12.2
14.3
15.7
14.2
14.6
14.5
14.3
15.3
14.4
13.7
14.2
13.5
11.9
14.6
15.6
14.1
14.9
14.2
14.6
17.2
15.4
14.3
17.5
14.5
14.4
16.6
16.7
16.6
16.9
15.7
16.4
18.4
16.9
16.5
18.3
15.1
15.7
18.1
16.8
18.9
19
18.1
17.8
21.5
17.1
18.7
19
16.4
16.9
18.6
19.3
19.4
17.6
18.6
18.1
20.4
18.1
19.6
19.9
19.2
17.8
19.2
22
21.1
19.5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70595&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'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[60])
4819-------
4918.1-------
5017.8-------
5121.5-------
5217.1-------
5318.7-------
5419-------
5516.4-------
5616.9-------
5718.6-------
5819.3-------
5919.4-------
6017.6-------
6118.618.911317.498920.32360.33290.96560.86990.9656
6218.118.355416.943219.76760.36150.36710.77960.8528
6320.419.984318.46421.50450.2960.99240.02530.9989
6418.119.076717.342420.8110.13480.06740.98730.9524
6519.618.295516.55420.03690.0710.58710.32440.7831
6619.919.470717.599521.34190.32650.44610.6890.975
6719.217.710515.75619.6650.06760.01410.90560.5441
6817.817.015615.029319.00180.21950.01560.54540.2821
6919.219.394417.306921.48190.42760.93280.77210.954
702219.806617.666321.94680.02230.71070.67860.9783
7121.119.493217.302421.68390.07530.01250.53320.9548
7219.519.504917.242321.76760.49830.08350.95050.9505

\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 & 19 & - & - & - & - & - & - & - \tabularnewline
49 & 18.1 & - & - & - & - & - & - & - \tabularnewline
50 & 17.8 & - & - & - & - & - & - & - \tabularnewline
51 & 21.5 & - & - & - & - & - & - & - \tabularnewline
52 & 17.1 & - & - & - & - & - & - & - \tabularnewline
53 & 18.7 & - & - & - & - & - & - & - \tabularnewline
54 & 19 & - & - & - & - & - & - & - \tabularnewline
55 & 16.4 & - & - & - & - & - & - & - \tabularnewline
56 & 16.9 & - & - & - & - & - & - & - \tabularnewline
57 & 18.6 & - & - & - & - & - & - & - \tabularnewline
58 & 19.3 & - & - & - & - & - & - & - \tabularnewline
59 & 19.4 & - & - & - & - & - & - & - \tabularnewline
60 & 17.6 & - & - & - & - & - & - & - \tabularnewline
61 & 18.6 & 18.9113 & 17.4989 & 20.3236 & 0.3329 & 0.9656 & 0.8699 & 0.9656 \tabularnewline
62 & 18.1 & 18.3554 & 16.9432 & 19.7676 & 0.3615 & 0.3671 & 0.7796 & 0.8528 \tabularnewline
63 & 20.4 & 19.9843 & 18.464 & 21.5045 & 0.296 & 0.9924 & 0.0253 & 0.9989 \tabularnewline
64 & 18.1 & 19.0767 & 17.3424 & 20.811 & 0.1348 & 0.0674 & 0.9873 & 0.9524 \tabularnewline
65 & 19.6 & 18.2955 & 16.554 & 20.0369 & 0.071 & 0.5871 & 0.3244 & 0.7831 \tabularnewline
66 & 19.9 & 19.4707 & 17.5995 & 21.3419 & 0.3265 & 0.4461 & 0.689 & 0.975 \tabularnewline
67 & 19.2 & 17.7105 & 15.756 & 19.665 & 0.0676 & 0.0141 & 0.9056 & 0.5441 \tabularnewline
68 & 17.8 & 17.0156 & 15.0293 & 19.0018 & 0.2195 & 0.0156 & 0.5454 & 0.2821 \tabularnewline
69 & 19.2 & 19.3944 & 17.3069 & 21.4819 & 0.4276 & 0.9328 & 0.7721 & 0.954 \tabularnewline
70 & 22 & 19.8066 & 17.6663 & 21.9468 & 0.0223 & 0.7107 & 0.6786 & 0.9783 \tabularnewline
71 & 21.1 & 19.4932 & 17.3024 & 21.6839 & 0.0753 & 0.0125 & 0.5332 & 0.9548 \tabularnewline
72 & 19.5 & 19.5049 & 17.2423 & 21.7676 & 0.4983 & 0.0835 & 0.9505 & 0.9505 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70595&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]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]18.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]17.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]21.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]17.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]18.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]16.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]16.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]18.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]19.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]19.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]17.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]18.6[/C][C]18.9113[/C][C]17.4989[/C][C]20.3236[/C][C]0.3329[/C][C]0.9656[/C][C]0.8699[/C][C]0.9656[/C][/ROW]
[ROW][C]62[/C][C]18.1[/C][C]18.3554[/C][C]16.9432[/C][C]19.7676[/C][C]0.3615[/C][C]0.3671[/C][C]0.7796[/C][C]0.8528[/C][/ROW]
[ROW][C]63[/C][C]20.4[/C][C]19.9843[/C][C]18.464[/C][C]21.5045[/C][C]0.296[/C][C]0.9924[/C][C]0.0253[/C][C]0.9989[/C][/ROW]
[ROW][C]64[/C][C]18.1[/C][C]19.0767[/C][C]17.3424[/C][C]20.811[/C][C]0.1348[/C][C]0.0674[/C][C]0.9873[/C][C]0.9524[/C][/ROW]
[ROW][C]65[/C][C]19.6[/C][C]18.2955[/C][C]16.554[/C][C]20.0369[/C][C]0.071[/C][C]0.5871[/C][C]0.3244[/C][C]0.7831[/C][/ROW]
[ROW][C]66[/C][C]19.9[/C][C]19.4707[/C][C]17.5995[/C][C]21.3419[/C][C]0.3265[/C][C]0.4461[/C][C]0.689[/C][C]0.975[/C][/ROW]
[ROW][C]67[/C][C]19.2[/C][C]17.7105[/C][C]15.756[/C][C]19.665[/C][C]0.0676[/C][C]0.0141[/C][C]0.9056[/C][C]0.5441[/C][/ROW]
[ROW][C]68[/C][C]17.8[/C][C]17.0156[/C][C]15.0293[/C][C]19.0018[/C][C]0.2195[/C][C]0.0156[/C][C]0.5454[/C][C]0.2821[/C][/ROW]
[ROW][C]69[/C][C]19.2[/C][C]19.3944[/C][C]17.3069[/C][C]21.4819[/C][C]0.4276[/C][C]0.9328[/C][C]0.7721[/C][C]0.954[/C][/ROW]
[ROW][C]70[/C][C]22[/C][C]19.8066[/C][C]17.6663[/C][C]21.9468[/C][C]0.0223[/C][C]0.7107[/C][C]0.6786[/C][C]0.9783[/C][/ROW]
[ROW][C]71[/C][C]21.1[/C][C]19.4932[/C][C]17.3024[/C][C]21.6839[/C][C]0.0753[/C][C]0.0125[/C][C]0.5332[/C][C]0.9548[/C][/ROW]
[ROW][C]72[/C][C]19.5[/C][C]19.5049[/C][C]17.2423[/C][C]21.7676[/C][C]0.4983[/C][C]0.0835[/C][C]0.9505[/C][C]0.9505[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70595&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70595&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])
4819-------
4918.1-------
5017.8-------
5121.5-------
5217.1-------
5318.7-------
5419-------
5516.4-------
5616.9-------
5718.6-------
5819.3-------
5919.4-------
6017.6-------
6118.618.911317.498920.32360.33290.96560.86990.9656
6218.118.355416.943219.76760.36150.36710.77960.8528
6320.419.984318.46421.50450.2960.99240.02530.9989
6418.119.076717.342420.8110.13480.06740.98730.9524
6519.618.295516.55420.03690.0710.58710.32440.7831
6619.919.470717.599521.34190.32650.44610.6890.975
6719.217.710515.75619.6650.06760.01410.90560.5441
6817.817.015615.029319.00180.21950.01560.54540.2821
6919.219.394417.306921.48190.42760.93280.77210.954
702219.806617.666321.94680.02230.71070.67860.9783
7121.119.493217.302421.68390.07530.01250.53320.9548
7219.519.504917.242321.76760.49830.08350.95050.9505







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0381-0.016500.096900
620.0393-0.01390.01520.06520.08110.2847
630.03880.02080.01710.17280.11170.3341
640.0464-0.05120.02560.95390.32220.5676
650.04860.07130.03471.70180.59810.7734
660.0490.0220.03260.18430.52920.7274
670.05630.08410.042.21870.77050.8778
680.05960.04610.04070.61530.75110.8667
690.0549-0.010.03730.03780.67190.8197
700.05510.11070.04474.81121.08581.042
710.05730.08240.04812.58191.22181.1054
720.0592-3e-040.044101.121.0583

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0381 & -0.0165 & 0 & 0.0969 & 0 & 0 \tabularnewline
62 & 0.0393 & -0.0139 & 0.0152 & 0.0652 & 0.0811 & 0.2847 \tabularnewline
63 & 0.0388 & 0.0208 & 0.0171 & 0.1728 & 0.1117 & 0.3341 \tabularnewline
64 & 0.0464 & -0.0512 & 0.0256 & 0.9539 & 0.3222 & 0.5676 \tabularnewline
65 & 0.0486 & 0.0713 & 0.0347 & 1.7018 & 0.5981 & 0.7734 \tabularnewline
66 & 0.049 & 0.022 & 0.0326 & 0.1843 & 0.5292 & 0.7274 \tabularnewline
67 & 0.0563 & 0.0841 & 0.04 & 2.2187 & 0.7705 & 0.8778 \tabularnewline
68 & 0.0596 & 0.0461 & 0.0407 & 0.6153 & 0.7511 & 0.8667 \tabularnewline
69 & 0.0549 & -0.01 & 0.0373 & 0.0378 & 0.6719 & 0.8197 \tabularnewline
70 & 0.0551 & 0.1107 & 0.0447 & 4.8112 & 1.0858 & 1.042 \tabularnewline
71 & 0.0573 & 0.0824 & 0.0481 & 2.5819 & 1.2218 & 1.1054 \tabularnewline
72 & 0.0592 & -3e-04 & 0.0441 & 0 & 1.12 & 1.0583 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70595&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.0381[/C][C]-0.0165[/C][C]0[/C][C]0.0969[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0393[/C][C]-0.0139[/C][C]0.0152[/C][C]0.0652[/C][C]0.0811[/C][C]0.2847[/C][/ROW]
[ROW][C]63[/C][C]0.0388[/C][C]0.0208[/C][C]0.0171[/C][C]0.1728[/C][C]0.1117[/C][C]0.3341[/C][/ROW]
[ROW][C]64[/C][C]0.0464[/C][C]-0.0512[/C][C]0.0256[/C][C]0.9539[/C][C]0.3222[/C][C]0.5676[/C][/ROW]
[ROW][C]65[/C][C]0.0486[/C][C]0.0713[/C][C]0.0347[/C][C]1.7018[/C][C]0.5981[/C][C]0.7734[/C][/ROW]
[ROW][C]66[/C][C]0.049[/C][C]0.022[/C][C]0.0326[/C][C]0.1843[/C][C]0.5292[/C][C]0.7274[/C][/ROW]
[ROW][C]67[/C][C]0.0563[/C][C]0.0841[/C][C]0.04[/C][C]2.2187[/C][C]0.7705[/C][C]0.8778[/C][/ROW]
[ROW][C]68[/C][C]0.0596[/C][C]0.0461[/C][C]0.0407[/C][C]0.6153[/C][C]0.7511[/C][C]0.8667[/C][/ROW]
[ROW][C]69[/C][C]0.0549[/C][C]-0.01[/C][C]0.0373[/C][C]0.0378[/C][C]0.6719[/C][C]0.8197[/C][/ROW]
[ROW][C]70[/C][C]0.0551[/C][C]0.1107[/C][C]0.0447[/C][C]4.8112[/C][C]1.0858[/C][C]1.042[/C][/ROW]
[ROW][C]71[/C][C]0.0573[/C][C]0.0824[/C][C]0.0481[/C][C]2.5819[/C][C]1.2218[/C][C]1.1054[/C][/ROW]
[ROW][C]72[/C][C]0.0592[/C][C]-3e-04[/C][C]0.0441[/C][C]0[/C][C]1.12[/C][C]1.0583[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70595&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70595&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.0381-0.016500.096900
620.0393-0.01390.01520.06520.08110.2847
630.03880.02080.01710.17280.11170.3341
640.0464-0.05120.02560.95390.32220.5676
650.04860.07130.03471.70180.59810.7734
660.0490.0220.03260.18430.52920.7274
670.05630.08410.042.21870.77050.8778
680.05960.04610.04070.61530.75110.8667
690.0549-0.010.03730.03780.67190.8197
700.05510.11070.04474.81121.08581.042
710.05730.08240.04812.58191.22181.1054
720.0592-3e-040.044101.121.0583



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