Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 21 Jan 2008 13:12: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/2008/Jan/21/t12009459960v6xh25w0fa2jaf.htm/, Retrieved Wed, 15 May 2024 14:57:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=8043, Retrieved Wed, 15 May 2024 14:57:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsKlaas Van Pelt
Estimated Impact315
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecasting] [2008-01-21 20:12:35] [6abd901c2e17b7d5559c695bbff3d863] [Current]
Feedback Forum

Post a new message
Dataseries X:
92,1
91,4
90,7
92,5
94,4
94,3
87,3
85,9
89
83,3
78,6
75,7
79,6
78,5
82,6
88,7
88,5
84,6
83,4
84,4
94,1
100,4
93,1
93,1
82,1
88,1
87,7
80,2
73,8
75,3
77,3
80,1
81,3
81,5
83,2
80,8
81,3
78,8
82,8
84,9
93,2
94,7
94,8
103,9
107
118,6
112,2
112,2
93,8
96,7
108,7
112,1
107,2
113,1
120
124,4
139,5
145,8
135,6
135,5
141,6
141,2
141,6
147,1
146,5
144,1
148,5
146,9
135,7
128,5
128,7
127,6
122,5
123,4
129,4
135,3
138,5
140,6
144,2
144,3




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=8043&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=8043&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8043&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[68])
56124.4-------
57139.5-------
58145.8-------
59135.6-------
60135.5-------
61141.6-------
62141.2-------
63141.6-------
64147.1-------
65146.5-------
66144.1-------
67148.5-------
68146.9-------
69135.7148.3623137.8923158.83230.00890.60790.95140.6079
70128.5152.5893137.7825167.39617e-040.98730.81560.7743
71128.7150.0904131.9558168.2250.01040.99020.94130.6349
72127.6150.0879129.1479171.02790.01770.97740.91390.6173
73122.5143.7822120.3706167.19390.03740.91230.57250.397
74123.4144.79119.1438170.43620.05110.95580.60810.4359
75129.4149.011121.31176.7120.08260.9650.70.5594
76135.3150.3405120.7269179.95420.15980.91710.58490.5901
77138.5148.6061117.1961180.01610.26410.79680.55230.5424
78140.6150.617117.508183.72610.27660.76340.65020.5871
79144.2153.1475118.4225187.87260.30680.76060.60350.6378
80144.3154.6519118.3828190.92110.28790.71390.66240.6624

