Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 07:06:31 -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/11/t1197381201dek6g00qvi3x1vm.htm/, Retrieved Sun, 28 Apr 2024 22:13:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3113, Retrieved Sun, 28 Apr 2024 22:13:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsws12 g29
Estimated Impact239
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [forecast totaal] [2007-12-11 14:06:31] [7a600ca82a81f1b71fd92dcbb183f5b4] [Current]
Feedback Forum

Post a new message
Dataseries X:
153,4
159,5
157,4
169,1
172,6
161,7
159,2
157,4
153,9
144,8
142,2
140,1
143,4
153,3
166,9
170,6
182,8
170,3
156,6
155,2
154,7
151,6
152,1
153,2
149,5
149,7
144,3
140
137,8
132,2
128,9
123,1
120,4
122,8
126
124,5
120,6
114,7
111,7
109,1
108
107,7
99,9
103,7
103,4
103,4
104,7
105,8
105,3
103
103,8
103,4
105,8
101,4
97
94,3
96,6
97,1
95,7
96,9
97,4
95,3
93,6
91,5
93,1
91,7
94,3
93,9
90,9
88,3
91,3
91,7
92,4
92
95,6
95,8
96,4
99
107
109,7
116,2
115,9
113,8
112,6
113,7
115,9
110,3
111,3
113,4
108,2
104,8
106
110,9
115
118,4
121,4
128,8
131,7
141,7
142,9
139,4
134,7
125
113,6
111,5
108,5
112,3
116,6
115,5
120,1
132,9
128,1
129,3
132,5
131
124,9
120,8
122
122,1
127,4
135,2
137,3
135
136
138,4
134,7
138,4
133,9
133,6
141,2
151,8
155,4
156,6
161,6
160,7
156
159,5
168,7
169,9
169,9
185,9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 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 & 7 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=3113&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]7 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=3113&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3113&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 time7 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[129])
117120.8-------
118122-------
119122.1-------
120127.4-------
121135.2-------
122137.3-------
123135-------
124136-------
125138.4-------
126134.7-------
127138.4-------
128133.9-------
129133.6-------
130141.2134.777126.297143.82630.08210.60060.99720.6006
131151.8134.127120.7852148.94260.00970.17470.94420.5278
132155.4134.6115117.4104154.33270.01940.04380.76320.54
133156.6136.1678115.2119160.93540.05290.0640.53050.5805
134161.6135.8961111.9714164.93290.04140.08110.46230.5616
135160.7135.0626108.6536167.89040.06290.05650.50150.5348
136156135.7997106.8759172.55110.14070.09210.49570.5467
137159.5135.6502104.6246175.87620.12260.16070.44670.5398
138168.7134.8192102.0461178.11790.06260.13190.50220.522
139169.9135.1187100.483181.6930.07160.07880.44510.5255
140169.9134.464198.3428183.85280.07980.07980.50890.5137
141185.9134.772397.0193187.2160.0280.09460.51750.5175

