Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 21 Dec 2007 00:44: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/2007/Dec/21/t1198221996vsfwfim84x86fv8.htm/, Retrieved Tue, 07 May 2024 12:24:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4779, Retrieved Tue, 07 May 2024 12:24:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsvoorspelling energieprijzen
Estimated Impact254
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [forecast] [2007-12-21 07:44:35] [0eafefa7b02d47065fceb6c46f54fbf9] [Current]
-    D    [ARIMA Forecasting] [] [2008-12-18 14:29:18] [b53e8d20687f12ca59f39c9b7c3a629a]
-   PD      [ARIMA Forecasting] [cwx] [2008-12-22 14:20:27] [3e7890dd94421c9690e46ab1e7f19911]
Feedback Forum

Post a new message
Dataseries X:
104.3
103,9
103,9
103,9
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,0
108,2
112,3
111,3
111,3
115,3
117,2
118,3
118,3
118,3
119,0
120,6
122,6
122,6
127,4
125,9
121,5
118,8
121,6
122,3
122,7
120,8
120,1
120,1
120,1
120,1
128,4
129,8
129,8
128,6
128,6
133,7
130,0
125,9
129,4
129,4
130,6
130,6
130,6
130,8
129,7
125,8
126,0
125,6
125,4
124,7
126,9
129,1




Summary of compuational 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 compuational 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=4779&T=0

[TABLE]
[ROW][C]Summary of compuational 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=4779&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4779&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 compuational 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[62])
50120.1-------
51120.1-------
52120.1-------
53128.4-------
54129.8-------
55129.8-------
56128.6-------
57128.6-------
58133.7-------
59130-------
60125.9-------
61129.4-------
62129.4-------
63130.6128.8762125.3117132.44060.17160.386710.3867
64130.6129.185123.895134.4750.30.30.99960.4683
65130.6133.0302126.9166139.14370.2180.7820.93120.8778
66130.8132.6916125.7906139.59260.29560.72380.79430.8251
67129.7131.1323123.4163138.84830.3580.53360.63250.67
68125.8129.9877121.5678138.40770.16480.52670.62670.5544
69126130.9501121.902139.99820.14180.86770.69470.6315
70125.6132.3547122.707142.00240.0850.90160.39230.7258
71125.4131.6339121.4182141.84960.11580.87650.6230.6659
72124.7130.039119.2891140.78880.16520.80120.77480.5464
73126.9130.6109119.3526141.86930.25910.84830.58350.5835
74129.1130.6097118.8637142.35570.40060.7320.580.58

