Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software ModulePatrick.Wessarwasp_demand_forecasting_croston.wasp
Title produced by softwareCroston Forecasting
Date of computationThu, 13 May 2010 13:54:23 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/May/13/t1273758905flplqmbcnmtiegd.htm/, Retrieved Mon, 06 May 2024 08:04:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75942, Retrieved Mon, 06 May 2024 08:04:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsB28A,steven,coomans,thesis,Arima,per3maand
Estimated Impact122
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Croston Forecasting] [B28A,steven,cooma...] [2010-05-13 13:54:23] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
275,0916667
401,3423333
260,6333333
286,1
368,0833333
385,1916667
181,5333333
145,1
203,1833333
227,5833333
239,0833333
109,175
231,0833333
216,9166667
229,8583333
272,7916667
155,0833333




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Serverwessa.org @ wessa.org

\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 & 3 seconds \tabularnewline
R Server & wessa.org @ wessa.org \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75942&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]wessa.org @ wessa.org[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75942&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75942&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 time3 seconds
R Serverwessa.org @ wessa.org







Demand Forecast
PointForecast95% LB80% LB80% UB95% UB
18207.87404692967251.5980751842378105.690681405043310.057412454302364.150018675107
19207.87404692967242.808927662676899.9437667398216315.804327119523372.939166196668
20207.87404692967234.464681979923894.487757750692321.260336108653381.283411879421
21207.87404692967226.503922306230989.2824967850729326.465597074272389.244171553114
22207.87404692967218.878183589835584.2962942489462331.451799610399396.869910269509
23207.87404692967211.548422995306879.5036214044042336.244472454941404.199670864038
24207.8740469296724.4826388838418274.8835535045478340.864540354797411.265454975503
25207.874046929672-2.3457882917290470.4186849630406345.329408896304418.093882151074
26207.874046929672-8.95928393567466.0943525961839349.653741263161424.707377795019
27207.874046929672-15.376949994884261.8980663122533353.850027547091431.125043854229
28207.874046929672-21.615216177463057.8190833025508357.929010556794437.363310036808
29207.874046929672-27.688335752927453.8480838550775361.900010004267443.436429612272
30207.874046929672-33.608768998814049.9769206322754365.771173227069449.356862858159
31207.874046929672-39.387483928645346.1984220355783369.549671823767455.13557778799
32207.874046929672-45.034195118795542.5062360449192373.241857814426460.78228897814
33207.874046929672-50.557555529651538.8947047936137376.853389065731466.305649388996
34207.874046929672-55.965312157143235.3587627932955380.389331066049471.713406016488
35207.874046929672-61.264433516712831.8938535766291383.854240282716477.012527376058
36207.874046929672-66.461214950088328.4958608409113387.252233018433482.209308809433
37207.874046929672-71.561366295431325.1610511236437390.587042735701487.309460154776
38207.874046929672-76.570085402024921.8860257338611393.862068125484492.31817926137
39207.874046929672-81.492120186629718.6676801756617397.080413683683497.240214045975
40207.874046929672-86.331821341555915.5031696842512400.244924175094502.079915200901
41207.874046929672-91.093187360098812.3898797853930403.358214073952506.841281219444

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 207.874046929672 & 51.5980751842378 & 105.690681405043 & 310.057412454302 & 364.150018675107 \tabularnewline
19 & 207.874046929672 & 42.8089276626768 & 99.9437667398216 & 315.804327119523 & 372.939166196668 \tabularnewline
20 & 207.874046929672 & 34.4646819799238 & 94.487757750692 & 321.260336108653 & 381.283411879421 \tabularnewline
21 & 207.874046929672 & 26.5039223062309 & 89.2824967850729 & 326.465597074272 & 389.244171553114 \tabularnewline
22 & 207.874046929672 & 18.8781835898355 & 84.2962942489462 & 331.451799610399 & 396.869910269509 \tabularnewline
23 & 207.874046929672 & 11.5484229953068 & 79.5036214044042 & 336.244472454941 & 404.199670864038 \tabularnewline
24 & 207.874046929672 & 4.48263888384182 & 74.8835535045478 & 340.864540354797 & 411.265454975503 \tabularnewline
25 & 207.874046929672 & -2.34578829172904 & 70.4186849630406 & 345.329408896304 & 418.093882151074 \tabularnewline
26 & 207.874046929672 & -8.959283935674 & 66.0943525961839 & 349.653741263161 & 424.707377795019 \tabularnewline
27 & 207.874046929672 & -15.3769499948842 & 61.8980663122533 & 353.850027547091 & 431.125043854229 \tabularnewline
28 & 207.874046929672 & -21.6152161774630 & 57.8190833025508 & 357.929010556794 & 437.363310036808 \tabularnewline
29 & 207.874046929672 & -27.6883357529274 & 53.8480838550775 & 361.900010004267 & 443.436429612272 \tabularnewline
30 & 207.874046929672 & -33.6087689988140 & 49.9769206322754 & 365.771173227069 & 449.356862858159 \tabularnewline
31 & 207.874046929672 & -39.3874839286453 & 46.1984220355783 & 369.549671823767 & 455.13557778799 \tabularnewline
32 & 207.874046929672 & -45.0341951187955 & 42.5062360449192 & 373.241857814426 & 460.78228897814 \tabularnewline
33 & 207.874046929672 & -50.5575555296515 & 38.8947047936137 & 376.853389065731 & 466.305649388996 \tabularnewline
34 & 207.874046929672 & -55.9653121571432 & 35.3587627932955 & 380.389331066049 & 471.713406016488 \tabularnewline
35 & 207.874046929672 & -61.2644335167128 & 31.8938535766291 & 383.854240282716 & 477.012527376058 \tabularnewline
36 & 207.874046929672 & -66.4612149500883 & 28.4958608409113 & 387.252233018433 & 482.209308809433 \tabularnewline
37 & 207.874046929672 & -71.5613662954313 & 25.1610511236437 & 390.587042735701 & 487.309460154776 \tabularnewline
38 & 207.874046929672 & -76.5700854020249 & 21.8860257338611 & 393.862068125484 & 492.31817926137 \tabularnewline
39 & 207.874046929672 & -81.4921201866297 & 18.6676801756617 & 397.080413683683 & 497.240214045975 \tabularnewline
40 & 207.874046929672 & -86.3318213415559 & 15.5031696842512 & 400.244924175094 & 502.079915200901 \tabularnewline
41 & 207.874046929672 & -91.0931873600988 & 12.3898797853930 & 403.358214073952 & 506.841281219444 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75942&T=1

[TABLE]
[ROW][C]Demand Forecast[/C][/ROW]
[ROW][C]Point[/C][C]Forecast[/C][C]95% LB[/C][C]80% LB[/C][C]80% UB[/C][C]95% UB[/C][/ROW]
[ROW][C]18[/C][C]207.874046929672[/C][C]51.5980751842378[/C][C]105.690681405043[/C][C]310.057412454302[/C][C]364.150018675107[/C][/ROW]
[ROW][C]19[/C][C]207.874046929672[/C][C]42.8089276626768[/C][C]99.9437667398216[/C][C]315.804327119523[/C][C]372.939166196668[/C][/ROW]
[ROW][C]20[/C][C]207.874046929672[/C][C]34.4646819799238[/C][C]94.487757750692[/C][C]321.260336108653[/C][C]381.283411879421[/C][/ROW]
[ROW][C]21[/C][C]207.874046929672[/C][C]26.5039223062309[/C][C]89.2824967850729[/C][C]326.465597074272[/C][C]389.244171553114[/C][/ROW]
[ROW][C]22[/C][C]207.874046929672[/C][C]18.8781835898355[/C][C]84.2962942489462[/C][C]331.451799610399[/C][C]396.869910269509[/C][/ROW]
[ROW][C]23[/C][C]207.874046929672[/C][C]11.5484229953068[/C][C]79.5036214044042[/C][C]336.244472454941[/C][C]404.199670864038[/C][/ROW]
[ROW][C]24[/C][C]207.874046929672[/C][C]4.48263888384182[/C][C]74.8835535045478[/C][C]340.864540354797[/C][C]411.265454975503[/C][/ROW]
[ROW][C]25[/C][C]207.874046929672[/C][C]-2.34578829172904[/C][C]70.4186849630406[/C][C]345.329408896304[/C][C]418.093882151074[/C][/ROW]
[ROW][C]26[/C][C]207.874046929672[/C][C]-8.959283935674[/C][C]66.0943525961839[/C][C]349.653741263161[/C][C]424.707377795019[/C][/ROW]
[ROW][C]27[/C][C]207.874046929672[/C][C]-15.3769499948842[/C][C]61.8980663122533[/C][C]353.850027547091[/C][C]431.125043854229[/C][/ROW]
[ROW][C]28[/C][C]207.874046929672[/C][C]-21.6152161774630[/C][C]57.8190833025508[/C][C]357.929010556794[/C][C]437.363310036808[/C][/ROW]
[ROW][C]29[/C][C]207.874046929672[/C][C]-27.6883357529274[/C][C]53.8480838550775[/C][C]361.900010004267[/C][C]443.436429612272[/C][/ROW]
[ROW][C]30[/C][C]207.874046929672[/C][C]-33.6087689988140[/C][C]49.9769206322754[/C][C]365.771173227069[/C][C]449.356862858159[/C][/ROW]
[ROW][C]31[/C][C]207.874046929672[/C][C]-39.3874839286453[/C][C]46.1984220355783[/C][C]369.549671823767[/C][C]455.13557778799[/C][/ROW]
[ROW][C]32[/C][C]207.874046929672[/C][C]-45.0341951187955[/C][C]42.5062360449192[/C][C]373.241857814426[/C][C]460.78228897814[/C][/ROW]
[ROW][C]33[/C][C]207.874046929672[/C][C]-50.5575555296515[/C][C]38.8947047936137[/C][C]376.853389065731[/C][C]466.305649388996[/C][/ROW]
[ROW][C]34[/C][C]207.874046929672[/C][C]-55.9653121571432[/C][C]35.3587627932955[/C][C]380.389331066049[/C][C]471.713406016488[/C][/ROW]
[ROW][C]35[/C][C]207.874046929672[/C][C]-61.2644335167128[/C][C]31.8938535766291[/C][C]383.854240282716[/C][C]477.012527376058[/C][/ROW]
[ROW][C]36[/C][C]207.874046929672[/C][C]-66.4612149500883[/C][C]28.4958608409113[/C][C]387.252233018433[/C][C]482.209308809433[/C][/ROW]
[ROW][C]37[/C][C]207.874046929672[/C][C]-71.5613662954313[/C][C]25.1610511236437[/C][C]390.587042735701[/C][C]487.309460154776[/C][/ROW]
[ROW][C]38[/C][C]207.874046929672[/C][C]-76.5700854020249[/C][C]21.8860257338611[/C][C]393.862068125484[/C][C]492.31817926137[/C][/ROW]
[ROW][C]39[/C][C]207.874046929672[/C][C]-81.4921201866297[/C][C]18.6676801756617[/C][C]397.080413683683[/C][C]497.240214045975[/C][/ROW]
[ROW][C]40[/C][C]207.874046929672[/C][C]-86.3318213415559[/C][C]15.5031696842512[/C][C]400.244924175094[/C][C]502.079915200901[/C][/ROW]
[ROW][C]41[/C][C]207.874046929672[/C][C]-91.0931873600988[/C][C]12.3898797853930[/C][C]403.358214073952[/C][C]506.841281219444[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75942&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75942&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Demand Forecast
PointForecast95% LB80% LB80% UB95% UB
18207.87404692967251.5980751842378105.690681405043310.057412454302364.150018675107
19207.87404692967242.808927662676899.9437667398216315.804327119523372.939166196668
20207.87404692967234.464681979923894.487757750692321.260336108653381.283411879421
21207.87404692967226.503922306230989.2824967850729326.465597074272389.244171553114
22207.87404692967218.878183589835584.2962942489462331.451799610399396.869910269509
23207.87404692967211.548422995306879.5036214044042336.244472454941404.199670864038
24207.8740469296724.4826388838418274.8835535045478340.864540354797411.265454975503
25207.874046929672-2.3457882917290470.4186849630406345.329408896304418.093882151074
26207.874046929672-8.95928393567466.0943525961839349.653741263161424.707377795019
27207.874046929672-15.376949994884261.8980663122533353.850027547091431.125043854229
28207.874046929672-21.615216177463057.8190833025508357.929010556794437.363310036808
29207.874046929672-27.688335752927453.8480838550775361.900010004267443.436429612272
30207.874046929672-33.608768998814049.9769206322754365.771173227069449.356862858159
31207.874046929672-39.387483928645346.1984220355783369.549671823767455.13557778799
32207.874046929672-45.034195118795542.5062360449192373.241857814426460.78228897814
33207.874046929672-50.557555529651538.8947047936137376.853389065731466.305649388996
34207.874046929672-55.965312157143235.3587627932955380.389331066049471.713406016488
35207.874046929672-61.264433516712831.8938535766291383.854240282716477.012527376058
36207.874046929672-66.461214950088328.4958608409113387.252233018433482.209308809433
37207.874046929672-71.561366295431325.1610511236437390.587042735701487.309460154776
38207.874046929672-76.570085402024921.8860257338611393.862068125484492.31817926137
39207.874046929672-81.492120186629718.6676801756617397.080413683683497.240214045975
40207.874046929672-86.331821341555915.5031696842512400.244924175094502.079915200901
41207.874046929672-91.093187360098812.3898797853930403.358214073952506.841281219444







Actuals and Interpolation
TimeActualForecast
1275.0916667274.816575230748
2401.3423333295.968930016752
3260.6333333338.328662343278
4286.1308.265916154109
5368.0833333301.071991695963
6385.1916667324.590521416548
7181.5333333345.060642650557
8145.1289.120656303052
9203.1833333240.050659948121
10227.5833333227.504420390666
11239.0833333227.532064816018
12109.175231.457107359672
13231.0833333189.871114035390
14216.9166667203.886458556338
15229.8583333208.317704231102
16272.7916667215.643057115841
17155.0833333235.07741198107

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 275.0916667 & 274.816575230748 \tabularnewline
2 & 401.3423333 & 295.968930016752 \tabularnewline
3 & 260.6333333 & 338.328662343278 \tabularnewline
4 & 286.1 & 308.265916154109 \tabularnewline
5 & 368.0833333 & 301.071991695963 \tabularnewline
6 & 385.1916667 & 324.590521416548 \tabularnewline
7 & 181.5333333 & 345.060642650557 \tabularnewline
8 & 145.1 & 289.120656303052 \tabularnewline
9 & 203.1833333 & 240.050659948121 \tabularnewline
10 & 227.5833333 & 227.504420390666 \tabularnewline
11 & 239.0833333 & 227.532064816018 \tabularnewline
12 & 109.175 & 231.457107359672 \tabularnewline
13 & 231.0833333 & 189.871114035390 \tabularnewline
14 & 216.9166667 & 203.886458556338 \tabularnewline
15 & 229.8583333 & 208.317704231102 \tabularnewline
16 & 272.7916667 & 215.643057115841 \tabularnewline
17 & 155.0833333 & 235.07741198107 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75942&T=2

[TABLE]
[ROW][C]Actuals and Interpolation[/C][/ROW]
[ROW][C]Time[/C][C]Actual[/C][C]Forecast[/C][/ROW]
[ROW][C]1[/C][C]275.0916667[/C][C]274.816575230748[/C][/ROW]
[ROW][C]2[/C][C]401.3423333[/C][C]295.968930016752[/C][/ROW]
[ROW][C]3[/C][C]260.6333333[/C][C]338.328662343278[/C][/ROW]
[ROW][C]4[/C][C]286.1[/C][C]308.265916154109[/C][/ROW]
[ROW][C]5[/C][C]368.0833333[/C][C]301.071991695963[/C][/ROW]
[ROW][C]6[/C][C]385.1916667[/C][C]324.590521416548[/C][/ROW]
[ROW][C]7[/C][C]181.5333333[/C][C]345.060642650557[/C][/ROW]
[ROW][C]8[/C][C]145.1[/C][C]289.120656303052[/C][/ROW]
[ROW][C]9[/C][C]203.1833333[/C][C]240.050659948121[/C][/ROW]
[ROW][C]10[/C][C]227.5833333[/C][C]227.504420390666[/C][/ROW]
[ROW][C]11[/C][C]239.0833333[/C][C]227.532064816018[/C][/ROW]
[ROW][C]12[/C][C]109.175[/C][C]231.457107359672[/C][/ROW]
[ROW][C]13[/C][C]231.0833333[/C][C]189.871114035390[/C][/ROW]
[ROW][C]14[/C][C]216.9166667[/C][C]203.886458556338[/C][/ROW]
[ROW][C]15[/C][C]229.8583333[/C][C]208.317704231102[/C][/ROW]
[ROW][C]16[/C][C]272.7916667[/C][C]215.643057115841[/C][/ROW]
[ROW][C]17[/C][C]155.0833333[/C][C]235.07741198107[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75942&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75942&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Actuals and Interpolation
TimeActualForecast
1275.0916667274.816575230748
2401.3423333295.968930016752
3260.6333333338.328662343278
4286.1308.265916154109
5368.0833333301.071991695963
6385.1916667324.590521416548
7181.5333333345.060642650557
8145.1289.120656303052
9203.1833333240.050659948121
10227.5833333227.504420390666
11239.0833333227.532064816018
12109.175231.457107359672
13231.0833333189.871114035390
14216.9166667203.886458556338
15229.8583333208.317704231102
16272.7916667215.643057115841
17155.0833333235.07741198107







\begin{tabular}{lllllllll}
\hline
What is next? \tabularnewline
Simulate Time Series \tabularnewline
Generate Forecasts \tabularnewline
Forecast Analysis \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75942&T=3

[TABLE]
[ROW][C]What is next?[/C][/ROW]
[ROW][C]Simulate Time Series[/C][/ROW]
[ROW][C]Generate Forecasts[/C][/ROW]
[ROW][C]Forecast Analysis[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75942&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75942&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

What is next?
Simulate Time Series
Generate Forecasts
Forecast Analysis



Parameters (Session):
par1 = Input box ; par2 = ARIMA ; par3 = NA ; par4 = NA ; par5 = ZZZ ; par6 = 12 ; par7 = dum ; par8 = dumresult ; par9 = 3 ; par10 = 0.1 ;
Parameters (R input):
par1 = Input box ; par2 = ARIMA ; par3 = NA ; par4 = NA ; par5 = ZZZ ; par6 = 12 ; par7 = dum ; par8 = dumresult ; par9 = 3 ; par10 = 0.1 ;
R code (references can be found in the software module):
if(par3!='NA') par3 <- as.numeric(par3) else par3 <- NA
if(par4!='NA') par4 <- as.numeric(par4) else par4 <- NA
par6 <- as.numeric(par6) #Seasonal Period
par9 <- as.numeric(par9) #Forecast Horizon
par10 <- as.numeric(par10) #Alpha
library(forecast)
if (par1 == 'CSV') {
xarr <- read.csv(file=paste('tmp/',par7,'.csv',sep=''),header=T)
numseries <- length(xarr[1,])-1
n <- length(xarr[,1])
nmh <- n - par9
nmhp1 <- nmh + 1
rarr <- array(NA,dim=c(n,numseries))
farr <- array(NA,dim=c(n,numseries))
parr <- array(NA,dim=c(numseries,8))
colnames(parr) = list('ME','RMSE','MAE','MPE','MAPE','MASE','ACF1','TheilU')
for(i in 1:numseries) {
sindex <- i+1
x <- xarr[,sindex]
if(par2=='Croston') {
if (i==1) m <- croston(x,alpha=par10)
if (i==1) mydemand <- m$model$demand[]
fit <- croston(x[1:nmh],h=par9,alpha=par10)
}
if(par2=='ARIMA') {
m <- auto.arima(ts(x,freq=par6),d=par3,D=par4)
mydemand <- forecast(m)
fit <- auto.arima(ts(x[1:nmh],freq=par6),d=par3,D=par4)
}
if(par2=='ETS') {
m <- ets(ts(x,freq=par6),model=par5)
mydemand <- forecast(m)
fit <- ets(ts(x[1:nmh],freq=par6),model=par5)
}
try(rarr[,i] <- mydemand$resid,silent=T)
try(farr[,i] <- mydemand$mean,silent=T)
if (par2!='Croston') parr[i,] <- accuracy(forecast(fit,par9),x[nmhp1:n])
if (par2=='Croston') parr[i,] <- accuracy(fit,x[nmhp1:n])
}
write.csv(farr,file=paste('tmp/',par8,'_f.csv',sep=''))
write.csv(rarr,file=paste('tmp/',par8,'_r.csv',sep=''))
write.csv(parr,file=paste('tmp/',par8,'_p.csv',sep=''))
}
if (par1 == 'Input box') {
numseries <- 1
n <- length(x)
if(par2=='Croston') {
m <- croston(x)
mydemand <- m$model$demand[]
}
if(par2=='ARIMA') {
m <- auto.arima(ts(x,freq=par6),d=par3,D=par4)
mydemand <- forecast(m)
}
if(par2=='ETS') {
m <- ets(ts(x,freq=par6),model=par5)
mydemand <- forecast(m)
}
summary(m)
}
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
if (par2=='Croston') plot(m)
if ((par2=='ARIMA') | par2=='ETS') plot(forecast(m))
plot(mydemand$resid,type='l',main='Residuals', ylab='residual value', xlab='time')
par(op)
dev.off()
bitmap(file='pic2.png')
op <- par(mfrow=c(2,2))
acf(mydemand$resid, lag.max=n/3, main='Residual ACF', ylab='autocorrelation', xlab='time lag')
pacf(mydemand$resid,lag.max=n/3, main='Residual PACF', ylab='partial autocorrelation', xlab='time lag')
cpgram(mydemand$resid, main='Cumulative Periodogram of Residuals')
qqnorm(mydemand$resid); qqline(mydemand$resid, col=2)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Demand Forecast',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Point',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% LB',header=TRUE)
a<-table.element(a,'80% LB',header=TRUE)
a<-table.element(a,'80% UB',header=TRUE)
a<-table.element(a,'95% UB',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(mydemand$mean)) {
a<-table.row.start(a)
a<-table.element(a,i+n,header=TRUE)
a<-table.element(a,as.numeric(mydemand$mean[i]))
a<-table.element(a,as.numeric(mydemand$lower[i,2]))
a<-table.element(a,as.numeric(mydemand$lower[i,1]))
a<-table.element(a,as.numeric(mydemand$upper[i,1]))
a<-table.element(a,as.numeric(mydemand$upper[i,2]))
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,'Actuals and Interpolation',3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Time',header=TRUE)
a<-table.element(a,'Actual',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i] - as.numeric(m$resid[i]))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'What is next?',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,hyperlink(paste('https://automated.biganalytics.eu/Patrick.Wessa/rwasp_demand_forecasting_simulate.wasp',sep=''),'Simulate Time Series','',target=''))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,hyperlink(paste('https://automated.biganalytics.eu/Patrick.Wessa/rwasp_demand_forecasting_croston.wasp',sep=''),'Generate Forecasts','',target=''))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,hyperlink(paste('https://automated.biganalytics.eu/Patrick.Wessa/rwasp_demand_forecasting_analysis.wasp',sep=''),'Forecast Analysis','',target=''))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable0.tab')
-SERVER-wessa.org