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:07:47 +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/t1273759697t9t36bc65vywn20.htm/, Retrieved Mon, 06 May 2024 01:37:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75952, Retrieved Mon, 06 May 2024 01:37:12 +0000
QR Codes:

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

Post a new message
Dataseries X:
341.95
326.3416667
317.3416667
440.867
433.034
477.3506667
488.225
463.4333333
384.25
273.675
268.1666667
226.6916667
248.8333333
224.75
188.0083333
194.8916667
145.875




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75952&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
18145.879919551705101.186396396126116.656395537218175.103443566192190.573442707284
19145.87991955170582.2920331457498104.302035459948187.457803643462209.467805957660
20145.87991955170567.52618241212694.647164618679197.112674484731224.233656691284
21145.87991955170554.850262347300186.3588259900445205.401013113366236.90957675611
22145.87991955170543.479034656779878.9235798508813212.836259252529248.280804446630
23145.87991955170533.011776486198472.0794076103306219.680431493079258.748062617212
24145.87991955170523.211502037101765.6713525837716226.088486519639268.548337066308
25145.87991955170513.924416466464159.5988537285488232.160985374861277.835422636946
26145.8799195517055.0440656457176153.7923044313771237.967534672033286.715773457693
27145.879919551705-3.5068294331417548.2011746649332243.558664438477295.266668536552
28145.879919551705-11.786467529820042.7874103056709248.972428797739303.54630663323
29145.879919551705-19.839980682884337.5215010997598254.238338003650311.599819786294
30145.879919551705-27.703216634301432.3800074686154259.379831634795319.463055737712
31145.879919551705-35.405224419490527.3439352689203264.41590383449327.165063522901
32145.879919551705-42.969947751020822.3976285485397269.362210554870334.729786854431
33145.879919551705-50.417414130016217.5279920283655274.231847075045342.177253233426
34145.879919551705-57.764591643541812.7239308726181279.035908230792349.524430746952
35145.879919551705-65.02602018249997.97593795764837283.783901145762356.78585928591
36145.879919551705-72.21428555815253.27578386380699288.484055239603363.974124661563
37145.879919551705-79.3403817300769-1.38371997268533293.143559076095371.100220833487
38145.879919551705-86.4139917575358-6.00890496396428297.768744067374378.173830860946
39145.879919551705-93.4437086663118-10.6053897875828302.365228890993385.203547769722
40145.879919551705-100.437211195030-15.1781953008544306.938034404264392.19705029844
41145.879919551705-107.40140517639-19.7318369850729311.491676088483399.1612442798

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 145.879919551705 & 101.186396396126 & 116.656395537218 & 175.103443566192 & 190.573442707284 \tabularnewline
19 & 145.879919551705 & 82.2920331457498 & 104.302035459948 & 187.457803643462 & 209.467805957660 \tabularnewline
20 & 145.879919551705 & 67.526182412126 & 94.647164618679 & 197.112674484731 & 224.233656691284 \tabularnewline
21 & 145.879919551705 & 54.8502623473001 & 86.3588259900445 & 205.401013113366 & 236.90957675611 \tabularnewline
22 & 145.879919551705 & 43.4790346567798 & 78.9235798508813 & 212.836259252529 & 248.280804446630 \tabularnewline
23 & 145.879919551705 & 33.0117764861984 & 72.0794076103306 & 219.680431493079 & 258.748062617212 \tabularnewline
24 & 145.879919551705 & 23.2115020371017 & 65.6713525837716 & 226.088486519639 & 268.548337066308 \tabularnewline
25 & 145.879919551705 & 13.9244164664641 & 59.5988537285488 & 232.160985374861 & 277.835422636946 \tabularnewline
26 & 145.879919551705 & 5.04406564571761 & 53.7923044313771 & 237.967534672033 & 286.715773457693 \tabularnewline
27 & 145.879919551705 & -3.50682943314175 & 48.2011746649332 & 243.558664438477 & 295.266668536552 \tabularnewline
28 & 145.879919551705 & -11.7864675298200 & 42.7874103056709 & 248.972428797739 & 303.54630663323 \tabularnewline
29 & 145.879919551705 & -19.8399806828843 & 37.5215010997598 & 254.238338003650 & 311.599819786294 \tabularnewline
30 & 145.879919551705 & -27.7032166343014 & 32.3800074686154 & 259.379831634795 & 319.463055737712 \tabularnewline
31 & 145.879919551705 & -35.4052244194905 & 27.3439352689203 & 264.41590383449 & 327.165063522901 \tabularnewline
32 & 145.879919551705 & -42.9699477510208 & 22.3976285485397 & 269.362210554870 & 334.729786854431 \tabularnewline
33 & 145.879919551705 & -50.4174141300162 & 17.5279920283655 & 274.231847075045 & 342.177253233426 \tabularnewline
34 & 145.879919551705 & -57.7645916435418 & 12.7239308726181 & 279.035908230792 & 349.524430746952 \tabularnewline
35 & 145.879919551705 & -65.0260201824999 & 7.97593795764837 & 283.783901145762 & 356.78585928591 \tabularnewline
36 & 145.879919551705 & -72.2142855581525 & 3.27578386380699 & 288.484055239603 & 363.974124661563 \tabularnewline
37 & 145.879919551705 & -79.3403817300769 & -1.38371997268533 & 293.143559076095 & 371.100220833487 \tabularnewline
38 & 145.879919551705 & -86.4139917575358 & -6.00890496396428 & 297.768744067374 & 378.173830860946 \tabularnewline
39 & 145.879919551705 & -93.4437086663118 & -10.6053897875828 & 302.365228890993 & 385.203547769722 \tabularnewline
40 & 145.879919551705 & -100.437211195030 & -15.1781953008544 & 306.938034404264 & 392.19705029844 \tabularnewline
41 & 145.879919551705 & -107.40140517639 & -19.7318369850729 & 311.491676088483 & 399.1612442798 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75952&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]145.879919551705[/C][C]101.186396396126[/C][C]116.656395537218[/C][C]175.103443566192[/C][C]190.573442707284[/C][/ROW]
[ROW][C]19[/C][C]145.879919551705[/C][C]82.2920331457498[/C][C]104.302035459948[/C][C]187.457803643462[/C][C]209.467805957660[/C][/ROW]
[ROW][C]20[/C][C]145.879919551705[/C][C]67.526182412126[/C][C]94.647164618679[/C][C]197.112674484731[/C][C]224.233656691284[/C][/ROW]
[ROW][C]21[/C][C]145.879919551705[/C][C]54.8502623473001[/C][C]86.3588259900445[/C][C]205.401013113366[/C][C]236.90957675611[/C][/ROW]
[ROW][C]22[/C][C]145.879919551705[/C][C]43.4790346567798[/C][C]78.9235798508813[/C][C]212.836259252529[/C][C]248.280804446630[/C][/ROW]
[ROW][C]23[/C][C]145.879919551705[/C][C]33.0117764861984[/C][C]72.0794076103306[/C][C]219.680431493079[/C][C]258.748062617212[/C][/ROW]
[ROW][C]24[/C][C]145.879919551705[/C][C]23.2115020371017[/C][C]65.6713525837716[/C][C]226.088486519639[/C][C]268.548337066308[/C][/ROW]
[ROW][C]25[/C][C]145.879919551705[/C][C]13.9244164664641[/C][C]59.5988537285488[/C][C]232.160985374861[/C][C]277.835422636946[/C][/ROW]
[ROW][C]26[/C][C]145.879919551705[/C][C]5.04406564571761[/C][C]53.7923044313771[/C][C]237.967534672033[/C][C]286.715773457693[/C][/ROW]
[ROW][C]27[/C][C]145.879919551705[/C][C]-3.50682943314175[/C][C]48.2011746649332[/C][C]243.558664438477[/C][C]295.266668536552[/C][/ROW]
[ROW][C]28[/C][C]145.879919551705[/C][C]-11.7864675298200[/C][C]42.7874103056709[/C][C]248.972428797739[/C][C]303.54630663323[/C][/ROW]
[ROW][C]29[/C][C]145.879919551705[/C][C]-19.8399806828843[/C][C]37.5215010997598[/C][C]254.238338003650[/C][C]311.599819786294[/C][/ROW]
[ROW][C]30[/C][C]145.879919551705[/C][C]-27.7032166343014[/C][C]32.3800074686154[/C][C]259.379831634795[/C][C]319.463055737712[/C][/ROW]
[ROW][C]31[/C][C]145.879919551705[/C][C]-35.4052244194905[/C][C]27.3439352689203[/C][C]264.41590383449[/C][C]327.165063522901[/C][/ROW]
[ROW][C]32[/C][C]145.879919551705[/C][C]-42.9699477510208[/C][C]22.3976285485397[/C][C]269.362210554870[/C][C]334.729786854431[/C][/ROW]
[ROW][C]33[/C][C]145.879919551705[/C][C]-50.4174141300162[/C][C]17.5279920283655[/C][C]274.231847075045[/C][C]342.177253233426[/C][/ROW]
[ROW][C]34[/C][C]145.879919551705[/C][C]-57.7645916435418[/C][C]12.7239308726181[/C][C]279.035908230792[/C][C]349.524430746952[/C][/ROW]
[ROW][C]35[/C][C]145.879919551705[/C][C]-65.0260201824999[/C][C]7.97593795764837[/C][C]283.783901145762[/C][C]356.78585928591[/C][/ROW]
[ROW][C]36[/C][C]145.879919551705[/C][C]-72.2142855581525[/C][C]3.27578386380699[/C][C]288.484055239603[/C][C]363.974124661563[/C][/ROW]
[ROW][C]37[/C][C]145.879919551705[/C][C]-79.3403817300769[/C][C]-1.38371997268533[/C][C]293.143559076095[/C][C]371.100220833487[/C][/ROW]
[ROW][C]38[/C][C]145.879919551705[/C][C]-86.4139917575358[/C][C]-6.00890496396428[/C][C]297.768744067374[/C][C]378.173830860946[/C][/ROW]
[ROW][C]39[/C][C]145.879919551705[/C][C]-93.4437086663118[/C][C]-10.6053897875828[/C][C]302.365228890993[/C][C]385.203547769722[/C][/ROW]
[ROW][C]40[/C][C]145.879919551705[/C][C]-100.437211195030[/C][C]-15.1781953008544[/C][C]306.938034404264[/C][C]392.19705029844[/C][/ROW]
[ROW][C]41[/C][C]145.879919551705[/C][C]-107.40140517639[/C][C]-19.7318369850729[/C][C]311.491676088483[/C][C]399.1612442798[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75952&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75952&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
18145.879919551705101.186396396126116.656395537218175.103443566192190.573442707284
19145.87991955170582.2920331457498104.302035459948187.457803643462209.467805957660
20145.87991955170567.52618241212694.647164618679197.112674484731224.233656691284
21145.87991955170554.850262347300186.3588259900445205.401013113366236.90957675611
22145.87991955170543.479034656779878.9235798508813212.836259252529248.280804446630
23145.87991955170533.011776486198472.0794076103306219.680431493079258.748062617212
24145.87991955170523.211502037101765.6713525837716226.088486519639268.548337066308
25145.87991955170513.924416466464159.5988537285488232.160985374861277.835422636946
26145.8799195517055.0440656457176153.7923044313771237.967534672033286.715773457693
27145.879919551705-3.5068294331417548.2011746649332243.558664438477295.266668536552
28145.879919551705-11.786467529820042.7874103056709248.972428797739303.54630663323
29145.879919551705-19.839980682884337.5215010997598254.238338003650311.599819786294
30145.879919551705-27.703216634301432.3800074686154259.379831634795319.463055737712
31145.879919551705-35.405224419490527.3439352689203264.41590383449327.165063522901
32145.879919551705-42.969947751020822.3976285485397269.362210554870334.729786854431
33145.879919551705-50.417414130016217.5279920283655274.231847075045342.177253233426
34145.879919551705-57.764591643541812.7239308726181279.035908230792349.524430746952
35145.879919551705-65.02602018249997.97593795764837283.783901145762356.78585928591
36145.879919551705-72.21428555815253.27578386380699288.484055239603363.974124661563
37145.879919551705-79.3403817300769-1.38371997268533293.143559076095371.100220833487
38145.879919551705-86.4139917575358-6.00890496396428297.768744067374378.173830860946
39145.879919551705-93.4437086663118-10.6053897875828302.365228890993385.203547769722
40145.879919551705-100.437211195030-15.1781953008544306.938034404264392.19705029844
41145.879919551705-107.40140517639-19.7318369850729311.491676088483399.1612442798







Actuals and Interpolation
TimeActualForecast
1341.95341.925968141405
2326.3416667326.387309526841
3317.3416667317.369249825847
4440.867440.477753672959
5433.034433.051739640848
6477.3506667477.248328774
7488.225488.202209872645
8463.4333333463.484110360328
9384.25384.420866855290
10273.675273.962783111011
11268.1666667268.186833716609
12226.6916667226.846329726533
13248.8333333248.735680405783
14224.75224.846776931556
15188.0083333188.171820234349
16194.8916667194.855075180533
17145.875146.126504595889

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 341.95 & 341.925968141405 \tabularnewline
2 & 326.3416667 & 326.387309526841 \tabularnewline
3 & 317.3416667 & 317.369249825847 \tabularnewline
4 & 440.867 & 440.477753672959 \tabularnewline
5 & 433.034 & 433.051739640848 \tabularnewline
6 & 477.3506667 & 477.248328774 \tabularnewline
7 & 488.225 & 488.202209872645 \tabularnewline
8 & 463.4333333 & 463.484110360328 \tabularnewline
9 & 384.25 & 384.420866855290 \tabularnewline
10 & 273.675 & 273.962783111011 \tabularnewline
11 & 268.1666667 & 268.186833716609 \tabularnewline
12 & 226.6916667 & 226.846329726533 \tabularnewline
13 & 248.8333333 & 248.735680405783 \tabularnewline
14 & 224.75 & 224.846776931556 \tabularnewline
15 & 188.0083333 & 188.171820234349 \tabularnewline
16 & 194.8916667 & 194.855075180533 \tabularnewline
17 & 145.875 & 146.126504595889 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75952&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]341.95[/C][C]341.925968141405[/C][/ROW]
[ROW][C]2[/C][C]326.3416667[/C][C]326.387309526841[/C][/ROW]
[ROW][C]3[/C][C]317.3416667[/C][C]317.369249825847[/C][/ROW]
[ROW][C]4[/C][C]440.867[/C][C]440.477753672959[/C][/ROW]
[ROW][C]5[/C][C]433.034[/C][C]433.051739640848[/C][/ROW]
[ROW][C]6[/C][C]477.3506667[/C][C]477.248328774[/C][/ROW]
[ROW][C]7[/C][C]488.225[/C][C]488.202209872645[/C][/ROW]
[ROW][C]8[/C][C]463.4333333[/C][C]463.484110360328[/C][/ROW]
[ROW][C]9[/C][C]384.25[/C][C]384.420866855290[/C][/ROW]
[ROW][C]10[/C][C]273.675[/C][C]273.962783111011[/C][/ROW]
[ROW][C]11[/C][C]268.1666667[/C][C]268.186833716609[/C][/ROW]
[ROW][C]12[/C][C]226.6916667[/C][C]226.846329726533[/C][/ROW]
[ROW][C]13[/C][C]248.8333333[/C][C]248.735680405783[/C][/ROW]
[ROW][C]14[/C][C]224.75[/C][C]224.846776931556[/C][/ROW]
[ROW][C]15[/C][C]188.0083333[/C][C]188.171820234349[/C][/ROW]
[ROW][C]16[/C][C]194.8916667[/C][C]194.855075180533[/C][/ROW]
[ROW][C]17[/C][C]145.875[/C][C]146.126504595889[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75952&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75952&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
1341.95341.925968141405
2326.3416667326.387309526841
3317.3416667317.369249825847
4440.867440.477753672959
5433.034433.051739640848
6477.3506667477.248328774
7488.225488.202209872645
8463.4333333463.484110360328
9384.25384.420866855290
10273.675273.962783111011
11268.1666667268.186833716609
12226.6916667226.846329726533
13248.8333333248.735680405783
14224.75224.846776931556
15188.0083333188.171820234349
16194.8916667194.855075180533
17145.875146.126504595889







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

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