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 14:11:20 +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/t1273759910v1yl80nw41temm0.htm/, Retrieved Sun, 05 May 2024 21:35:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75955, Retrieved Sun, 05 May 2024 21:35:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsB580,steven,coomans,thesis,ETS,per3maand
Estimated Impact102
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Croston Forecasting] [B580,steven,cooma...] [2010-05-13 14:11:20] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
210.5
186.8666667
204.6083333
275.6333333
326.2173333
213.5416667
199.7
298.4166667
270.4333333
141
185.4833333
153.2266667
141.4583333
127.4583333
180.3583333
191.25
162.1833333




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

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







Demand Forecast
PointForecast95% LB80% LB80% UB95% UB
18169.27339425785590.3972262544823117.699040144097220.847748371613248.149562261227
19169.27339425785576.1427910388314108.378565936068230.168222579642262.403997476878
20169.27339425785563.5527127787756100.146356246618238.400432269092274.994075736934
21169.27339425785552.084659827020492.6477994721067245.898989043603286.462128688689
22169.27339425785541.431957003836285.6823714907672252.864417024942297.114831511873
23169.27339425785531.401353478943079.123712376579259.42307613913307.145435036766
24169.27339425785521.861863451728272.8861751180854265.660613397624316.684925063981
25169.27339425785512.719898003842666.9085652108085271.638223304901325.826890511867
26169.2733942578553.9058560783826161.1453729698043277.401415545905334.640932437327
27169.273394257855-4.6336818871545855.5616692206102282.985119295099343.180470402864
28169.273394257855-12.940775931915050.1299523818504288.416836133859351.487564447624
29169.273394257855-21.049249189988644.828106694875293.718681820834359.596037705698
30169.273394257855-28.986789669198539.6380279444778298.908760571231367.533578184908
31169.273394257855-36.776411209529134.5446681895264304.002120326183375.323199725238
32169.273394257855-44.437497078351829.5353533927214309.011435122988382.984285594061
33169.273394257855-51.986563088581224.5992844444548313.947504071254390.533351604290
34169.273394257855-59.437827074918919.7271648023084318.819623713401397.984615590628
35169.273394257855-66.803641501023914.9109176244292323.63587089128405.350430016733
36169.273394257855-74.094827307052510.1434674783566328.403321037353412.641615822762
37169.273394257855-81.32093518005665.41856950549118333.128219010218419.867723695766
38169.273394257855-88.49045261039520.730674034184347337.816114481525427.037241126105
39169.273394257855-95.6109698529637-3.92518193647646342.471970452186434.157758368673
40169.273394257855-102.689314322283-8.55346261289381347.100251128603441.236102837993
41169.273394257855-109.731660447730-13.1582052374330351.704993753142448.278448963440

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 169.273394257855 & 90.3972262544823 & 117.699040144097 & 220.847748371613 & 248.149562261227 \tabularnewline
19 & 169.273394257855 & 76.1427910388314 & 108.378565936068 & 230.168222579642 & 262.403997476878 \tabularnewline
20 & 169.273394257855 & 63.5527127787756 & 100.146356246618 & 238.400432269092 & 274.994075736934 \tabularnewline
21 & 169.273394257855 & 52.0846598270204 & 92.6477994721067 & 245.898989043603 & 286.462128688689 \tabularnewline
22 & 169.273394257855 & 41.4319570038362 & 85.6823714907672 & 252.864417024942 & 297.114831511873 \tabularnewline
23 & 169.273394257855 & 31.4013534789430 & 79.123712376579 & 259.42307613913 & 307.145435036766 \tabularnewline
24 & 169.273394257855 & 21.8618634517282 & 72.8861751180854 & 265.660613397624 & 316.684925063981 \tabularnewline
25 & 169.273394257855 & 12.7198980038426 & 66.9085652108085 & 271.638223304901 & 325.826890511867 \tabularnewline
26 & 169.273394257855 & 3.90585607838261 & 61.1453729698043 & 277.401415545905 & 334.640932437327 \tabularnewline
27 & 169.273394257855 & -4.63368188715458 & 55.5616692206102 & 282.985119295099 & 343.180470402864 \tabularnewline
28 & 169.273394257855 & -12.9407759319150 & 50.1299523818504 & 288.416836133859 & 351.487564447624 \tabularnewline
29 & 169.273394257855 & -21.0492491899886 & 44.828106694875 & 293.718681820834 & 359.596037705698 \tabularnewline
30 & 169.273394257855 & -28.9867896691985 & 39.6380279444778 & 298.908760571231 & 367.533578184908 \tabularnewline
31 & 169.273394257855 & -36.7764112095291 & 34.5446681895264 & 304.002120326183 & 375.323199725238 \tabularnewline
32 & 169.273394257855 & -44.4374970783518 & 29.5353533927214 & 309.011435122988 & 382.984285594061 \tabularnewline
33 & 169.273394257855 & -51.9865630885812 & 24.5992844444548 & 313.947504071254 & 390.533351604290 \tabularnewline
34 & 169.273394257855 & -59.4378270749189 & 19.7271648023084 & 318.819623713401 & 397.984615590628 \tabularnewline
35 & 169.273394257855 & -66.8036415010239 & 14.9109176244292 & 323.63587089128 & 405.350430016733 \tabularnewline
36 & 169.273394257855 & -74.0948273070525 & 10.1434674783566 & 328.403321037353 & 412.641615822762 \tabularnewline
37 & 169.273394257855 & -81.3209351800566 & 5.41856950549118 & 333.128219010218 & 419.867723695766 \tabularnewline
38 & 169.273394257855 & -88.4904526103952 & 0.730674034184347 & 337.816114481525 & 427.037241126105 \tabularnewline
39 & 169.273394257855 & -95.6109698529637 & -3.92518193647646 & 342.471970452186 & 434.157758368673 \tabularnewline
40 & 169.273394257855 & -102.689314322283 & -8.55346261289381 & 347.100251128603 & 441.236102837993 \tabularnewline
41 & 169.273394257855 & -109.731660447730 & -13.1582052374330 & 351.704993753142 & 448.278448963440 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75955&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]169.273394257855[/C][C]90.3972262544823[/C][C]117.699040144097[/C][C]220.847748371613[/C][C]248.149562261227[/C][/ROW]
[ROW][C]19[/C][C]169.273394257855[/C][C]76.1427910388314[/C][C]108.378565936068[/C][C]230.168222579642[/C][C]262.403997476878[/C][/ROW]
[ROW][C]20[/C][C]169.273394257855[/C][C]63.5527127787756[/C][C]100.146356246618[/C][C]238.400432269092[/C][C]274.994075736934[/C][/ROW]
[ROW][C]21[/C][C]169.273394257855[/C][C]52.0846598270204[/C][C]92.6477994721067[/C][C]245.898989043603[/C][C]286.462128688689[/C][/ROW]
[ROW][C]22[/C][C]169.273394257855[/C][C]41.4319570038362[/C][C]85.6823714907672[/C][C]252.864417024942[/C][C]297.114831511873[/C][/ROW]
[ROW][C]23[/C][C]169.273394257855[/C][C]31.4013534789430[/C][C]79.123712376579[/C][C]259.42307613913[/C][C]307.145435036766[/C][/ROW]
[ROW][C]24[/C][C]169.273394257855[/C][C]21.8618634517282[/C][C]72.8861751180854[/C][C]265.660613397624[/C][C]316.684925063981[/C][/ROW]
[ROW][C]25[/C][C]169.273394257855[/C][C]12.7198980038426[/C][C]66.9085652108085[/C][C]271.638223304901[/C][C]325.826890511867[/C][/ROW]
[ROW][C]26[/C][C]169.273394257855[/C][C]3.90585607838261[/C][C]61.1453729698043[/C][C]277.401415545905[/C][C]334.640932437327[/C][/ROW]
[ROW][C]27[/C][C]169.273394257855[/C][C]-4.63368188715458[/C][C]55.5616692206102[/C][C]282.985119295099[/C][C]343.180470402864[/C][/ROW]
[ROW][C]28[/C][C]169.273394257855[/C][C]-12.9407759319150[/C][C]50.1299523818504[/C][C]288.416836133859[/C][C]351.487564447624[/C][/ROW]
[ROW][C]29[/C][C]169.273394257855[/C][C]-21.0492491899886[/C][C]44.828106694875[/C][C]293.718681820834[/C][C]359.596037705698[/C][/ROW]
[ROW][C]30[/C][C]169.273394257855[/C][C]-28.9867896691985[/C][C]39.6380279444778[/C][C]298.908760571231[/C][C]367.533578184908[/C][/ROW]
[ROW][C]31[/C][C]169.273394257855[/C][C]-36.7764112095291[/C][C]34.5446681895264[/C][C]304.002120326183[/C][C]375.323199725238[/C][/ROW]
[ROW][C]32[/C][C]169.273394257855[/C][C]-44.4374970783518[/C][C]29.5353533927214[/C][C]309.011435122988[/C][C]382.984285594061[/C][/ROW]
[ROW][C]33[/C][C]169.273394257855[/C][C]-51.9865630885812[/C][C]24.5992844444548[/C][C]313.947504071254[/C][C]390.533351604290[/C][/ROW]
[ROW][C]34[/C][C]169.273394257855[/C][C]-59.4378270749189[/C][C]19.7271648023084[/C][C]318.819623713401[/C][C]397.984615590628[/C][/ROW]
[ROW][C]35[/C][C]169.273394257855[/C][C]-66.8036415010239[/C][C]14.9109176244292[/C][C]323.63587089128[/C][C]405.350430016733[/C][/ROW]
[ROW][C]36[/C][C]169.273394257855[/C][C]-74.0948273070525[/C][C]10.1434674783566[/C][C]328.403321037353[/C][C]412.641615822762[/C][/ROW]
[ROW][C]37[/C][C]169.273394257855[/C][C]-81.3209351800566[/C][C]5.41856950549118[/C][C]333.128219010218[/C][C]419.867723695766[/C][/ROW]
[ROW][C]38[/C][C]169.273394257855[/C][C]-88.4904526103952[/C][C]0.730674034184347[/C][C]337.816114481525[/C][C]427.037241126105[/C][/ROW]
[ROW][C]39[/C][C]169.273394257855[/C][C]-95.6109698529637[/C][C]-3.92518193647646[/C][C]342.471970452186[/C][C]434.157758368673[/C][/ROW]
[ROW][C]40[/C][C]169.273394257855[/C][C]-102.689314322283[/C][C]-8.55346261289381[/C][C]347.100251128603[/C][C]441.236102837993[/C][/ROW]
[ROW][C]41[/C][C]169.273394257855[/C][C]-109.731660447730[/C][C]-13.1582052374330[/C][C]351.704993753142[/C][C]448.278448963440[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75955&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75955&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
18169.27339425785590.3972262544823117.699040144097220.847748371613248.149562261227
19169.27339425785576.1427910388314108.378565936068230.168222579642262.403997476878
20169.27339425785563.5527127787756100.146356246618238.400432269092274.994075736934
21169.27339425785552.084659827020492.6477994721067245.898989043603286.462128688689
22169.27339425785541.431957003836285.6823714907672252.864417024942297.114831511873
23169.27339425785531.401353478943079.123712376579259.42307613913307.145435036766
24169.27339425785521.861863451728272.8861751180854265.660613397624316.684925063981
25169.27339425785512.719898003842666.9085652108085271.638223304901325.826890511867
26169.2733942578553.9058560783826161.1453729698043277.401415545905334.640932437327
27169.273394257855-4.6336818871545855.5616692206102282.985119295099343.180470402864
28169.273394257855-12.940775931915050.1299523818504288.416836133859351.487564447624
29169.273394257855-21.049249189988644.828106694875293.718681820834359.596037705698
30169.273394257855-28.986789669198539.6380279444778298.908760571231367.533578184908
31169.273394257855-36.776411209529134.5446681895264304.002120326183375.323199725238
32169.273394257855-44.437497078351829.5353533927214309.011435122988382.984285594061
33169.273394257855-51.986563088581224.5992844444548313.947504071254390.533351604290
34169.273394257855-59.437827074918919.7271648023084318.819623713401397.984615590628
35169.273394257855-66.803641501023914.9109176244292323.63587089128405.350430016733
36169.273394257855-74.094827307052510.1434674783566328.403321037353412.641615822762
37169.273394257855-81.32093518005665.41856950549118333.128219010218419.867723695766
38169.273394257855-88.49045261039520.730674034184347337.816114481525427.037241126105
39169.273394257855-95.6109698529637-3.92518193647646342.471970452186434.157758368673
40169.273394257855-102.689314322283-8.55346261289381347.100251128603441.236102837993
41169.273394257855-109.731660447730-13.1582052374330351.704993753142448.278448963440







Actuals and Interpolation
TimeActualForecast
1210.5210.429486172734
2186.8666667186.955579112862
3204.6083333204.553461530570
4275.6333333275.258366540183
5326.2173333325.893260421680
6213.5416667213.818135812535
7199.7199.885905579778
8298.4166667298.044327584900
9270.4333333270.420097674412
10141141.475949940758
11185.4833333185.511436927883
12153.2266667153.409767478691
13141.4583333141.609219538175
14127.4583333127.615594084004
15180.3583333180.039119275736
16191.25191.079349478715
17162.1833333162.284302405598

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 210.5 & 210.429486172734 \tabularnewline
2 & 186.8666667 & 186.955579112862 \tabularnewline
3 & 204.6083333 & 204.553461530570 \tabularnewline
4 & 275.6333333 & 275.258366540183 \tabularnewline
5 & 326.2173333 & 325.893260421680 \tabularnewline
6 & 213.5416667 & 213.818135812535 \tabularnewline
7 & 199.7 & 199.885905579778 \tabularnewline
8 & 298.4166667 & 298.044327584900 \tabularnewline
9 & 270.4333333 & 270.420097674412 \tabularnewline
10 & 141 & 141.475949940758 \tabularnewline
11 & 185.4833333 & 185.511436927883 \tabularnewline
12 & 153.2266667 & 153.409767478691 \tabularnewline
13 & 141.4583333 & 141.609219538175 \tabularnewline
14 & 127.4583333 & 127.615594084004 \tabularnewline
15 & 180.3583333 & 180.039119275736 \tabularnewline
16 & 191.25 & 191.079349478715 \tabularnewline
17 & 162.1833333 & 162.284302405598 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75955&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]210.5[/C][C]210.429486172734[/C][/ROW]
[ROW][C]2[/C][C]186.8666667[/C][C]186.955579112862[/C][/ROW]
[ROW][C]3[/C][C]204.6083333[/C][C]204.553461530570[/C][/ROW]
[ROW][C]4[/C][C]275.6333333[/C][C]275.258366540183[/C][/ROW]
[ROW][C]5[/C][C]326.2173333[/C][C]325.893260421680[/C][/ROW]
[ROW][C]6[/C][C]213.5416667[/C][C]213.818135812535[/C][/ROW]
[ROW][C]7[/C][C]199.7[/C][C]199.885905579778[/C][/ROW]
[ROW][C]8[/C][C]298.4166667[/C][C]298.044327584900[/C][/ROW]
[ROW][C]9[/C][C]270.4333333[/C][C]270.420097674412[/C][/ROW]
[ROW][C]10[/C][C]141[/C][C]141.475949940758[/C][/ROW]
[ROW][C]11[/C][C]185.4833333[/C][C]185.511436927883[/C][/ROW]
[ROW][C]12[/C][C]153.2266667[/C][C]153.409767478691[/C][/ROW]
[ROW][C]13[/C][C]141.4583333[/C][C]141.609219538175[/C][/ROW]
[ROW][C]14[/C][C]127.4583333[/C][C]127.615594084004[/C][/ROW]
[ROW][C]15[/C][C]180.3583333[/C][C]180.039119275736[/C][/ROW]
[ROW][C]16[/C][C]191.25[/C][C]191.079349478715[/C][/ROW]
[ROW][C]17[/C][C]162.1833333[/C][C]162.284302405598[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75955&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75955&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
1210.5210.429486172734
2186.8666667186.955579112862
3204.6083333204.553461530570
4275.6333333275.258366540183
5326.2173333325.893260421680
6213.5416667213.818135812535
7199.7199.885905579778
8298.4166667298.044327584900
9270.4333333270.420097674412
10141141.475949940758
11185.4833333185.511436927883
12153.2266667153.409767478691
13141.4583333141.609219538175
14127.4583333127.615594084004
15180.3583333180.039119275736
16191.25191.079349478715
17162.1833333162.284302405598







\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=75955&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=75955&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75955&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 = ETS ; 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