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 computationMon, 15 Dec 2008 13:51:22 -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/15/t1229375526del9zfxrks289k5.htm/, Retrieved Wed, 15 May 2024 13:53:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33824, Retrieved Wed, 15 May 2024 13:53:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact177
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [ARIMA Forecasting] [ARIMA forecast] [2008-12-15 20:51:22] [9c9e716fef59bf95ba5b3e37a9a90be4] [Current]
- RMPD    [Box-Cox Normality Plot] [BC-NP Energie] [2008-12-21 14:44:14] [dff692ae32125bdbbfc005d665e23b83]
- RMPD    [ARIMA Backward Selection] [ARIMA BS Energie] [2008-12-21 15:47:04] [dff692ae32125bdbbfc005d665e23b83]
-   PD    [ARIMA Forecasting] [ARIMA Forecast En...] [2008-12-21 16:05:33] [dff692ae32125bdbbfc005d665e23b83]
Feedback Forum
2008-12-22 11:43:01 [339a57d8a4d5d113e4804fc423e4a59e] [reply
De student gebruikt de juiste software om de vraag op te lossen en analyseert de output ervan zeer goed.

Post a new message
Dataseries X:
95,1
95,9
95,9
96,9
95,7
97,8
95,9
98,2
101,2
106,8
108,2
108,2
113,2
115,2
122
119,8
119,8
112,7
113,8
118,6
119,2
118,1
121,6
125,3
126,5
133,6
136,5
131,9
131,9
139,3
139,9
140,1
142,1
141,8
143,5
143,6
140,6
137,4
133,9
134,6
134,6
132,1
132,5
134,1
135,1
136,4
136,6
138,1
138,4
141
144,9
153,4
156,5
160,7
163,9
166,7
169,7
174,3
181,8
187,8
182,4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33824&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[49])
37140.6-------
38137.4-------
39133.9-------
40134.6-------
41134.6-------
42132.1-------
43132.5-------
44134.1-------
45135.1-------
46136.4-------
47136.6-------
48138.1-------
49138.4-------
50141134.8015124.4691146.78750.15540.27810.33550.2781
51144.9130.9498117.9284146.80930.04230.10710.35770.1786
52153.4131.7428116.9076150.34840.01130.08290.38170.2416
53156.5131.8163115.4058152.96470.01110.02270.39820.2709
54160.7129.3815112.0566152.20610.00360.00990.40770.2193
55163.9129.7564111.0825154.95570.0040.0080.41550.2507
56166.7131.3026111.0901159.25780.00650.01110.42230.3094
57169.7132.2667110.7182162.750.0080.01340.42770.3467
58174.3133.5167110.6009166.66870.0080.01620.43230.3864
59181.8133.709109.7794169.00040.00380.01210.43620.3972
60187.8135.1523109.8741173.24670.00340.00820.43970.4336
61182.4135.4409109.2048175.7060.01110.00540.44270.4427