\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[129]) \tabularnewline
117 & 120.8 & - & - & - & - & - & - & - \tabularnewline
118 & 122 & - & - & - & - & - & - & - \tabularnewline
119 & 122.1 & - & - & - & - & - & - & - \tabularnewline
120 & 127.4 & - & - & - & - & - & - & - \tabularnewline
121 & 135.2 & - & - & - & - & - & - & - \tabularnewline
122 & 137.3 & - & - & - & - & - & - & - \tabularnewline
123 & 135 & - & - & - & - & - & - & - \tabularnewline
124 & 136 & - & - & - & - & - & - & - \tabularnewline
125 & 138.4 & - & - & - & - & - & - & - \tabularnewline
126 & 134.7 & - & - & - & - & - & - & - \tabularnewline
127 & 138.4 & - & - & - & - & - & - & - \tabularnewline
128 & 133.9 & - & - & - & - & - & - & - \tabularnewline
129 & 133.6 & - & - & - & - & - & - & - \tabularnewline
130 & 141.2 & 134.777 & 126.297 & 143.8263 & 0.0821 & 0.6006 & 0.9972 & 0.6006 \tabularnewline
131 & 151.8 & 134.127 & 120.7852 & 148.9426 & 0.0097 & 0.1747 & 0.9442 & 0.5278 \tabularnewline
132 & 155.4 & 134.6115 & 117.4104 & 154.3327 & 0.0194 & 0.0438 & 0.7632 & 0.54 \tabularnewline
133 & 156.6 & 136.1678 & 115.2119 & 160.9354 & 0.0529 & 0.064 & 0.5305 & 0.5805 \tabularnewline
134 & 161.6 & 135.8961 & 111.9714 & 164.9329 & 0.0414 & 0.0811 & 0.4623 & 0.5616 \tabularnewline
135 & 160.7 & 135.0626 & 108.6536 & 167.8904 & 0.0629 & 0.0565 & 0.5015 & 0.5348 \tabularnewline
136 & 156 & 135.7997 & 106.8759 & 172.5511 & 0.1407 & 0.0921 & 0.4957 & 0.5467 \tabularnewline
137 & 159.5 & 135.6502 & 104.6246 & 175.8762 & 0.1226 & 0.1607 & 0.4467 & 0.5398 \tabularnewline
138 & 168.7 & 134.8192 & 102.0461 & 178.1179 & 0.0626 & 0.1319 & 0.5022 & 0.522 \tabularnewline
139 & 169.9 & 135.1187 & 100.483 & 181.693 & 0.0716 & 0.0788 & 0.4451 & 0.5255 \tabularnewline
140 & 169.9 & 134.4641 & 98.3428 & 183.8528 & 0.0798 & 0.0798 & 0.5089 & 0.5137 \tabularnewline
141 & 185.9 & 134.7723 & 97.0193 & 187.216 & 0.028 & 0.0946 & 0.5175 & 0.5175 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3113&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[129])[/C][/ROW]
[ROW][C]117[/C][C]120.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]122[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]122.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]127.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]135.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]137.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]123[/C][C]135[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]124[/C][C]136[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]125[/C][C]138.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]126[/C][C]134.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]127[/C][C]138.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]128[/C][C]133.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]129[/C][C]133.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]130[/C][C]141.2[/C][C]134.777[/C][C]126.297[/C][C]143.8263[/C][C]0.0821[/C][C]0.6006[/C][C]0.9972[/C][C]0.6006[/C][/ROW]
[ROW][C]131[/C][C]151.8[/C][C]134.127[/C][C]120.7852[/C][C]148.9426[/C][C]0.0097[/C][C]0.1747[/C][C]0.9442[/C][C]0.5278[/C][/ROW]
[ROW][C]132[/C][C]155.4[/C][C]134.6115[/C][C]117.4104[/C][C]154.3327[/C][C]0.0194[/C][C]0.0438[/C][C]0.7632[/C][C]0.54[/C][/ROW]
[ROW][C]133[/C][C]156.6[/C][C]136.1678[/C][C]115.2119[/C][C]160.9354[/C][C]0.0529[/C][C]0.064[/C][C]0.5305[/C][C]0.5805[/C][/ROW]
[ROW][C]134[/C][C]161.6[/C][C]135.8961[/C][C]111.9714[/C][C]164.9329[/C][C]0.0414[/C][C]0.0811[/C][C]0.4623[/C][C]0.5616[/C][/ROW]
[ROW][C]135[/C][C]160.7[/C][C]135.0626[/C][C]108.6536[/C][C]167.8904[/C][C]0.0629[/C][C]0.0565[/C][C]0.5015[/C][C]0.5348[/C][/ROW]
[ROW][C]136[/C][C]156[/C][C]135.7997[/C][C]106.8759[/C][C]172.5511[/C][C]0.1407[/C][C]0.0921[/C][C]0.4957[/C][C]0.5467[/C][/ROW]
[ROW][C]137[/C][C]159.5[/C][C]135.6502[/C][C]104.6246[/C][C]175.8762[/C][C]0.1226[/C][C]0.1607[/C][C]0.4467[/C][C]0.5398[/C][/ROW]
[ROW][C]138[/C][C]168.7[/C][C]134.8192[/C][C]102.0461[/C][C]178.1179[/C][C]0.0626[/C][C]0.1319[/C][C]0.5022[/C][C]0.522[/C][/ROW]
[ROW][C]139[/C][C]169.9[/C][C]135.1187[/C][C]100.483[/C][C]181.693[/C][C]0.0716[/C][C]0.0788[/C][C]0.4451[/C][C]0.5255[/C][/ROW]
[ROW][C]140[/C][C]169.9[/C][C]134.4641[/C][C]98.3428[/C][C]183.8528[/C][C]0.0798[/C][C]0.0798[/C][C]0.5089[/C][C]0.5137[/C][/ROW]
[ROW][C]141[/C][C]185.9[/C][C]134.7723[/C][C]97.0193[/C][C]187.216[/C][C]0.028[/C][C]0.0946[/C][C]0.5175[/C][C]0.5175[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3113&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3113&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[129])
117120.8-------
118122-------
119122.1-------
120127.4-------
121135.2-------
122137.3-------
123135-------
124136-------
125138.4-------
126134.7-------
127138.4-------
128133.9-------
129133.6-------
130141.2134.777126.297143.82630.08210.60060.99720.6006
131151.8134.127120.7852148.94260.00970.17470.94420.5278
132155.4134.6115117.4104154.33270.01940.04380.76320.54
133156.6136.1678115.2119160.93540.05290.0640.53050.5805
134161.6135.8961111.9714164.93290.04140.08110.46230.5616
135160.7135.0626108.6536167.89040.06290.05650.50150.5348
136156135.7997106.8759172.55110.14070.09210.49570.5467
137159.5135.6502104.6246175.87620.12260.16070.44670.5398
138168.7134.8192102.0461178.11790.06260.13190.50220.522
139169.9135.1187100.483181.6930.07160.07880.44510.5255
140169.9134.464198.3428183.85280.07980.07980.50890.5137
141185.9134.772397.0193187.2160.0280.09460.51750.5175







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1300.03430.04770.00441.25533.43791.8542
1310.05640.13180.011312.333926.02785.1017
1320.07470.15440.0129432.161636.01356.0011
1330.09280.15010.0125417.474234.78955.8983
1340.1090.18910.0158660.689155.05747.4201
1350.1240.18980.0158657.278554.77327.4009
1360.13810.14880.0124408.053334.00445.8313
1370.15130.17580.0147568.811847.4016.8848
1380.16390.25130.02091147.905995.65889.7805
1390.17590.25740.02151209.7402100.811710.0405
1400.18740.26350.0221255.7044104.64210.2295
1410.19850.37940.03162614.0415217.836814.7593

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
130 & 0.0343 & 0.0477 & 0.004 & 41.2553 & 3.4379 & 1.8542 \tabularnewline
131 & 0.0564 & 0.1318 & 0.011 & 312.3339 & 26.0278 & 5.1017 \tabularnewline
132 & 0.0747 & 0.1544 & 0.0129 & 432.1616 & 36.0135 & 6.0011 \tabularnewline
133 & 0.0928 & 0.1501 & 0.0125 & 417.4742 & 34.7895 & 5.8983 \tabularnewline
134 & 0.109 & 0.1891 & 0.0158 & 660.6891 & 55.0574 & 7.4201 \tabularnewline
135 & 0.124 & 0.1898 & 0.0158 & 657.2785 & 54.7732 & 7.4009 \tabularnewline
136 & 0.1381 & 0.1488 & 0.0124 & 408.0533 & 34.0044 & 5.8313 \tabularnewline
137 & 0.1513 & 0.1758 & 0.0147 & 568.8118 & 47.401 & 6.8848 \tabularnewline
138 & 0.1639 & 0.2513 & 0.0209 & 1147.9059 & 95.6588 & 9.7805 \tabularnewline
139 & 0.1759 & 0.2574 & 0.0215 & 1209.7402 & 100.8117 & 10.0405 \tabularnewline
140 & 0.1874 & 0.2635 & 0.022 & 1255.7044 & 104.642 & 10.2295 \tabularnewline
141 & 0.1985 & 0.3794 & 0.0316 & 2614.0415 & 217.8368 & 14.7593 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3113&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]130[/C][C]0.0343[/C][C]0.0477[/C][C]0.004[/C][C]41.2553[/C][C]3.4379[/C][C]1.8542[/C][/ROW]
[ROW][C]131[/C][C]0.0564[/C][C]0.1318[/C][C]0.011[/C][C]312.3339[/C][C]26.0278[/C][C]5.1017[/C][/ROW]
[ROW][C]132[/C][C]0.0747[/C][C]0.1544[/C][C]0.0129[/C][C]432.1616[/C][C]36.0135[/C][C]6.0011[/C][/ROW]
[ROW][C]133[/C][C]0.0928[/C][C]0.1501[/C][C]0.0125[/C][C]417.4742[/C][C]34.7895[/C][C]5.8983[/C][/ROW]
[ROW][C]134[/C][C]0.109[/C][C]0.1891[/C][C]0.0158[/C][C]660.6891[/C][C]55.0574[/C][C]7.4201[/C][/ROW]
[ROW][C]135[/C][C]0.124[/C][C]0.1898[/C][C]0.0158[/C][C]657.2785[/C][C]54.7732[/C][C]7.4009[/C][/ROW]
[ROW][C]136[/C][C]0.1381[/C][C]0.1488[/C][C]0.0124[/C][C]408.0533[/C][C]34.0044[/C][C]5.8313[/C][/ROW]
[ROW][C]137[/C][C]0.1513[/C][C]0.1758[/C][C]0.0147[/C][C]568.8118[/C][C]47.401[/C][C]6.8848[/C][/ROW]
[ROW][C]138[/C][C]0.1639[/C][C]0.2513[/C][C]0.0209[/C][C]1147.9059[/C][C]95.6588[/C][C]9.7805[/C][/ROW]
[ROW][C]139[/C][C]0.1759[/C][C]0.2574[/C][C]0.0215[/C][C]1209.7402[/C][C]100.8117[/C][C]10.0405[/C][/ROW]
[ROW][C]140[/C][C]0.1874[/C][C]0.2635[/C][C]0.022[/C][C]1255.7044[/C][C]104.642[/C][C]10.2295[/C][/ROW]
[ROW][C]141[/C][C]0.1985[/C][C]0.3794[/C][C]0.0316[/C][C]2614.0415[/C][C]217.8368[/C][C]14.7593[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3113&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3113&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
1300.03430.04770.00441.25533.43791.8542
1310.05640.13180.011312.333926.02785.1017
1320.07470.15440.0129432.161636.01356.0011
1330.09280.15010.0125417.474234.78955.8983
1340.1090.18910.0158660.689155.05747.4201
1350.1240.18980.0158657.278554.77327.4009
1360.13810.14880.0124408.053334.00445.8313
1370.15130.17580.0147568.811847.4016.8848
1380.16390.25130.02091147.905995.65889.7805
1390.17590.25740.02151209.7402100.811710.0405
1400.18740.26350.0221255.7044104.64210.2295
1410.19850.37940.03162614.0415217.836814.7593



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