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:14:39 +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/t1273760112dbxkc8o9gia6u1d.htm/, Retrieved Tue, 07 May 2024 16:29:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75958, Retrieved Tue, 07 May 2024 16:29:17 +0000
QR Codes:

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

Post a new message
Dataseries X:
721.8416667
644.5833333
554.4333333
562.9666667
711.675
531.1083333
379.95
336.25
370.175
493.0833333
657.7666667
533.4583333
402.2833333
267.3416667
447.5416667
297.7583333
268.4166667




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75958&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
18277.42105729382275.5823349527226145.445810481080409.396304106563479.25977963492
19253.80448812841651.9657560774083121.829234966707385.779741290125455.643220179423
20230.1879189630128.349169931956898.2126546986457362.163183227374432.026667994063
21206.5713497976044.7325744978773874.5960683570775338.546631238131408.410125097331
22182.954780632198-18.884032243318650.9794746221831314.930086642214384.793593507716
23159.338211466793-42.500652310116727.3628721741458291.313550759440361.177075243702
24135.721642301387-66.11728772099773.74625969315207267.697024909622337.560572323772
25112.105073135981-89.7339404944367-19.8703641406082244.080510412571313.944086766399
2688.4885039705754-113.350612648901-43.48700064694220.464008588091290.327620590052
2764.8719348051696-136.967306202850-67.1036511456423196.847520755982266.711175813189
2841.2553656397639-160.584023174730-90.7203169565066173.231048236034243.094754454257
2917.6387964743581-184.200765582974-114.336999399315149.614592348032219.478358531690
30-5.97777269104768-207.817535445999-137.953699793841125.998154411745195.861990063903
31-29.5943418564535-231.434334782204-161.570419459843102.381735746936172.245651069297
32-53.2109110218592-255.051165609966-185.18715971706778.7653376733485148.629343566247
33-76.827480187265-278.668029947637-208.80392188524355.1489615107131125.013069573107
34-100.444049352671-302.284929813542-232.42070728408331.5326085787412101.396831108200
35-124.060618518077-325.901867225974-256.0375172332777.9162801971237177.7806301898208
36-147.677187683482-349.518844203191-279.654353052493-15.700022314471254.1644688362267
37-171.293756848888-373.135862763413-303.271216061375-39.316297636400730.5483490656374
38-194.910326014294-396.752924924817-326.888107579538-62.932544449056.9322728962295
39-218.526895179700-420.370032705532-350.505028926564-86.5487614328352-16.6837576538674
40-242.143464345105-443.987188123635-374.121981422005-110.164947268206-40.2997405665755
41-265.760033510511-467.604393197149-397.738966385373-133.781100635649-63.9156738238731

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 277.421057293822 & 75.5823349527226 & 145.445810481080 & 409.396304106563 & 479.25977963492 \tabularnewline
19 & 253.804488128416 & 51.9657560774083 & 121.829234966707 & 385.779741290125 & 455.643220179423 \tabularnewline
20 & 230.18791896301 & 28.3491699319568 & 98.2126546986457 & 362.163183227374 & 432.026667994063 \tabularnewline
21 & 206.571349797604 & 4.73257449787738 & 74.5960683570775 & 338.546631238131 & 408.410125097331 \tabularnewline
22 & 182.954780632198 & -18.8840322433186 & 50.9794746221831 & 314.930086642214 & 384.793593507716 \tabularnewline
23 & 159.338211466793 & -42.5006523101167 & 27.3628721741458 & 291.313550759440 & 361.177075243702 \tabularnewline
24 & 135.721642301387 & -66.1172877209977 & 3.74625969315207 & 267.697024909622 & 337.560572323772 \tabularnewline
25 & 112.105073135981 & -89.7339404944367 & -19.8703641406082 & 244.080510412571 & 313.944086766399 \tabularnewline
26 & 88.4885039705754 & -113.350612648901 & -43.48700064694 & 220.464008588091 & 290.327620590052 \tabularnewline
27 & 64.8719348051696 & -136.967306202850 & -67.1036511456423 & 196.847520755982 & 266.711175813189 \tabularnewline
28 & 41.2553656397639 & -160.584023174730 & -90.7203169565066 & 173.231048236034 & 243.094754454257 \tabularnewline
29 & 17.6387964743581 & -184.200765582974 & -114.336999399315 & 149.614592348032 & 219.478358531690 \tabularnewline
30 & -5.97777269104768 & -207.817535445999 & -137.953699793841 & 125.998154411745 & 195.861990063903 \tabularnewline
31 & -29.5943418564535 & -231.434334782204 & -161.570419459843 & 102.381735746936 & 172.245651069297 \tabularnewline
32 & -53.2109110218592 & -255.051165609966 & -185.187159717067 & 78.7653376733485 & 148.629343566247 \tabularnewline
33 & -76.827480187265 & -278.668029947637 & -208.803921885243 & 55.1489615107131 & 125.013069573107 \tabularnewline
34 & -100.444049352671 & -302.284929813542 & -232.420707284083 & 31.5326085787412 & 101.396831108200 \tabularnewline
35 & -124.060618518077 & -325.901867225974 & -256.037517233277 & 7.91628019712371 & 77.7806301898208 \tabularnewline
36 & -147.677187683482 & -349.518844203191 & -279.654353052493 & -15.7000223144712 & 54.1644688362267 \tabularnewline
37 & -171.293756848888 & -373.135862763413 & -303.271216061375 & -39.3162976364007 & 30.5483490656374 \tabularnewline
38 & -194.910326014294 & -396.752924924817 & -326.888107579538 & -62.93254444905 & 6.9322728962295 \tabularnewline
39 & -218.526895179700 & -420.370032705532 & -350.505028926564 & -86.5487614328352 & -16.6837576538674 \tabularnewline
40 & -242.143464345105 & -443.987188123635 & -374.121981422005 & -110.164947268206 & -40.2997405665755 \tabularnewline
41 & -265.760033510511 & -467.604393197149 & -397.738966385373 & -133.781100635649 & -63.9156738238731 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75958&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]277.421057293822[/C][C]75.5823349527226[/C][C]145.445810481080[/C][C]409.396304106563[/C][C]479.25977963492[/C][/ROW]
[ROW][C]19[/C][C]253.804488128416[/C][C]51.9657560774083[/C][C]121.829234966707[/C][C]385.779741290125[/C][C]455.643220179423[/C][/ROW]
[ROW][C]20[/C][C]230.18791896301[/C][C]28.3491699319568[/C][C]98.2126546986457[/C][C]362.163183227374[/C][C]432.026667994063[/C][/ROW]
[ROW][C]21[/C][C]206.571349797604[/C][C]4.73257449787738[/C][C]74.5960683570775[/C][C]338.546631238131[/C][C]408.410125097331[/C][/ROW]
[ROW][C]22[/C][C]182.954780632198[/C][C]-18.8840322433186[/C][C]50.9794746221831[/C][C]314.930086642214[/C][C]384.793593507716[/C][/ROW]
[ROW][C]23[/C][C]159.338211466793[/C][C]-42.5006523101167[/C][C]27.3628721741458[/C][C]291.313550759440[/C][C]361.177075243702[/C][/ROW]
[ROW][C]24[/C][C]135.721642301387[/C][C]-66.1172877209977[/C][C]3.74625969315207[/C][C]267.697024909622[/C][C]337.560572323772[/C][/ROW]
[ROW][C]25[/C][C]112.105073135981[/C][C]-89.7339404944367[/C][C]-19.8703641406082[/C][C]244.080510412571[/C][C]313.944086766399[/C][/ROW]
[ROW][C]26[/C][C]88.4885039705754[/C][C]-113.350612648901[/C][C]-43.48700064694[/C][C]220.464008588091[/C][C]290.327620590052[/C][/ROW]
[ROW][C]27[/C][C]64.8719348051696[/C][C]-136.967306202850[/C][C]-67.1036511456423[/C][C]196.847520755982[/C][C]266.711175813189[/C][/ROW]
[ROW][C]28[/C][C]41.2553656397639[/C][C]-160.584023174730[/C][C]-90.7203169565066[/C][C]173.231048236034[/C][C]243.094754454257[/C][/ROW]
[ROW][C]29[/C][C]17.6387964743581[/C][C]-184.200765582974[/C][C]-114.336999399315[/C][C]149.614592348032[/C][C]219.478358531690[/C][/ROW]
[ROW][C]30[/C][C]-5.97777269104768[/C][C]-207.817535445999[/C][C]-137.953699793841[/C][C]125.998154411745[/C][C]195.861990063903[/C][/ROW]
[ROW][C]31[/C][C]-29.5943418564535[/C][C]-231.434334782204[/C][C]-161.570419459843[/C][C]102.381735746936[/C][C]172.245651069297[/C][/ROW]
[ROW][C]32[/C][C]-53.2109110218592[/C][C]-255.051165609966[/C][C]-185.187159717067[/C][C]78.7653376733485[/C][C]148.629343566247[/C][/ROW]
[ROW][C]33[/C][C]-76.827480187265[/C][C]-278.668029947637[/C][C]-208.803921885243[/C][C]55.1489615107131[/C][C]125.013069573107[/C][/ROW]
[ROW][C]34[/C][C]-100.444049352671[/C][C]-302.284929813542[/C][C]-232.420707284083[/C][C]31.5326085787412[/C][C]101.396831108200[/C][/ROW]
[ROW][C]35[/C][C]-124.060618518077[/C][C]-325.901867225974[/C][C]-256.037517233277[/C][C]7.91628019712371[/C][C]77.7806301898208[/C][/ROW]
[ROW][C]36[/C][C]-147.677187683482[/C][C]-349.518844203191[/C][C]-279.654353052493[/C][C]-15.7000223144712[/C][C]54.1644688362267[/C][/ROW]
[ROW][C]37[/C][C]-171.293756848888[/C][C]-373.135862763413[/C][C]-303.271216061375[/C][C]-39.3162976364007[/C][C]30.5483490656374[/C][/ROW]
[ROW][C]38[/C][C]-194.910326014294[/C][C]-396.752924924817[/C][C]-326.888107579538[/C][C]-62.93254444905[/C][C]6.9322728962295[/C][/ROW]
[ROW][C]39[/C][C]-218.526895179700[/C][C]-420.370032705532[/C][C]-350.505028926564[/C][C]-86.5487614328352[/C][C]-16.6837576538674[/C][/ROW]
[ROW][C]40[/C][C]-242.143464345105[/C][C]-443.987188123635[/C][C]-374.121981422005[/C][C]-110.164947268206[/C][C]-40.2997405665755[/C][/ROW]
[ROW][C]41[/C][C]-265.760033510511[/C][C]-467.604393197149[/C][C]-397.738966385373[/C][C]-133.781100635649[/C][C]-63.9156738238731[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75958&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75958&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
18277.42105729382275.5823349527226145.445810481080409.396304106563479.25977963492
19253.80448812841651.9657560774083121.829234966707385.779741290125455.643220179423
20230.1879189630128.349169931956898.2126546986457362.163183227374432.026667994063
21206.5713497976044.7325744978773874.5960683570775338.546631238131408.410125097331
22182.954780632198-18.884032243318650.9794746221831314.930086642214384.793593507716
23159.338211466793-42.500652310116727.3628721741458291.313550759440361.177075243702
24135.721642301387-66.11728772099773.74625969315207267.697024909622337.560572323772
25112.105073135981-89.7339404944367-19.8703641406082244.080510412571313.944086766399
2688.4885039705754-113.350612648901-43.48700064694220.464008588091290.327620590052
2764.8719348051696-136.967306202850-67.1036511456423196.847520755982266.711175813189
2841.2553656397639-160.584023174730-90.7203169565066173.231048236034243.094754454257
2917.6387964743581-184.200765582974-114.336999399315149.614592348032219.478358531690
30-5.97777269104768-207.817535445999-137.953699793841125.998154411745195.861990063903
31-29.5943418564535-231.434334782204-161.570419459843102.381735746936172.245651069297
32-53.2109110218592-255.051165609966-185.18715971706778.7653376733485148.629343566247
33-76.827480187265-278.668029947637-208.80392188524355.1489615107131125.013069573107
34-100.444049352671-302.284929813542-232.42070728408331.5326085787412101.396831108200
35-124.060618518077-325.901867225974-256.0375172332777.9162801971237177.7806301898208
36-147.677187683482-349.518844203191-279.654353052493-15.700022314471254.1644688362267
37-171.293756848888-373.135862763413-303.271216061375-39.316297636400730.5483490656374
38-194.910326014294-396.752924924817-326.888107579538-62.932544449056.9322728962295
39-218.526895179700-420.370032705532-350.505028926564-86.5487614328352-16.6837576538674
40-242.143464345105-443.987188123635-374.121981422005-110.164947268206-40.2997405665755
41-265.760033510511-467.604393197149-397.738966385373-133.781100635649-63.9156738238731







Actuals and Interpolation
TimeActualForecast
1721.8416667678.894276907849
2644.5833333655.301646093303
3554.4333333631.702030563305
4562.9666667608.087355478031
5711.675584.471710254483
6531.1083333560.887772249836
7379.95537.283559956972
8336.25513.649560056135
9370.175489.995608873635
10493.0833333466.336019331437
11657.7666667442.695253359724
12533.4583333419.096744533836
13402.2833333395.498576016643
14267.3416667371.889233239938
15447.5416667348.257168901305
16297.7583333324.657491371801
17268.4166667301.041221013742

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 721.8416667 & 678.894276907849 \tabularnewline
2 & 644.5833333 & 655.301646093303 \tabularnewline
3 & 554.4333333 & 631.702030563305 \tabularnewline
4 & 562.9666667 & 608.087355478031 \tabularnewline
5 & 711.675 & 584.471710254483 \tabularnewline
6 & 531.1083333 & 560.887772249836 \tabularnewline
7 & 379.95 & 537.283559956972 \tabularnewline
8 & 336.25 & 513.649560056135 \tabularnewline
9 & 370.175 & 489.995608873635 \tabularnewline
10 & 493.0833333 & 466.336019331437 \tabularnewline
11 & 657.7666667 & 442.695253359724 \tabularnewline
12 & 533.4583333 & 419.096744533836 \tabularnewline
13 & 402.2833333 & 395.498576016643 \tabularnewline
14 & 267.3416667 & 371.889233239938 \tabularnewline
15 & 447.5416667 & 348.257168901305 \tabularnewline
16 & 297.7583333 & 324.657491371801 \tabularnewline
17 & 268.4166667 & 301.041221013742 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75958&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]721.8416667[/C][C]678.894276907849[/C][/ROW]
[ROW][C]2[/C][C]644.5833333[/C][C]655.301646093303[/C][/ROW]
[ROW][C]3[/C][C]554.4333333[/C][C]631.702030563305[/C][/ROW]
[ROW][C]4[/C][C]562.9666667[/C][C]608.087355478031[/C][/ROW]
[ROW][C]5[/C][C]711.675[/C][C]584.471710254483[/C][/ROW]
[ROW][C]6[/C][C]531.1083333[/C][C]560.887772249836[/C][/ROW]
[ROW][C]7[/C][C]379.95[/C][C]537.283559956972[/C][/ROW]
[ROW][C]8[/C][C]336.25[/C][C]513.649560056135[/C][/ROW]
[ROW][C]9[/C][C]370.175[/C][C]489.995608873635[/C][/ROW]
[ROW][C]10[/C][C]493.0833333[/C][C]466.336019331437[/C][/ROW]
[ROW][C]11[/C][C]657.7666667[/C][C]442.695253359724[/C][/ROW]
[ROW][C]12[/C][C]533.4583333[/C][C]419.096744533836[/C][/ROW]
[ROW][C]13[/C][C]402.2833333[/C][C]395.498576016643[/C][/ROW]
[ROW][C]14[/C][C]267.3416667[/C][C]371.889233239938[/C][/ROW]
[ROW][C]15[/C][C]447.5416667[/C][C]348.257168901305[/C][/ROW]
[ROW][C]16[/C][C]297.7583333[/C][C]324.657491371801[/C][/ROW]
[ROW][C]17[/C][C]268.4166667[/C][C]301.041221013742[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75958&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75958&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
1721.8416667678.894276907849
2644.5833333655.301646093303
3554.4333333631.702030563305
4562.9666667608.087355478031
5711.675584.471710254483
6531.1083333560.887772249836
7379.95537.283559956972
8336.25513.649560056135
9370.175489.995608873635
10493.0833333466.336019331437
11657.7666667442.695253359724
12533.4583333419.096744533836
13402.2833333395.498576016643
14267.3416667371.889233239938
15447.5416667348.257168901305
16297.7583333324.657491371801
17268.4166667301.041221013742







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

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