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:59:25 +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/t1273759199kn61t8tsd90cgt7.htm/, Retrieved Sun, 05 May 2024 20:44:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75946, Retrieved Sun, 05 May 2024 20:44:45 +0000
QR Codes:

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

Post a new message
Dataseries X:
266.75
275.9833333
265.1016667
203.9416667
193.25
243.9416667
219.6583333
131.4436667
144.1833333
207.4166667
117.0666667
58.66666667
145.7583333
206.7033333
149.7666667
87.06666667
121.9083333




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75946&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
18143.830631844129111.030487856027122.383770468304165.277493219955176.630775832231
19138.644142778748101.027769982514114.048118654133163.240166903363176.260515574982
2083.68575648757557.846065594306766.790090761744100.581422213406109.525447380843
2196.78763389106463.654776548945675.1232229464301118.452044835698129.920491233182
22153.39496831911196.1732416586328115.979692342951190.810244295271210.616694979589
2391.802603237604354.938873413830267.6987059006553115.906500574553128.666333061378
2446.306184728139226.472265763580133.33748219053659.274887265742466.1401036926983
25142.94995818390478.101160800415100.547608719305185.352307648503207.798755567393
26172.50549917033290.0890484553868118.616278616540226.394719724125254.921949885278
27146.27725880499873.015728677030698.3741190686204194.180398541376219.538788932965
28101.66857007510748.493743023328666.8994195226993136.437720627515154.843397126885
29117.63712192971953.593709153659275.7613851542602159.512858705177181.680534705778
30143.83075671033762.549456027425990.6837708670586196.977742553616225.112057393249
31138.64426314231857.510878792705985.5939945907878191.694531693849219.777647491931
3283.68582913915833.080644741028550.5968776065536116.774780671762134.291013537288
3396.787717917009436.420189020507957.3155124195571136.259923414462157.155246813511
34153.39510148857454.876252995268488.9770889545958217.813114022552251.91394998188
3591.802682935807831.178176082448952.1624485839894131.442917287626152.427189789167
3646.306224928739214.905343165901225.774291944220966.838157913257577.7071066915771
37142.95008228555743.529528582652577.9424764059173207.957688165197242.370635988462
38172.50564893055649.588748822673192.134607927926252.876689933186295.422549038439
39146.27738579523939.600459622421176.5250929864797216.029678603999252.954311968057
40101.66865833842525.851053464352952.0941911601363151.243125516714177.486263212498
41117.63722405609628.007137434132559.0312605096631176.243187602528207.267310678059

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 143.830631844129 & 111.030487856027 & 122.383770468304 & 165.277493219955 & 176.630775832231 \tabularnewline
19 & 138.644142778748 & 101.027769982514 & 114.048118654133 & 163.240166903363 & 176.260515574982 \tabularnewline
20 & 83.685756487575 & 57.8460655943067 & 66.790090761744 & 100.581422213406 & 109.525447380843 \tabularnewline
21 & 96.787633891064 & 63.6547765489456 & 75.1232229464301 & 118.452044835698 & 129.920491233182 \tabularnewline
22 & 153.394968319111 & 96.1732416586328 & 115.979692342951 & 190.810244295271 & 210.616694979589 \tabularnewline
23 & 91.8026032376043 & 54.9388734138302 & 67.6987059006553 & 115.906500574553 & 128.666333061378 \tabularnewline
24 & 46.3061847281392 & 26.4722657635801 & 33.337482190536 & 59.2748872657424 & 66.1401036926983 \tabularnewline
25 & 142.949958183904 & 78.101160800415 & 100.547608719305 & 185.352307648503 & 207.798755567393 \tabularnewline
26 & 172.505499170332 & 90.0890484553868 & 118.616278616540 & 226.394719724125 & 254.921949885278 \tabularnewline
27 & 146.277258804998 & 73.0157286770306 & 98.3741190686204 & 194.180398541376 & 219.538788932965 \tabularnewline
28 & 101.668570075107 & 48.4937430233286 & 66.8994195226993 & 136.437720627515 & 154.843397126885 \tabularnewline
29 & 117.637121929719 & 53.5937091536592 & 75.7613851542602 & 159.512858705177 & 181.680534705778 \tabularnewline
30 & 143.830756710337 & 62.5494560274259 & 90.6837708670586 & 196.977742553616 & 225.112057393249 \tabularnewline
31 & 138.644263142318 & 57.5108787927059 & 85.5939945907878 & 191.694531693849 & 219.777647491931 \tabularnewline
32 & 83.685829139158 & 33.0806447410285 & 50.5968776065536 & 116.774780671762 & 134.291013537288 \tabularnewline
33 & 96.7877179170094 & 36.4201890205079 & 57.3155124195571 & 136.259923414462 & 157.155246813511 \tabularnewline
34 & 153.395101488574 & 54.8762529952684 & 88.9770889545958 & 217.813114022552 & 251.91394998188 \tabularnewline
35 & 91.8026829358078 & 31.1781760824489 & 52.1624485839894 & 131.442917287626 & 152.427189789167 \tabularnewline
36 & 46.3062249287392 & 14.9053431659012 & 25.7742919442209 & 66.8381579132575 & 77.7071066915771 \tabularnewline
37 & 142.950082285557 & 43.5295285826525 & 77.9424764059173 & 207.957688165197 & 242.370635988462 \tabularnewline
38 & 172.505648930556 & 49.5887488226731 & 92.134607927926 & 252.876689933186 & 295.422549038439 \tabularnewline
39 & 146.277385795239 & 39.6004596224211 & 76.5250929864797 & 216.029678603999 & 252.954311968057 \tabularnewline
40 & 101.668658338425 & 25.8510534643529 & 52.0941911601363 & 151.243125516714 & 177.486263212498 \tabularnewline
41 & 117.637224056096 & 28.0071374341325 & 59.0312605096631 & 176.243187602528 & 207.267310678059 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75946&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]143.830631844129[/C][C]111.030487856027[/C][C]122.383770468304[/C][C]165.277493219955[/C][C]176.630775832231[/C][/ROW]
[ROW][C]19[/C][C]138.644142778748[/C][C]101.027769982514[/C][C]114.048118654133[/C][C]163.240166903363[/C][C]176.260515574982[/C][/ROW]
[ROW][C]20[/C][C]83.685756487575[/C][C]57.8460655943067[/C][C]66.790090761744[/C][C]100.581422213406[/C][C]109.525447380843[/C][/ROW]
[ROW][C]21[/C][C]96.787633891064[/C][C]63.6547765489456[/C][C]75.1232229464301[/C][C]118.452044835698[/C][C]129.920491233182[/C][/ROW]
[ROW][C]22[/C][C]153.394968319111[/C][C]96.1732416586328[/C][C]115.979692342951[/C][C]190.810244295271[/C][C]210.616694979589[/C][/ROW]
[ROW][C]23[/C][C]91.8026032376043[/C][C]54.9388734138302[/C][C]67.6987059006553[/C][C]115.906500574553[/C][C]128.666333061378[/C][/ROW]
[ROW][C]24[/C][C]46.3061847281392[/C][C]26.4722657635801[/C][C]33.337482190536[/C][C]59.2748872657424[/C][C]66.1401036926983[/C][/ROW]
[ROW][C]25[/C][C]142.949958183904[/C][C]78.101160800415[/C][C]100.547608719305[/C][C]185.352307648503[/C][C]207.798755567393[/C][/ROW]
[ROW][C]26[/C][C]172.505499170332[/C][C]90.0890484553868[/C][C]118.616278616540[/C][C]226.394719724125[/C][C]254.921949885278[/C][/ROW]
[ROW][C]27[/C][C]146.277258804998[/C][C]73.0157286770306[/C][C]98.3741190686204[/C][C]194.180398541376[/C][C]219.538788932965[/C][/ROW]
[ROW][C]28[/C][C]101.668570075107[/C][C]48.4937430233286[/C][C]66.8994195226993[/C][C]136.437720627515[/C][C]154.843397126885[/C][/ROW]
[ROW][C]29[/C][C]117.637121929719[/C][C]53.5937091536592[/C][C]75.7613851542602[/C][C]159.512858705177[/C][C]181.680534705778[/C][/ROW]
[ROW][C]30[/C][C]143.830756710337[/C][C]62.5494560274259[/C][C]90.6837708670586[/C][C]196.977742553616[/C][C]225.112057393249[/C][/ROW]
[ROW][C]31[/C][C]138.644263142318[/C][C]57.5108787927059[/C][C]85.5939945907878[/C][C]191.694531693849[/C][C]219.777647491931[/C][/ROW]
[ROW][C]32[/C][C]83.685829139158[/C][C]33.0806447410285[/C][C]50.5968776065536[/C][C]116.774780671762[/C][C]134.291013537288[/C][/ROW]
[ROW][C]33[/C][C]96.7877179170094[/C][C]36.4201890205079[/C][C]57.3155124195571[/C][C]136.259923414462[/C][C]157.155246813511[/C][/ROW]
[ROW][C]34[/C][C]153.395101488574[/C][C]54.8762529952684[/C][C]88.9770889545958[/C][C]217.813114022552[/C][C]251.91394998188[/C][/ROW]
[ROW][C]35[/C][C]91.8026829358078[/C][C]31.1781760824489[/C][C]52.1624485839894[/C][C]131.442917287626[/C][C]152.427189789167[/C][/ROW]
[ROW][C]36[/C][C]46.3062249287392[/C][C]14.9053431659012[/C][C]25.7742919442209[/C][C]66.8381579132575[/C][C]77.7071066915771[/C][/ROW]
[ROW][C]37[/C][C]142.950082285557[/C][C]43.5295285826525[/C][C]77.9424764059173[/C][C]207.957688165197[/C][C]242.370635988462[/C][/ROW]
[ROW][C]38[/C][C]172.505648930556[/C][C]49.5887488226731[/C][C]92.134607927926[/C][C]252.876689933186[/C][C]295.422549038439[/C][/ROW]
[ROW][C]39[/C][C]146.277385795239[/C][C]39.6004596224211[/C][C]76.5250929864797[/C][C]216.029678603999[/C][C]252.954311968057[/C][/ROW]
[ROW][C]40[/C][C]101.668658338425[/C][C]25.8510534643529[/C][C]52.0941911601363[/C][C]151.243125516714[/C][C]177.486263212498[/C][/ROW]
[ROW][C]41[/C][C]117.637224056096[/C][C]28.0071374341325[/C][C]59.0312605096631[/C][C]176.243187602528[/C][C]207.267310678059[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75946&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75946&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
18143.830631844129111.030487856027122.383770468304165.277493219955176.630775832231
19138.644142778748101.027769982514114.048118654133163.240166903363176.260515574982
2083.68575648757557.846065594306766.790090761744100.581422213406109.525447380843
2196.78763389106463.654776548945675.1232229464301118.452044835698129.920491233182
22153.39496831911196.1732416586328115.979692342951190.810244295271210.616694979589
2391.802603237604354.938873413830267.6987059006553115.906500574553128.666333061378
2446.306184728139226.472265763580133.33748219053659.274887265742466.1401036926983
25142.94995818390478.101160800415100.547608719305185.352307648503207.798755567393
26172.50549917033290.0890484553868118.616278616540226.394719724125254.921949885278
27146.27725880499873.015728677030698.3741190686204194.180398541376219.538788932965
28101.66857007510748.493743023328666.8994195226993136.437720627515154.843397126885
29117.63712192971953.593709153659275.7613851542602159.512858705177181.680534705778
30143.83075671033762.549456027425990.6837708670586196.977742553616225.112057393249
31138.64426314231857.510878792705985.5939945907878191.694531693849219.777647491931
3283.68582913915833.080644741028550.5968776065536116.774780671762134.291013537288
3396.787717917009436.420189020507957.3155124195571136.259923414462157.155246813511
34153.39510148857454.876252995268488.9770889545958217.813114022552251.91394998188
3591.802682935807831.178176082448952.1624485839894131.442917287626152.427189789167
3646.306224928739214.905343165901225.774291944220966.838157913257577.7071066915771
37142.95008228555743.529528582652577.9424764059173207.957688165197242.370635988462
38172.50564893055649.588748822673192.134607927926252.876689933186295.422549038439
39146.27738579523939.600459622421176.5250929864797216.029678603999252.954311968057
40101.66865833842525.851053464352952.0941911601363151.243125516714177.486263212498
41117.63722405609628.007137434132559.0312605096631176.243187602528207.267310678059







Actuals and Interpolation
TimeActualForecast
1266.75266.617607125701
2275.9833333276.088333584272
3265.1016667265.014734775144
4203.9416667203.802043435154
5193.25193.393291007573
6243.9416667243.967834175893
7219.6583333219.733142185790
8131.4436667131.480301410762
9144.1833333144.247701820835
10207.4166667207.530903768772
11117.0666667117.165406707309
1258.6666666758.7108196353064
13145.7583333145.966685166947
14206.7033333206.629788968521
15149.7666667149.890629754491
1687.0666666787.2707645941195
17121.9083333121.800397536141

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 266.75 & 266.617607125701 \tabularnewline
2 & 275.9833333 & 276.088333584272 \tabularnewline
3 & 265.1016667 & 265.014734775144 \tabularnewline
4 & 203.9416667 & 203.802043435154 \tabularnewline
5 & 193.25 & 193.393291007573 \tabularnewline
6 & 243.9416667 & 243.967834175893 \tabularnewline
7 & 219.6583333 & 219.733142185790 \tabularnewline
8 & 131.4436667 & 131.480301410762 \tabularnewline
9 & 144.1833333 & 144.247701820835 \tabularnewline
10 & 207.4166667 & 207.530903768772 \tabularnewline
11 & 117.0666667 & 117.165406707309 \tabularnewline
12 & 58.66666667 & 58.7108196353064 \tabularnewline
13 & 145.7583333 & 145.966685166947 \tabularnewline
14 & 206.7033333 & 206.629788968521 \tabularnewline
15 & 149.7666667 & 149.890629754491 \tabularnewline
16 & 87.06666667 & 87.2707645941195 \tabularnewline
17 & 121.9083333 & 121.800397536141 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75946&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]266.75[/C][C]266.617607125701[/C][/ROW]
[ROW][C]2[/C][C]275.9833333[/C][C]276.088333584272[/C][/ROW]
[ROW][C]3[/C][C]265.1016667[/C][C]265.014734775144[/C][/ROW]
[ROW][C]4[/C][C]203.9416667[/C][C]203.802043435154[/C][/ROW]
[ROW][C]5[/C][C]193.25[/C][C]193.393291007573[/C][/ROW]
[ROW][C]6[/C][C]243.9416667[/C][C]243.967834175893[/C][/ROW]
[ROW][C]7[/C][C]219.6583333[/C][C]219.733142185790[/C][/ROW]
[ROW][C]8[/C][C]131.4436667[/C][C]131.480301410762[/C][/ROW]
[ROW][C]9[/C][C]144.1833333[/C][C]144.247701820835[/C][/ROW]
[ROW][C]10[/C][C]207.4166667[/C][C]207.530903768772[/C][/ROW]
[ROW][C]11[/C][C]117.0666667[/C][C]117.165406707309[/C][/ROW]
[ROW][C]12[/C][C]58.66666667[/C][C]58.7108196353064[/C][/ROW]
[ROW][C]13[/C][C]145.7583333[/C][C]145.966685166947[/C][/ROW]
[ROW][C]14[/C][C]206.7033333[/C][C]206.629788968521[/C][/ROW]
[ROW][C]15[/C][C]149.7666667[/C][C]149.890629754491[/C][/ROW]
[ROW][C]16[/C][C]87.06666667[/C][C]87.2707645941195[/C][/ROW]
[ROW][C]17[/C][C]121.9083333[/C][C]121.800397536141[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75946&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75946&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
1266.75266.617607125701
2275.9833333276.088333584272
3265.1016667265.014734775144
4203.9416667203.802043435154
5193.25193.393291007573
6243.9416667243.967834175893
7219.6583333219.733142185790
8131.4436667131.480301410762
9144.1833333144.247701820835
10207.4166667207.530903768772
11117.0666667117.165406707309
1258.6666666758.7108196353064
13145.7583333145.966685166947
14206.7033333206.629788968521
15149.7666667149.890629754491
1687.0666666787.2707645941195
17121.9083333121.800397536141







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

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