\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 & 124.4 & - & - & - & - & - & - & - \tabularnewline
57 & 139.5 & - & - & - & - & - & - & - \tabularnewline
58 & 145.8 & - & - & - & - & - & - & - \tabularnewline
59 & 135.6 & - & - & - & - & - & - & - \tabularnewline
60 & 135.5 & - & - & - & - & - & - & - \tabularnewline
61 & 141.6 & - & - & - & - & - & - & - \tabularnewline
62 & 141.2 & - & - & - & - & - & - & - \tabularnewline
63 & 141.6 & - & - & - & - & - & - & - \tabularnewline
64 & 147.1 & - & - & - & - & - & - & - \tabularnewline
65 & 146.5 & - & - & - & - & - & - & - \tabularnewline
66 & 144.1 & - & - & - & - & - & - & - \tabularnewline
67 & 148.5 & - & - & - & - & - & - & - \tabularnewline
68 & 146.9 & - & - & - & - & - & - & - \tabularnewline
69 & 135.7 & 148.3623 & 137.8923 & 158.8323 & 0.0089 & 0.6079 & 0.9514 & 0.6079 \tabularnewline
70 & 128.5 & 152.5893 & 137.7825 & 167.3961 & 7e-04 & 0.9873 & 0.8156 & 0.7743 \tabularnewline
71 & 128.7 & 150.0904 & 131.9558 & 168.225 & 0.0104 & 0.9902 & 0.9413 & 0.6349 \tabularnewline
72 & 127.6 & 150.0879 & 129.1479 & 171.0279 & 0.0177 & 0.9774 & 0.9139 & 0.6173 \tabularnewline
73 & 122.5 & 143.7822 & 120.3706 & 167.1939 & 0.0374 & 0.9123 & 0.5725 & 0.397 \tabularnewline
74 & 123.4 & 144.79 & 119.1438 & 170.4362 & 0.0511 & 0.9558 & 0.6081 & 0.4359 \tabularnewline
75 & 129.4 & 149.011 & 121.31 & 176.712 & 0.0826 & 0.965 & 0.7 & 0.5594 \tabularnewline
76 & 135.3 & 150.3405 & 120.7269 & 179.9542 & 0.1598 & 0.9171 & 0.5849 & 0.5901 \tabularnewline
77 & 138.5 & 148.6061 & 117.1961 & 180.0161 & 0.2641 & 0.7968 & 0.5523 & 0.5424 \tabularnewline
78 & 140.6 & 150.617 & 117.508 & 183.7261 & 0.2766 & 0.7634 & 0.6502 & 0.5871 \tabularnewline
79 & 144.2 & 153.1475 & 118.4225 & 187.8726 & 0.3068 & 0.7606 & 0.6035 & 0.6378 \tabularnewline
80 & 144.3 & 154.6519 & 118.3828 & 190.9211 & 0.2879 & 0.7139 & 0.6624 & 0.6624 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8043&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]124.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]139.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]145.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]135.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]135.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]141.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]141.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]141.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]147.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]146.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]144.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]148.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]146.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]135.7[/C][C]148.3623[/C][C]137.8923[/C][C]158.8323[/C][C]0.0089[/C][C]0.6079[/C][C]0.9514[/C][C]0.6079[/C][/ROW]
[ROW][C]70[/C][C]128.5[/C][C]152.5893[/C][C]137.7825[/C][C]167.3961[/C][C]7e-04[/C][C]0.9873[/C][C]0.8156[/C][C]0.7743[/C][/ROW]
[ROW][C]71[/C][C]128.7[/C][C]150.0904[/C][C]131.9558[/C][C]168.225[/C][C]0.0104[/C][C]0.9902[/C][C]0.9413[/C][C]0.6349[/C][/ROW]
[ROW][C]72[/C][C]127.6[/C][C]150.0879[/C][C]129.1479[/C][C]171.0279[/C][C]0.0177[/C][C]0.9774[/C][C]0.9139[/C][C]0.6173[/C][/ROW]
[ROW][C]73[/C][C]122.5[/C][C]143.7822[/C][C]120.3706[/C][C]167.1939[/C][C]0.0374[/C][C]0.9123[/C][C]0.5725[/C][C]0.397[/C][/ROW]
[ROW][C]74[/C][C]123.4[/C][C]144.79[/C][C]119.1438[/C][C]170.4362[/C][C]0.0511[/C][C]0.9558[/C][C]0.6081[/C][C]0.4359[/C][/ROW]
[ROW][C]75[/C][C]129.4[/C][C]149.011[/C][C]121.31[/C][C]176.712[/C][C]0.0826[/C][C]0.965[/C][C]0.7[/C][C]0.5594[/C][/ROW]
[ROW][C]76[/C][C]135.3[/C][C]150.3405[/C][C]120.7269[/C][C]179.9542[/C][C]0.1598[/C][C]0.9171[/C][C]0.5849[/C][C]0.5901[/C][/ROW]
[ROW][C]77[/C][C]138.5[/C][C]148.6061[/C][C]117.1961[/C][C]180.0161[/C][C]0.2641[/C][C]0.7968[/C][C]0.5523[/C][C]0.5424[/C][/ROW]
[ROW][C]78[/C][C]140.6[/C][C]150.617[/C][C]117.508[/C][C]183.7261[/C][C]0.2766[/C][C]0.7634[/C][C]0.6502[/C][C]0.5871[/C][/ROW]
[ROW][C]79[/C][C]144.2[/C][C]153.1475[/C][C]118.4225[/C][C]187.8726[/C][C]0.3068[/C][C]0.7606[/C][C]0.6035[/C][C]0.6378[/C][/ROW]
[ROW][C]80[/C][C]144.3[/C][C]154.6519[/C][C]118.3828[/C][C]190.9211[/C][C]0.2879[/C][C]0.7139[/C][C]0.6624[/C][C]0.6624[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8043&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8043&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])
56124.4-------
57139.5-------
58145.8-------
59135.6-------
60135.5-------
61141.6-------
62141.2-------
63141.6-------
64147.1-------
65146.5-------
66144.1-------
67148.5-------
68146.9-------
69135.7148.3623137.8923158.83230.00890.60790.95140.6079
70128.5152.5893137.7825167.39617e-040.98730.81560.7743
71128.7150.0904131.9558168.2250.01040.99020.94130.6349
72127.6150.0879129.1479171.02790.01770.97740.91390.6173
73122.5143.7822120.3706167.19390.03740.91230.57250.397
74123.4144.79119.1438170.43620.05110.95580.60810.4359
75129.4149.011121.31176.7120.08260.9650.70.5594
76135.3150.3405120.7269179.95420.15980.91710.58490.5901
77138.5148.6061117.1961180.01610.26410.79680.55230.5424
78140.6150.617117.508183.72610.27660.76340.65020.5871
79144.2153.1475118.4225187.87260.30680.76060.60350.6378
80144.3154.6519118.3828190.92110.28790.71390.66240.6624







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.036-0.08530.0071160.334713.36123.6553
700.0495-0.15790.0132580.293148.35786.954
710.0616-0.14250.0119457.549838.12916.1749
720.0712-0.14980.0125505.707142.14236.4917
730.0831-0.1480.0123452.933637.74456.1437
740.0904-0.14770.0123457.531738.12766.1748
750.0948-0.13160.011384.590632.04925.6612
760.1005-0.10.0083226.217118.85144.3418
770.1078-0.0680.0057102.13368.51112.9174
780.1122-0.06650.0055100.34118.36182.8917
790.1157-0.05840.004980.05826.67152.5829
800.1197-0.06690.0056107.16198.93022.9883

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.036 & -0.0853 & 0.0071 & 160.3347 & 13.3612 & 3.6553 \tabularnewline
70 & 0.0495 & -0.1579 & 0.0132 & 580.2931 & 48.3578 & 6.954 \tabularnewline
71 & 0.0616 & -0.1425 & 0.0119 & 457.5498 & 38.1291 & 6.1749 \tabularnewline
72 & 0.0712 & -0.1498 & 0.0125 & 505.7071 & 42.1423 & 6.4917 \tabularnewline
73 & 0.0831 & -0.148 & 0.0123 & 452.9336 & 37.7445 & 6.1437 \tabularnewline
74 & 0.0904 & -0.1477 & 0.0123 & 457.5317 & 38.1276 & 6.1748 \tabularnewline
75 & 0.0948 & -0.1316 & 0.011 & 384.5906 & 32.0492 & 5.6612 \tabularnewline
76 & 0.1005 & -0.1 & 0.0083 & 226.2171 & 18.8514 & 4.3418 \tabularnewline
77 & 0.1078 & -0.068 & 0.0057 & 102.1336 & 8.5111 & 2.9174 \tabularnewline
78 & 0.1122 & -0.0665 & 0.0055 & 100.3411 & 8.3618 & 2.8917 \tabularnewline
79 & 0.1157 & -0.0584 & 0.0049 & 80.0582 & 6.6715 & 2.5829 \tabularnewline
80 & 0.1197 & -0.0669 & 0.0056 & 107.1619 & 8.9302 & 2.9883 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8043&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.036[/C][C]-0.0853[/C][C]0.0071[/C][C]160.3347[/C][C]13.3612[/C][C]3.6553[/C][/ROW]
[ROW][C]70[/C][C]0.0495[/C][C]-0.1579[/C][C]0.0132[/C][C]580.2931[/C][C]48.3578[/C][C]6.954[/C][/ROW]
[ROW][C]71[/C][C]0.0616[/C][C]-0.1425[/C][C]0.0119[/C][C]457.5498[/C][C]38.1291[/C][C]6.1749[/C][/ROW]
[ROW][C]72[/C][C]0.0712[/C][C]-0.1498[/C][C]0.0125[/C][C]505.7071[/C][C]42.1423[/C][C]6.4917[/C][/ROW]
[ROW][C]73[/C][C]0.0831[/C][C]-0.148[/C][C]0.0123[/C][C]452.9336[/C][C]37.7445[/C][C]6.1437[/C][/ROW]
[ROW][C]74[/C][C]0.0904[/C][C]-0.1477[/C][C]0.0123[/C][C]457.5317[/C][C]38.1276[/C][C]6.1748[/C][/ROW]
[ROW][C]75[/C][C]0.0948[/C][C]-0.1316[/C][C]0.011[/C][C]384.5906[/C][C]32.0492[/C][C]5.6612[/C][/ROW]
[ROW][C]76[/C][C]0.1005[/C][C]-0.1[/C][C]0.0083[/C][C]226.2171[/C][C]18.8514[/C][C]4.3418[/C][/ROW]
[ROW][C]77[/C][C]0.1078[/C][C]-0.068[/C][C]0.0057[/C][C]102.1336[/C][C]8.5111[/C][C]2.9174[/C][/ROW]
[ROW][C]78[/C][C]0.1122[/C][C]-0.0665[/C][C]0.0055[/C][C]100.3411[/C][C]8.3618[/C][C]2.8917[/C][/ROW]
[ROW][C]79[/C][C]0.1157[/C][C]-0.0584[/C][C]0.0049[/C][C]80.0582[/C][C]6.6715[/C][C]2.5829[/C][/ROW]
[ROW][C]80[/C][C]0.1197[/C][C]-0.0669[/C][C]0.0056[/C][C]107.1619[/C][C]8.9302[/C][C]2.9883[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8043&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8043&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.036-0.08530.0071160.334713.36123.6553
700.0495-0.15790.0132580.293148.35786.954
710.0616-0.14250.0119457.549838.12916.1749
720.0712-0.14980.0125505.707142.14236.4917
730.0831-0.1480.0123452.933637.74456.1437
740.0904-0.14770.0123457.531738.12766.1748
750.0948-0.13160.011384.590632.04925.6612
760.1005-0.10.0083226.217118.85144.3418
770.1078-0.0680.0057102.13368.51112.9174
780.1122-0.06650.0055100.34118.36182.8917
790.1157-0.05840.004980.05826.67152.5829
800.1197-0.06690.0056107.16198.93022.9883



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