Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 14 Dec 2008 07:33:08 -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/Dec/14/t1229265441ej05ktqvj07zlam.htm/, Retrieved Thu, 16 May 2024 00:03:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33398, Retrieved Thu, 16 May 2024 00:03:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact158
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [step 1] [2008-12-14 14:33:08] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
6340,5
7901,5
8191,1
7181,7
7594,4
7384,7
7876,7
8463,4
8317,2
7778,7
8532,8
7272,2
6680,1
8427,6
8752,8
7952,7
8694,3
7787
8474,2
9154,7
8557,2
7951,1
9156,7
7865,7
7337,4
9131,7
8814,6
8598,8
8439,6
7451,8
8016,2
9544,1
8270,7
8102,2
9369
7657,7
7816,6
9391,3
9445,4
9533,1
10068,7
8955,5
10423,9
11617,2
9391,1
10872
10230,4
9221
9428,6
10934,5
10986
11724,6
11180,9
11163,2
11240,9
12107,1
10762,3
11340,4
11266,8
9542,7
9227,7
10571,9
10774,4
10392,8
9920,2
9884,9
10174,5
11395,4
10760,2
10570,1
10536
9902,6
8889
10837,3
11624,1
10509
10984,9
10649,1
10855,7
11677,4
10760,2
10046,2
10772,8
9987,7
8638,7
11063,7
11855,7
10684,5
11337,4
10478
11123,9
12909,3
11339,9
10462,2
12733,5
10519,2
10414,9
12476,8
12384,6
12266,7
12919,9
11497,3
12142
13919,4
12656,8
12034,1
13199,7
10881,3
11301,2
13643,9
12517
13981,1
14275,7
13435
13565,7
16216,3
12970
14079,9
14235
12213,4
12581




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33398&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' @ 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[109])
9710414.9-------
9812476.8-------
9912384.6-------
10012266.7-------
10112919.9-------
10211497.3-------
10312142-------
10413919.4-------
10512656.8-------
10612034.1-------
10713199.7-------
10810881.3-------
10911301.2-------
11013643.90-19761.769819761.76980.0880.13120.1080.1312
111125170-19761.769819761.76980.10720.0880.10970.1312
11213981.10-19761.769819761.76980.08280.10720.11190.1312
11314275.70-19761.769819761.76980.07840.08280.10.1312
114134350-19761.769819761.76980.09130.07840.12710.1312
11513565.70-19761.769819761.76980.08920.09130.11420.1312
11616216.30-19761.769819761.76980.05390.08920.08370.1312
117129700-19761.769819761.76980.09920.05390.10470.1312
11814079.90-19761.769819761.76980.08130.09920.11630.1312
119142350-19761.769819761.76980.0790.08130.09520.1312
12012213.40-19761.769819761.76980.11290.0790.14020.1312
121125810-19761.769819761.76980.10610.11290.13120.1312

