Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 14:57:39 -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/06/t11969775053h8zlmywfbcyxus.htm/, Retrieved Fri, 03 May 2024 13:09:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2719, Retrieved Fri, 03 May 2024 13:09:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsQ2
Estimated Impact183
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Workshop 9] [2007-12-06 15:20:17] [f81c4b4291ee281ef6aecc24130e11e7]
-   PD    [ARIMA Forecasting] [Q2] [2007-12-06 21:57:39] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
97,3
101
113,2
101
105,7
113,9
86,4
96,5
103,3
114,9
105,8
94,2
98,4
99,4
108,8
112,6
104,4
112,2
81,1
97,1
112,6
113,8
107,8
103,2
103,3
101,2
107,7
110,4
101,9
115,9
89,9
88,6
117,2
123,9
100
103,6
94,1
98,7
119,5
112,7
104,4
124,7
89,1
97
121,6
118,8
114
111,5
97,2
102,5
113,4
109,8
104,9
126,1
80
96,8
117,2
112,3
117,3
111,1
102,2
104,3
122,9
107,6
121,3
131,5
89
104,4
128,9
135,9
133,3
121,3
120,5
120,4
137,9
126,1
133,2
146,6
103,4
117,2




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 4 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2719&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2719&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2719&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 time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9124.243113.2121136.34870.22540.99930.87290.9993
70135.9122.7253111.8245134.68880.01540.15590.95620.9987
71133.3117.0839106.5229128.6920.00317e-040.48540.9839
72121.3111.5707100.1792124.25750.06644e-040.5290.866
73120.5100.182289.9535111.5742e-041e-040.36420.234
74120.4105.978695.0027118.22260.01050.010.60590.5998
75137.9120.5303107.6501134.95160.00910.50710.37370.9858
76126.1112.9327100.8617126.44840.02811e-040.78030.892
77133.2111.765399.7103125.27799e-040.01880.08330.8573
78146.6128.875114.8436144.62080.01370.29520.37190.9988
79103.487.17977.682597.83650.001400.36898e-04
80117.2100.558689.5516112.91860.00420.32610.27120.2712