\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[62]) \tabularnewline
50 & 120.1 & - & - & - & - & - & - & - \tabularnewline
51 & 120.1 & - & - & - & - & - & - & - \tabularnewline
52 & 120.1 & - & - & - & - & - & - & - \tabularnewline
53 & 128.4 & - & - & - & - & - & - & - \tabularnewline
54 & 129.8 & - & - & - & - & - & - & - \tabularnewline
55 & 129.8 & - & - & - & - & - & - & - \tabularnewline
56 & 128.6 & - & - & - & - & - & - & - \tabularnewline
57 & 128.6 & - & - & - & - & - & - & - \tabularnewline
58 & 133.7 & - & - & - & - & - & - & - \tabularnewline
59 & 130 & - & - & - & - & - & - & - \tabularnewline
60 & 125.9 & - & - & - & - & - & - & - \tabularnewline
61 & 129.4 & - & - & - & - & - & - & - \tabularnewline
62 & 129.4 & - & - & - & - & - & - & - \tabularnewline
63 & 130.6 & 128.8762 & 125.3117 & 132.4406 & 0.1716 & 0.3867 & 1 & 0.3867 \tabularnewline
64 & 130.6 & 129.185 & 123.895 & 134.475 & 0.3 & 0.3 & 0.9996 & 0.4683 \tabularnewline
65 & 130.6 & 133.0302 & 126.9166 & 139.1437 & 0.218 & 0.782 & 0.9312 & 0.8778 \tabularnewline
66 & 130.8 & 132.6916 & 125.7906 & 139.5926 & 0.2956 & 0.7238 & 0.7943 & 0.8251 \tabularnewline
67 & 129.7 & 131.1323 & 123.4163 & 138.8483 & 0.358 & 0.5336 & 0.6325 & 0.67 \tabularnewline
68 & 125.8 & 129.9877 & 121.5678 & 138.4077 & 0.1648 & 0.5267 & 0.6267 & 0.5544 \tabularnewline
69 & 126 & 130.9501 & 121.902 & 139.9982 & 0.1418 & 0.8677 & 0.6947 & 0.6315 \tabularnewline
70 & 125.6 & 132.3547 & 122.707 & 142.0024 & 0.085 & 0.9016 & 0.3923 & 0.7258 \tabularnewline
71 & 125.4 & 131.6339 & 121.4182 & 141.8496 & 0.1158 & 0.8765 & 0.623 & 0.6659 \tabularnewline
72 & 124.7 & 130.039 & 119.2891 & 140.7888 & 0.1652 & 0.8012 & 0.7748 & 0.5464 \tabularnewline
73 & 126.9 & 130.6109 & 119.3526 & 141.8693 & 0.2591 & 0.8483 & 0.5835 & 0.5835 \tabularnewline
74 & 129.1 & 130.6097 & 118.8637 & 142.3557 & 0.4006 & 0.732 & 0.58 & 0.58 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4779&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[62])[/C][/ROW]
[ROW][C]50[/C][C]120.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]120.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]120.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]128.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]129.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]129.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]128.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]128.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]133.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]130[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]125.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]129.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]129.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]130.6[/C][C]128.8762[/C][C]125.3117[/C][C]132.4406[/C][C]0.1716[/C][C]0.3867[/C][C]1[/C][C]0.3867[/C][/ROW]
[ROW][C]64[/C][C]130.6[/C][C]129.185[/C][C]123.895[/C][C]134.475[/C][C]0.3[/C][C]0.3[/C][C]0.9996[/C][C]0.4683[/C][/ROW]
[ROW][C]65[/C][C]130.6[/C][C]133.0302[/C][C]126.9166[/C][C]139.1437[/C][C]0.218[/C][C]0.782[/C][C]0.9312[/C][C]0.8778[/C][/ROW]
[ROW][C]66[/C][C]130.8[/C][C]132.6916[/C][C]125.7906[/C][C]139.5926[/C][C]0.2956[/C][C]0.7238[/C][C]0.7943[/C][C]0.8251[/C][/ROW]
[ROW][C]67[/C][C]129.7[/C][C]131.1323[/C][C]123.4163[/C][C]138.8483[/C][C]0.358[/C][C]0.5336[/C][C]0.6325[/C][C]0.67[/C][/ROW]
[ROW][C]68[/C][C]125.8[/C][C]129.9877[/C][C]121.5678[/C][C]138.4077[/C][C]0.1648[/C][C]0.5267[/C][C]0.6267[/C][C]0.5544[/C][/ROW]
[ROW][C]69[/C][C]126[/C][C]130.9501[/C][C]121.902[/C][C]139.9982[/C][C]0.1418[/C][C]0.8677[/C][C]0.6947[/C][C]0.6315[/C][/ROW]
[ROW][C]70[/C][C]125.6[/C][C]132.3547[/C][C]122.707[/C][C]142.0024[/C][C]0.085[/C][C]0.9016[/C][C]0.3923[/C][C]0.7258[/C][/ROW]
[ROW][C]71[/C][C]125.4[/C][C]131.6339[/C][C]121.4182[/C][C]141.8496[/C][C]0.1158[/C][C]0.8765[/C][C]0.623[/C][C]0.6659[/C][/ROW]
[ROW][C]72[/C][C]124.7[/C][C]130.039[/C][C]119.2891[/C][C]140.7888[/C][C]0.1652[/C][C]0.8012[/C][C]0.7748[/C][C]0.5464[/C][/ROW]
[ROW][C]73[/C][C]126.9[/C][C]130.6109[/C][C]119.3526[/C][C]141.8693[/C][C]0.2591[/C][C]0.8483[/C][C]0.5835[/C][C]0.5835[/C][/ROW]
[ROW][C]74[/C][C]129.1[/C][C]130.6097[/C][C]118.8637[/C][C]142.3557[/C][C]0.4006[/C][C]0.732[/C][C]0.58[/C][C]0.58[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4779&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4779&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[62])
50120.1-------
51120.1-------
52120.1-------
53128.4-------
54129.8-------
55129.8-------
56128.6-------
57128.6-------
58133.7-------
59130-------
60125.9-------
61129.4-------
62129.4-------
63130.6128.8762125.3117132.44060.17160.386710.3867
64130.6129.185123.895134.4750.30.30.99960.4683
65130.6133.0302126.9166139.14370.2180.7820.93120.8778
66130.8132.6916125.7906139.59260.29560.72380.79430.8251
67129.7131.1323123.4163138.84830.3580.53360.63250.67
68125.8129.9877121.5678138.40770.16480.52670.62670.5544
69126130.9501121.902139.99820.14180.86770.69470.6315
70125.6132.3547122.707142.00240.0850.90160.39230.7258
71125.4131.6339121.4182141.84960.11580.87650.6230.6659
72124.7130.039119.2891140.78880.16520.80120.77480.5464
73126.9130.6109119.3526141.86930.25910.84830.58350.5835
74129.1130.6097118.8637142.35570.40060.7320.580.58







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
630.01410.01340.00112.97160.24760.4976
640.02090.0119e-042.00220.16690.4085
650.0234-0.01830.00155.90570.49210.7015
660.0265-0.01430.00123.57810.29820.5461
670.03-0.01099e-042.05140.17090.4135
680.033-0.03220.002717.53691.46141.2089
690.0353-0.03780.003224.50352.0421.429
700.0372-0.0510.004345.62653.80221.9499
710.0396-0.04740.003938.86193.23851.7996
720.0422-0.04110.003428.50442.37541.5412
730.044-0.02840.002413.7711.14761.0713
740.0459-0.01160.0012.27910.18990.4358

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
63 & 0.0141 & 0.0134 & 0.0011 & 2.9716 & 0.2476 & 0.4976 \tabularnewline
64 & 0.0209 & 0.011 & 9e-04 & 2.0022 & 0.1669 & 0.4085 \tabularnewline
65 & 0.0234 & -0.0183 & 0.0015 & 5.9057 & 0.4921 & 0.7015 \tabularnewline
66 & 0.0265 & -0.0143 & 0.0012 & 3.5781 & 0.2982 & 0.5461 \tabularnewline
67 & 0.03 & -0.0109 & 9e-04 & 2.0514 & 0.1709 & 0.4135 \tabularnewline
68 & 0.033 & -0.0322 & 0.0027 & 17.5369 & 1.4614 & 1.2089 \tabularnewline
69 & 0.0353 & -0.0378 & 0.0032 & 24.5035 & 2.042 & 1.429 \tabularnewline
70 & 0.0372 & -0.051 & 0.0043 & 45.6265 & 3.8022 & 1.9499 \tabularnewline
71 & 0.0396 & -0.0474 & 0.0039 & 38.8619 & 3.2385 & 1.7996 \tabularnewline
72 & 0.0422 & -0.0411 & 0.0034 & 28.5044 & 2.3754 & 1.5412 \tabularnewline
73 & 0.044 & -0.0284 & 0.0024 & 13.771 & 1.1476 & 1.0713 \tabularnewline
74 & 0.0459 & -0.0116 & 0.001 & 2.2791 & 0.1899 & 0.4358 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4779&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]63[/C][C]0.0141[/C][C]0.0134[/C][C]0.0011[/C][C]2.9716[/C][C]0.2476[/C][C]0.4976[/C][/ROW]
[ROW][C]64[/C][C]0.0209[/C][C]0.011[/C][C]9e-04[/C][C]2.0022[/C][C]0.1669[/C][C]0.4085[/C][/ROW]
[ROW][C]65[/C][C]0.0234[/C][C]-0.0183[/C][C]0.0015[/C][C]5.9057[/C][C]0.4921[/C][C]0.7015[/C][/ROW]
[ROW][C]66[/C][C]0.0265[/C][C]-0.0143[/C][C]0.0012[/C][C]3.5781[/C][C]0.2982[/C][C]0.5461[/C][/ROW]
[ROW][C]67[/C][C]0.03[/C][C]-0.0109[/C][C]9e-04[/C][C]2.0514[/C][C]0.1709[/C][C]0.4135[/C][/ROW]
[ROW][C]68[/C][C]0.033[/C][C]-0.0322[/C][C]0.0027[/C][C]17.5369[/C][C]1.4614[/C][C]1.2089[/C][/ROW]
[ROW][C]69[/C][C]0.0353[/C][C]-0.0378[/C][C]0.0032[/C][C]24.5035[/C][C]2.042[/C][C]1.429[/C][/ROW]
[ROW][C]70[/C][C]0.0372[/C][C]-0.051[/C][C]0.0043[/C][C]45.6265[/C][C]3.8022[/C][C]1.9499[/C][/ROW]
[ROW][C]71[/C][C]0.0396[/C][C]-0.0474[/C][C]0.0039[/C][C]38.8619[/C][C]3.2385[/C][C]1.7996[/C][/ROW]
[ROW][C]72[/C][C]0.0422[/C][C]-0.0411[/C][C]0.0034[/C][C]28.5044[/C][C]2.3754[/C][C]1.5412[/C][/ROW]
[ROW][C]73[/C][C]0.044[/C][C]-0.0284[/C][C]0.0024[/C][C]13.771[/C][C]1.1476[/C][C]1.0713[/C][/ROW]
[ROW][C]74[/C][C]0.0459[/C][C]-0.0116[/C][C]0.001[/C][C]2.2791[/C][C]0.1899[/C][C]0.4358[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4779&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4779&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
630.01410.01340.00112.97160.24760.4976
640.02090.0119e-042.00220.16690.4085
650.0234-0.01830.00155.90570.49210.7015
660.0265-0.01430.00123.57810.29820.5461
670.03-0.01099e-042.05140.17090.4135
680.033-0.03220.002717.53691.46141.2089
690.0353-0.03780.003224.50352.0421.429
700.0372-0.0510.004345.62653.80221.9499
710.0396-0.04740.003938.86193.23851.7996
720.0422-0.04110.003428.50442.37541.5412
730.044-0.02840.002413.7711.14761.0713
740.0459-0.01160.0012.27910.18990.4358



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