\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[49]) \tabularnewline
37 & 140.6 & - & - & - & - & - & - & - \tabularnewline
38 & 137.4 & - & - & - & - & - & - & - \tabularnewline
39 & 133.9 & - & - & - & - & - & - & - \tabularnewline
40 & 134.6 & - & - & - & - & - & - & - \tabularnewline
41 & 134.6 & - & - & - & - & - & - & - \tabularnewline
42 & 132.1 & - & - & - & - & - & - & - \tabularnewline
43 & 132.5 & - & - & - & - & - & - & - \tabularnewline
44 & 134.1 & - & - & - & - & - & - & - \tabularnewline
45 & 135.1 & - & - & - & - & - & - & - \tabularnewline
46 & 136.4 & - & - & - & - & - & - & - \tabularnewline
47 & 136.6 & - & - & - & - & - & - & - \tabularnewline
48 & 138.1 & - & - & - & - & - & - & - \tabularnewline
49 & 138.4 & - & - & - & - & - & - & - \tabularnewline
50 & 141 & 134.8015 & 124.4691 & 146.7875 & 0.1554 & 0.2781 & 0.3355 & 0.2781 \tabularnewline
51 & 144.9 & 130.9498 & 117.9284 & 146.8093 & 0.0423 & 0.1071 & 0.3577 & 0.1786 \tabularnewline
52 & 153.4 & 131.7428 & 116.9076 & 150.3484 & 0.0113 & 0.0829 & 0.3817 & 0.2416 \tabularnewline
53 & 156.5 & 131.8163 & 115.4058 & 152.9647 & 0.0111 & 0.0227 & 0.3982 & 0.2709 \tabularnewline
54 & 160.7 & 129.3815 & 112.0566 & 152.2061 & 0.0036 & 0.0099 & 0.4077 & 0.2193 \tabularnewline
55 & 163.9 & 129.7564 & 111.0825 & 154.9557 & 0.004 & 0.008 & 0.4155 & 0.2507 \tabularnewline
56 & 166.7 & 131.3026 & 111.0901 & 159.2578 & 0.0065 & 0.0111 & 0.4223 & 0.3094 \tabularnewline
57 & 169.7 & 132.2667 & 110.7182 & 162.75 & 0.008 & 0.0134 & 0.4277 & 0.3467 \tabularnewline
58 & 174.3 & 133.5167 & 110.6009 & 166.6687 & 0.008 & 0.0162 & 0.4323 & 0.3864 \tabularnewline
59 & 181.8 & 133.709 & 109.7794 & 169.0004 & 0.0038 & 0.0121 & 0.4362 & 0.3972 \tabularnewline
60 & 187.8 & 135.1523 & 109.8741 & 173.2467 & 0.0034 & 0.0082 & 0.4397 & 0.4336 \tabularnewline
61 & 182.4 & 135.4409 & 109.2048 & 175.706 & 0.0111 & 0.0054 & 0.4427 & 0.4427 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33824&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[49])[/C][/ROW]
[ROW][C]37[/C][C]140.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]137.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]133.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]134.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]134.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]132.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]132.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]134.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]135.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]136.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]136.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]138.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]138.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]141[/C][C]134.8015[/C][C]124.4691[/C][C]146.7875[/C][C]0.1554[/C][C]0.2781[/C][C]0.3355[/C][C]0.2781[/C][/ROW]
[ROW][C]51[/C][C]144.9[/C][C]130.9498[/C][C]117.9284[/C][C]146.8093[/C][C]0.0423[/C][C]0.1071[/C][C]0.3577[/C][C]0.1786[/C][/ROW]
[ROW][C]52[/C][C]153.4[/C][C]131.7428[/C][C]116.9076[/C][C]150.3484[/C][C]0.0113[/C][C]0.0829[/C][C]0.3817[/C][C]0.2416[/C][/ROW]
[ROW][C]53[/C][C]156.5[/C][C]131.8163[/C][C]115.4058[/C][C]152.9647[/C][C]0.0111[/C][C]0.0227[/C][C]0.3982[/C][C]0.2709[/C][/ROW]
[ROW][C]54[/C][C]160.7[/C][C]129.3815[/C][C]112.0566[/C][C]152.2061[/C][C]0.0036[/C][C]0.0099[/C][C]0.4077[/C][C]0.2193[/C][/ROW]
[ROW][C]55[/C][C]163.9[/C][C]129.7564[/C][C]111.0825[/C][C]154.9557[/C][C]0.004[/C][C]0.008[/C][C]0.4155[/C][C]0.2507[/C][/ROW]
[ROW][C]56[/C][C]166.7[/C][C]131.3026[/C][C]111.0901[/C][C]159.2578[/C][C]0.0065[/C][C]0.0111[/C][C]0.4223[/C][C]0.3094[/C][/ROW]
[ROW][C]57[/C][C]169.7[/C][C]132.2667[/C][C]110.7182[/C][C]162.75[/C][C]0.008[/C][C]0.0134[/C][C]0.4277[/C][C]0.3467[/C][/ROW]
[ROW][C]58[/C][C]174.3[/C][C]133.5167[/C][C]110.6009[/C][C]166.6687[/C][C]0.008[/C][C]0.0162[/C][C]0.4323[/C][C]0.3864[/C][/ROW]
[ROW][C]59[/C][C]181.8[/C][C]133.709[/C][C]109.7794[/C][C]169.0004[/C][C]0.0038[/C][C]0.0121[/C][C]0.4362[/C][C]0.3972[/C][/ROW]
[ROW][C]60[/C][C]187.8[/C][C]135.1523[/C][C]109.8741[/C][C]173.2467[/C][C]0.0034[/C][C]0.0082[/C][C]0.4397[/C][C]0.4336[/C][/ROW]
[ROW][C]61[/C][C]182.4[/C][C]135.4409[/C][C]109.2048[/C][C]175.706[/C][C]0.0111[/C][C]0.0054[/C][C]0.4427[/C][C]0.4427[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33824&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33824&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[49])
37140.6-------
38137.4-------
39133.9-------
40134.6-------
41134.6-------
42132.1-------
43132.5-------
44134.1-------
45135.1-------
46136.4-------
47136.6-------
48138.1-------
49138.4-------
50141134.8015124.4691146.78750.15540.27810.33550.2781
51144.9130.9498117.9284146.80930.04230.10710.35770.1786
52153.4131.7428116.9076150.34840.01130.08290.38170.2416
53156.5131.8163115.4058152.96470.01110.02270.39820.2709
54160.7129.3815112.0566152.20610.00360.00990.40770.2193
55163.9129.7564111.0825154.95570.0040.0080.41550.2507
56166.7131.3026111.0901159.25780.00650.01110.42230.3094
57169.7132.2667110.7182162.750.0080.01340.42770.3467
58174.3133.5167110.6009166.66870.0080.01620.43230.3864
59181.8133.709109.7794169.00040.00380.01210.43620.3972
60187.8135.1523109.8741173.24670.00340.00820.43970.4336
61182.4135.4409109.2048175.7060.01110.00540.44270.4427







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.04540.0460.003838.42093.20171.7893
510.06180.10650.0089194.609416.21744.0271
520.07210.16440.0137469.036139.08636.2519
530.08190.18730.0156609.284350.77377.1256
540.090.24210.0202980.846381.73729.0409
550.09910.26310.02191165.78897.1499.8564
560.10860.26960.02251252.9761104.414710.2184
570.11760.2830.02361401.2522116.77110.8061
580.12670.30550.02551663.2771138.606411.7731
590.13470.35970.032312.7453192.728813.8827
600.14380.38950.03252771.7792230.981615.1981
610.15170.34670.02892205.1585183.763213.5559

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0454 & 0.046 & 0.0038 & 38.4209 & 3.2017 & 1.7893 \tabularnewline
51 & 0.0618 & 0.1065 & 0.0089 & 194.6094 & 16.2174 & 4.0271 \tabularnewline
52 & 0.0721 & 0.1644 & 0.0137 & 469.0361 & 39.0863 & 6.2519 \tabularnewline
53 & 0.0819 & 0.1873 & 0.0156 & 609.2843 & 50.7737 & 7.1256 \tabularnewline
54 & 0.09 & 0.2421 & 0.0202 & 980.8463 & 81.7372 & 9.0409 \tabularnewline
55 & 0.0991 & 0.2631 & 0.0219 & 1165.788 & 97.149 & 9.8564 \tabularnewline
56 & 0.1086 & 0.2696 & 0.0225 & 1252.9761 & 104.4147 & 10.2184 \tabularnewline
57 & 0.1176 & 0.283 & 0.0236 & 1401.2522 & 116.771 & 10.8061 \tabularnewline
58 & 0.1267 & 0.3055 & 0.0255 & 1663.2771 & 138.6064 & 11.7731 \tabularnewline
59 & 0.1347 & 0.3597 & 0.03 & 2312.7453 & 192.7288 & 13.8827 \tabularnewline
60 & 0.1438 & 0.3895 & 0.0325 & 2771.7792 & 230.9816 & 15.1981 \tabularnewline
61 & 0.1517 & 0.3467 & 0.0289 & 2205.1585 & 183.7632 & 13.5559 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33824&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]50[/C][C]0.0454[/C][C]0.046[/C][C]0.0038[/C][C]38.4209[/C][C]3.2017[/C][C]1.7893[/C][/ROW]
[ROW][C]51[/C][C]0.0618[/C][C]0.1065[/C][C]0.0089[/C][C]194.6094[/C][C]16.2174[/C][C]4.0271[/C][/ROW]
[ROW][C]52[/C][C]0.0721[/C][C]0.1644[/C][C]0.0137[/C][C]469.0361[/C][C]39.0863[/C][C]6.2519[/C][/ROW]
[ROW][C]53[/C][C]0.0819[/C][C]0.1873[/C][C]0.0156[/C][C]609.2843[/C][C]50.7737[/C][C]7.1256[/C][/ROW]
[ROW][C]54[/C][C]0.09[/C][C]0.2421[/C][C]0.0202[/C][C]980.8463[/C][C]81.7372[/C][C]9.0409[/C][/ROW]
[ROW][C]55[/C][C]0.0991[/C][C]0.2631[/C][C]0.0219[/C][C]1165.788[/C][C]97.149[/C][C]9.8564[/C][/ROW]
[ROW][C]56[/C][C]0.1086[/C][C]0.2696[/C][C]0.0225[/C][C]1252.9761[/C][C]104.4147[/C][C]10.2184[/C][/ROW]
[ROW][C]57[/C][C]0.1176[/C][C]0.283[/C][C]0.0236[/C][C]1401.2522[/C][C]116.771[/C][C]10.8061[/C][/ROW]
[ROW][C]58[/C][C]0.1267[/C][C]0.3055[/C][C]0.0255[/C][C]1663.2771[/C][C]138.6064[/C][C]11.7731[/C][/ROW]
[ROW][C]59[/C][C]0.1347[/C][C]0.3597[/C][C]0.03[/C][C]2312.7453[/C][C]192.7288[/C][C]13.8827[/C][/ROW]
[ROW][C]60[/C][C]0.1438[/C][C]0.3895[/C][C]0.0325[/C][C]2771.7792[/C][C]230.9816[/C][C]15.1981[/C][/ROW]
[ROW][C]61[/C][C]0.1517[/C][C]0.3467[/C][C]0.0289[/C][C]2205.1585[/C][C]183.7632[/C][C]13.5559[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33824&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33824&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
500.04540.0460.003838.42093.20171.7893
510.06180.10650.0089194.609416.21744.0271
520.07210.16440.0137469.036139.08636.2519
530.08190.18730.0156609.284350.77377.1256
540.090.24210.0202980.846381.73729.0409
550.09910.26310.02191165.78897.1499.8564
560.10860.26960.02251252.9761104.414710.2184
570.11760.2830.02361401.2522116.77110.8061
580.12670.30550.02551663.2771138.606411.7731
590.13470.35970.032312.7453192.728813.8827
600.14380.38950.03252771.7792230.981615.1981
610.15170.34670.02892205.1585183.763213.5559



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