\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[109]) \tabularnewline
97 & 10414.9 & - & - & - & - & - & - & - \tabularnewline
98 & 12476.8 & - & - & - & - & - & - & - \tabularnewline
99 & 12384.6 & - & - & - & - & - & - & - \tabularnewline
100 & 12266.7 & - & - & - & - & - & - & - \tabularnewline
101 & 12919.9 & - & - & - & - & - & - & - \tabularnewline
102 & 11497.3 & - & - & - & - & - & - & - \tabularnewline
103 & 12142 & - & - & - & - & - & - & - \tabularnewline
104 & 13919.4 & - & - & - & - & - & - & - \tabularnewline
105 & 12656.8 & - & - & - & - & - & - & - \tabularnewline
106 & 12034.1 & - & - & - & - & - & - & - \tabularnewline
107 & 13199.7 & - & - & - & - & - & - & - \tabularnewline
108 & 10881.3 & - & - & - & - & - & - & - \tabularnewline
109 & 11301.2 & - & - & - & - & - & - & - \tabularnewline
110 & 13643.9 & 0 & -19761.7698 & 19761.7698 & 0.088 & 0.1312 & 0.108 & 0.1312 \tabularnewline
111 & 12517 & 0 & -19761.7698 & 19761.7698 & 0.1072 & 0.088 & 0.1097 & 0.1312 \tabularnewline
112 & 13981.1 & 0 & -19761.7698 & 19761.7698 & 0.0828 & 0.1072 & 0.1119 & 0.1312 \tabularnewline
113 & 14275.7 & 0 & -19761.7698 & 19761.7698 & 0.0784 & 0.0828 & 0.1 & 0.1312 \tabularnewline
114 & 13435 & 0 & -19761.7698 & 19761.7698 & 0.0913 & 0.0784 & 0.1271 & 0.1312 \tabularnewline
115 & 13565.7 & 0 & -19761.7698 & 19761.7698 & 0.0892 & 0.0913 & 0.1142 & 0.1312 \tabularnewline
116 & 16216.3 & 0 & -19761.7698 & 19761.7698 & 0.0539 & 0.0892 & 0.0837 & 0.1312 \tabularnewline
117 & 12970 & 0 & -19761.7698 & 19761.7698 & 0.0992 & 0.0539 & 0.1047 & 0.1312 \tabularnewline
118 & 14079.9 & 0 & -19761.7698 & 19761.7698 & 0.0813 & 0.0992 & 0.1163 & 0.1312 \tabularnewline
119 & 14235 & 0 & -19761.7698 & 19761.7698 & 0.079 & 0.0813 & 0.0952 & 0.1312 \tabularnewline
120 & 12213.4 & 0 & -19761.7698 & 19761.7698 & 0.1129 & 0.079 & 0.1402 & 0.1312 \tabularnewline
121 & 12581 & 0 & -19761.7698 & 19761.7698 & 0.1061 & 0.1129 & 0.1312 & 0.1312 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33398&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[109])[/C][/ROW]
[ROW][C]97[/C][C]10414.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]12476.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]12384.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]12266.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]12919.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]11497.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]12142[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]13919.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]12656.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]12034.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]13199.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]10881.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]11301.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]13643.9[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.088[/C][C]0.1312[/C][C]0.108[/C][C]0.1312[/C][/ROW]
[ROW][C]111[/C][C]12517[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.1072[/C][C]0.088[/C][C]0.1097[/C][C]0.1312[/C][/ROW]
[ROW][C]112[/C][C]13981.1[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0828[/C][C]0.1072[/C][C]0.1119[/C][C]0.1312[/C][/ROW]
[ROW][C]113[/C][C]14275.7[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0784[/C][C]0.0828[/C][C]0.1[/C][C]0.1312[/C][/ROW]
[ROW][C]114[/C][C]13435[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0913[/C][C]0.0784[/C][C]0.1271[/C][C]0.1312[/C][/ROW]
[ROW][C]115[/C][C]13565.7[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0892[/C][C]0.0913[/C][C]0.1142[/C][C]0.1312[/C][/ROW]
[ROW][C]116[/C][C]16216.3[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0539[/C][C]0.0892[/C][C]0.0837[/C][C]0.1312[/C][/ROW]
[ROW][C]117[/C][C]12970[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0992[/C][C]0.0539[/C][C]0.1047[/C][C]0.1312[/C][/ROW]
[ROW][C]118[/C][C]14079.9[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.0813[/C][C]0.0992[/C][C]0.1163[/C][C]0.1312[/C][/ROW]
[ROW][C]119[/C][C]14235[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.079[/C][C]0.0813[/C][C]0.0952[/C][C]0.1312[/C][/ROW]
[ROW][C]120[/C][C]12213.4[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.1129[/C][C]0.079[/C][C]0.1402[/C][C]0.1312[/C][/ROW]
[ROW][C]121[/C][C]12581[/C][C]0[/C][C]-19761.7698[/C][C]19761.7698[/C][C]0.1061[/C][C]0.1129[/C][C]0.1312[/C][C]0.1312[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33398&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33398&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[109])
9710414.9-------
9812476.8-------
9912384.6-------
10012266.7-------
10112919.9-------
10211497.3-------
10312142-------
10413919.4-------
10512656.8-------
10612034.1-------
10713199.7-------
10810881.3-------
10911301.2-------
11013643.90-19761.769819761.76980.0880.13120.1080.1312
111125170-19761.769819761.76980.10720.0880.10970.1312
11213981.10-19761.769819761.76980.08280.10720.11190.1312
11314275.70-19761.769819761.76980.07840.08280.10.1312
114134350-19761.769819761.76980.09130.07840.12710.1312
11513565.70-19761.769819761.76980.08920.09130.11420.1312
11616216.30-19761.769819761.76980.05390.08920.08370.1312
117129700-19761.769819761.76980.09920.05390.10470.1312
11814079.90-19761.769819761.76980.08130.09920.11630.1312
119142350-19761.769819761.76980.0790.08130.09520.1312
12012213.40-19761.769819761.76980.11290.0790.14020.1312
121125810-19761.769819761.76980.10610.11290.13120.1312







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
110InfInfInf186156007.2115513000.60083938.6547
111InfInfInf15667528913056274.08333613.3467
112InfInfInf195471157.2116289263.10084035.9959
113InfInfInf203795610.4916982967.54084121.0396
114InfInfInf18049922515041602.08333878.3504
115InfInfInf184028216.4915335684.70753916.0803
116InfInfInf262968385.6921914032.14084681.2426
117InfInfInf16822090014018408.33333744.1165
118InfInfInf198243584.0116520298.66754064.517
119InfInfInf20263522516886268.754109.2905
120InfInfInf149167139.5612430594.96333525.7049
121InfInfInf15828156113190130.08333631.8219

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
110 & Inf & Inf & Inf & 186156007.21 & 15513000.6008 & 3938.6547 \tabularnewline
111 & Inf & Inf & Inf & 156675289 & 13056274.0833 & 3613.3467 \tabularnewline
112 & Inf & Inf & Inf & 195471157.21 & 16289263.1008 & 4035.9959 \tabularnewline
113 & Inf & Inf & Inf & 203795610.49 & 16982967.5408 & 4121.0396 \tabularnewline
114 & Inf & Inf & Inf & 180499225 & 15041602.0833 & 3878.3504 \tabularnewline
115 & Inf & Inf & Inf & 184028216.49 & 15335684.7075 & 3916.0803 \tabularnewline
116 & Inf & Inf & Inf & 262968385.69 & 21914032.1408 & 4681.2426 \tabularnewline
117 & Inf & Inf & Inf & 168220900 & 14018408.3333 & 3744.1165 \tabularnewline
118 & Inf & Inf & Inf & 198243584.01 & 16520298.6675 & 4064.517 \tabularnewline
119 & Inf & Inf & Inf & 202635225 & 16886268.75 & 4109.2905 \tabularnewline
120 & Inf & Inf & Inf & 149167139.56 & 12430594.9633 & 3525.7049 \tabularnewline
121 & Inf & Inf & Inf & 158281561 & 13190130.0833 & 3631.8219 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33398&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]110[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]186156007.21[/C][C]15513000.6008[/C][C]3938.6547[/C][/ROW]
[ROW][C]111[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]156675289[/C][C]13056274.0833[/C][C]3613.3467[/C][/ROW]
[ROW][C]112[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]195471157.21[/C][C]16289263.1008[/C][C]4035.9959[/C][/ROW]
[ROW][C]113[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]203795610.49[/C][C]16982967.5408[/C][C]4121.0396[/C][/ROW]
[ROW][C]114[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]180499225[/C][C]15041602.0833[/C][C]3878.3504[/C][/ROW]
[ROW][C]115[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]184028216.49[/C][C]15335684.7075[/C][C]3916.0803[/C][/ROW]
[ROW][C]116[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]262968385.69[/C][C]21914032.1408[/C][C]4681.2426[/C][/ROW]
[ROW][C]117[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]168220900[/C][C]14018408.3333[/C][C]3744.1165[/C][/ROW]
[ROW][C]118[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]198243584.01[/C][C]16520298.6675[/C][C]4064.517[/C][/ROW]
[ROW][C]119[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]202635225[/C][C]16886268.75[/C][C]4109.2905[/C][/ROW]
[ROW][C]120[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]149167139.56[/C][C]12430594.9633[/C][C]3525.7049[/C][/ROW]
[ROW][C]121[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]158281561[/C][C]13190130.0833[/C][C]3631.8219[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33398&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33398&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
110InfInfInf186156007.2115513000.60083938.6547
111InfInfInf15667528913056274.08333613.3467
112InfInfInf195471157.2116289263.10084035.9959
113InfInfInf203795610.4916982967.54084121.0396
114InfInfInf18049922515041602.08333878.3504
115InfInfInf184028216.4915335684.70753916.0803
116InfInfInf262968385.6921914032.14084681.2426
117InfInfInf16822090014018408.33333744.1165
118InfInfInf198243584.0116520298.66754064.517
119InfInfInf20263522516886268.754109.2905
120InfInfInf149167139.5612430594.96333525.7049
121InfInfInf15828156113190130.08333631.8219



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