\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[68]) \tabularnewline
56 & 96.8 & - & - & - & - & - & - & - \tabularnewline
57 & 117.2 & - & - & - & - & - & - & - \tabularnewline
58 & 112.3 & - & - & - & - & - & - & - \tabularnewline
59 & 117.3 & - & - & - & - & - & - & - \tabularnewline
60 & 111.1 & - & - & - & - & - & - & - \tabularnewline
61 & 102.2 & - & - & - & - & - & - & - \tabularnewline
62 & 104.3 & - & - & - & - & - & - & - \tabularnewline
63 & 122.9 & - & - & - & - & - & - & - \tabularnewline
64 & 107.6 & - & - & - & - & - & - & - \tabularnewline
65 & 121.3 & - & - & - & - & - & - & - \tabularnewline
66 & 131.5 & - & - & - & - & - & - & - \tabularnewline
67 & 89 & - & - & - & - & - & - & - \tabularnewline
68 & 104.4 & - & - & - & - & - & - & - \tabularnewline
69 & 128.9 & 124.243 & 113.2121 & 136.3487 & 0.2254 & 0.9993 & 0.8729 & 0.9993 \tabularnewline
70 & 135.9 & 122.7253 & 111.8245 & 134.6888 & 0.0154 & 0.1559 & 0.9562 & 0.9987 \tabularnewline
71 & 133.3 & 117.0839 & 106.5229 & 128.692 & 0.0031 & 7e-04 & 0.4854 & 0.9839 \tabularnewline
72 & 121.3 & 111.5707 & 100.1792 & 124.2575 & 0.0664 & 4e-04 & 0.529 & 0.866 \tabularnewline
73 & 120.5 & 100.1822 & 89.9535 & 111.574 & 2e-04 & 1e-04 & 0.3642 & 0.234 \tabularnewline
74 & 120.4 & 105.9786 & 95.0027 & 118.2226 & 0.0105 & 0.01 & 0.6059 & 0.5998 \tabularnewline
75 & 137.9 & 120.5303 & 107.6501 & 134.9516 & 0.0091 & 0.5071 & 0.3737 & 0.9858 \tabularnewline
76 & 126.1 & 112.9327 & 100.8617 & 126.4484 & 0.0281 & 1e-04 & 0.7803 & 0.892 \tabularnewline
77 & 133.2 & 111.7653 & 99.7103 & 125.2779 & 9e-04 & 0.0188 & 0.0833 & 0.8573 \tabularnewline
78 & 146.6 & 128.875 & 114.8436 & 144.6208 & 0.0137 & 0.2952 & 0.3719 & 0.9988 \tabularnewline
79 & 103.4 & 87.179 & 77.6825 & 97.8365 & 0.0014 & 0 & 0.3689 & 8e-04 \tabularnewline
80 & 117.2 & 100.5586 & 89.5516 & 112.9186 & 0.0042 & 0.3261 & 0.2712 & 0.2712 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2719&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[68])[/C][/ROW]
[ROW][C]56[/C][C]96.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]112.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]122.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]107.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]121.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]131.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]128.9[/C][C]124.243[/C][C]113.2121[/C][C]136.3487[/C][C]0.2254[/C][C]0.9993[/C][C]0.8729[/C][C]0.9993[/C][/ROW]
[ROW][C]70[/C][C]135.9[/C][C]122.7253[/C][C]111.8245[/C][C]134.6888[/C][C]0.0154[/C][C]0.1559[/C][C]0.9562[/C][C]0.9987[/C][/ROW]
[ROW][C]71[/C][C]133.3[/C][C]117.0839[/C][C]106.5229[/C][C]128.692[/C][C]0.0031[/C][C]7e-04[/C][C]0.4854[/C][C]0.9839[/C][/ROW]
[ROW][C]72[/C][C]121.3[/C][C]111.5707[/C][C]100.1792[/C][C]124.2575[/C][C]0.0664[/C][C]4e-04[/C][C]0.529[/C][C]0.866[/C][/ROW]
[ROW][C]73[/C][C]120.5[/C][C]100.1822[/C][C]89.9535[/C][C]111.574[/C][C]2e-04[/C][C]1e-04[/C][C]0.3642[/C][C]0.234[/C][/ROW]
[ROW][C]74[/C][C]120.4[/C][C]105.9786[/C][C]95.0027[/C][C]118.2226[/C][C]0.0105[/C][C]0.01[/C][C]0.6059[/C][C]0.5998[/C][/ROW]
[ROW][C]75[/C][C]137.9[/C][C]120.5303[/C][C]107.6501[/C][C]134.9516[/C][C]0.0091[/C][C]0.5071[/C][C]0.3737[/C][C]0.9858[/C][/ROW]
[ROW][C]76[/C][C]126.1[/C][C]112.9327[/C][C]100.8617[/C][C]126.4484[/C][C]0.0281[/C][C]1e-04[/C][C]0.7803[/C][C]0.892[/C][/ROW]
[ROW][C]77[/C][C]133.2[/C][C]111.7653[/C][C]99.7103[/C][C]125.2779[/C][C]9e-04[/C][C]0.0188[/C][C]0.0833[/C][C]0.8573[/C][/ROW]
[ROW][C]78[/C][C]146.6[/C][C]128.875[/C][C]114.8436[/C][C]144.6208[/C][C]0.0137[/C][C]0.2952[/C][C]0.3719[/C][C]0.9988[/C][/ROW]
[ROW][C]79[/C][C]103.4[/C][C]87.179[/C][C]77.6825[/C][C]97.8365[/C][C]0.0014[/C][C]0[/C][C]0.3689[/C][C]8e-04[/C][/ROW]
[ROW][C]80[/C][C]117.2[/C][C]100.5586[/C][C]89.5516[/C][C]112.9186[/C][C]0.0042[/C][C]0.3261[/C][C]0.2712[/C][C]0.2712[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2719&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2719&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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9124.243113.2121136.34870.22540.99930.87290.9993
70135.9122.7253111.8245134.68880.01540.15590.95620.9987
71133.3117.0839106.5229128.6920.00317e-040.48540.9839
72121.3111.5707100.1792124.25750.06644e-040.5290.866
73120.5100.182289.9535111.5742e-041e-040.36420.234
74120.4105.978695.0027118.22260.01050.010.60590.5998
75137.9120.5303107.6501134.95160.00910.50710.37370.9858
76126.1112.9327100.8617126.44840.02811e-040.78030.892
77133.2111.765399.7103125.27799e-040.01880.08330.8573
78146.6128.875114.8436144.62080.01370.29520.37190.9988
79103.487.17977.682597.83650.001400.36898e-04
80117.2100.558689.5516112.91860.00420.32610.27120.2712







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.04970.03750.003121.68791.80731.3444
700.04970.10740.0089173.572814.46443.8032
710.05060.13850.0115262.962221.91354.6812
720.0580.08720.007394.65977.88832.8086
730.0580.20280.0169412.812834.40115.8652
740.05890.13610.0113207.976717.33144.1631
750.0610.14410.012301.705625.14215.0142
760.06110.11660.0097173.37814.44823.8011
770.06170.19180.016459.444438.2876.1877
780.06230.13750.0115314.174826.18125.1168
790.06240.18610.0155263.119621.92664.6826
800.06270.16550.0138276.935923.0784.804

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0497 & 0.0375 & 0.0031 & 21.6879 & 1.8073 & 1.3444 \tabularnewline
70 & 0.0497 & 0.1074 & 0.0089 & 173.5728 & 14.4644 & 3.8032 \tabularnewline
71 & 0.0506 & 0.1385 & 0.0115 & 262.9622 & 21.9135 & 4.6812 \tabularnewline
72 & 0.058 & 0.0872 & 0.0073 & 94.6597 & 7.8883 & 2.8086 \tabularnewline
73 & 0.058 & 0.2028 & 0.0169 & 412.8128 & 34.4011 & 5.8652 \tabularnewline
74 & 0.0589 & 0.1361 & 0.0113 & 207.9767 & 17.3314 & 4.1631 \tabularnewline
75 & 0.061 & 0.1441 & 0.012 & 301.7056 & 25.1421 & 5.0142 \tabularnewline
76 & 0.0611 & 0.1166 & 0.0097 & 173.378 & 14.4482 & 3.8011 \tabularnewline
77 & 0.0617 & 0.1918 & 0.016 & 459.4444 & 38.287 & 6.1877 \tabularnewline
78 & 0.0623 & 0.1375 & 0.0115 & 314.1748 & 26.1812 & 5.1168 \tabularnewline
79 & 0.0624 & 0.1861 & 0.0155 & 263.1196 & 21.9266 & 4.6826 \tabularnewline
80 & 0.0627 & 0.1655 & 0.0138 & 276.9359 & 23.078 & 4.804 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2719&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]69[/C][C]0.0497[/C][C]0.0375[/C][C]0.0031[/C][C]21.6879[/C][C]1.8073[/C][C]1.3444[/C][/ROW]
[ROW][C]70[/C][C]0.0497[/C][C]0.1074[/C][C]0.0089[/C][C]173.5728[/C][C]14.4644[/C][C]3.8032[/C][/ROW]
[ROW][C]71[/C][C]0.0506[/C][C]0.1385[/C][C]0.0115[/C][C]262.9622[/C][C]21.9135[/C][C]4.6812[/C][/ROW]
[ROW][C]72[/C][C]0.058[/C][C]0.0872[/C][C]0.0073[/C][C]94.6597[/C][C]7.8883[/C][C]2.8086[/C][/ROW]
[ROW][C]73[/C][C]0.058[/C][C]0.2028[/C][C]0.0169[/C][C]412.8128[/C][C]34.4011[/C][C]5.8652[/C][/ROW]
[ROW][C]74[/C][C]0.0589[/C][C]0.1361[/C][C]0.0113[/C][C]207.9767[/C][C]17.3314[/C][C]4.1631[/C][/ROW]
[ROW][C]75[/C][C]0.061[/C][C]0.1441[/C][C]0.012[/C][C]301.7056[/C][C]25.1421[/C][C]5.0142[/C][/ROW]
[ROW][C]76[/C][C]0.0611[/C][C]0.1166[/C][C]0.0097[/C][C]173.378[/C][C]14.4482[/C][C]3.8011[/C][/ROW]
[ROW][C]77[/C][C]0.0617[/C][C]0.1918[/C][C]0.016[/C][C]459.4444[/C][C]38.287[/C][C]6.1877[/C][/ROW]
[ROW][C]78[/C][C]0.0623[/C][C]0.1375[/C][C]0.0115[/C][C]314.1748[/C][C]26.1812[/C][C]5.1168[/C][/ROW]
[ROW][C]79[/C][C]0.0624[/C][C]0.1861[/C][C]0.0155[/C][C]263.1196[/C][C]21.9266[/C][C]4.6826[/C][/ROW]
[ROW][C]80[/C][C]0.0627[/C][C]0.1655[/C][C]0.0138[/C][C]276.9359[/C][C]23.078[/C][C]4.804[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2719&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2719&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
690.04970.03750.003121.68791.80731.3444
700.04970.10740.0089173.572814.46443.8032
710.05060.13850.0115262.962221.91354.6812
720.0580.08720.007394.65977.88832.8086
730.0580.20280.0169412.812834.40115.8652
740.05890.13610.0113207.976717.33144.1631
750.0610.14410.012301.705625.14215.0142
760.06110.11660.0097173.37814.44823.8011
770.06170.19180.016459.444438.2876.1877
780.06230.13750.0115314.174826.18125.1168
790.06240.18610.0155263.119621.92664.6826
800.06270.16550.0138276.935923.0784.804



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