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

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

Post a new message
Dataseries X:
10,65
34
81,75
106,5
0,525
24,025
5,25
9
12,8
25,05
0,3
75,75
54,75
1,526
1,02
3,752
17,25
9,2
50,25
2,25
3,95
60
55,8
6,75
61,95
7,025
85,75
18,525
6
25,35
46,775
51,025
30
3
30
44
80,75
27,5
39,725
29,25
32,725
56,25
28,65
51,75
32,26
72
65,4
33,75
77,85
10,875




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75875&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
5142.0959719500054-14.03814166457255.3918479198372378.800095980173798.2300855645834
5242.0959719500054-14.31811404283225.2087838214669578.98316007854498.5100579428431
5342.0959719500054-14.59670381609535.0266237599116479.165320140099298.7886477161062
5442.0959719500054-14.87393126768644.8453544726181779.346589427392799.0658751676972
5542.0959719500054-15.1498161897884.6649630181739479.52698088183799.3417600897989
5642.0959719500054-15.42437789993084.4854367655246279.706507134486399.6163217999417
5742.0959719500054-15.69763525677834.3067633836529479.88518051635899.8895791567892
5842.0959719500054-15.96960667524334.1289308316945680.0630130683163100.161550575254
5942.0959719500054-16.24031014097023.951927349468880.2400165505421100.432254040981
6042.0959719500054-16.50976322421483.7757414484029280.416202451608100.701707124226

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
51 & 42.0959719500054 & -14.0381416645725 & 5.39184791983723 & 78.8000959801737 & 98.2300855645834 \tabularnewline
52 & 42.0959719500054 & -14.3181140428322 & 5.20878382146695 & 78.983160078544 & 98.5100579428431 \tabularnewline
53 & 42.0959719500054 & -14.5967038160953 & 5.02662375991164 & 79.1653201400992 & 98.7886477161062 \tabularnewline
54 & 42.0959719500054 & -14.8739312676864 & 4.84535447261817 & 79.3465894273927 & 99.0658751676972 \tabularnewline
55 & 42.0959719500054 & -15.149816189788 & 4.66496301817394 & 79.526980881837 & 99.3417600897989 \tabularnewline
56 & 42.0959719500054 & -15.4243778999308 & 4.48543676552462 & 79.7065071344863 & 99.6163217999417 \tabularnewline
57 & 42.0959719500054 & -15.6976352567783 & 4.30676338365294 & 79.885180516358 & 99.8895791567892 \tabularnewline
58 & 42.0959719500054 & -15.9696066752433 & 4.12893083169456 & 80.0630130683163 & 100.161550575254 \tabularnewline
59 & 42.0959719500054 & -16.2403101409702 & 3.9519273494688 & 80.2400165505421 & 100.432254040981 \tabularnewline
60 & 42.0959719500054 & -16.5097632242148 & 3.77574144840292 & 80.416202451608 & 100.701707124226 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75875&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]51[/C][C]42.0959719500054[/C][C]-14.0381416645725[/C][C]5.39184791983723[/C][C]78.8000959801737[/C][C]98.2300855645834[/C][/ROW]
[ROW][C]52[/C][C]42.0959719500054[/C][C]-14.3181140428322[/C][C]5.20878382146695[/C][C]78.983160078544[/C][C]98.5100579428431[/C][/ROW]
[ROW][C]53[/C][C]42.0959719500054[/C][C]-14.5967038160953[/C][C]5.02662375991164[/C][C]79.1653201400992[/C][C]98.7886477161062[/C][/ROW]
[ROW][C]54[/C][C]42.0959719500054[/C][C]-14.8739312676864[/C][C]4.84535447261817[/C][C]79.3465894273927[/C][C]99.0658751676972[/C][/ROW]
[ROW][C]55[/C][C]42.0959719500054[/C][C]-15.149816189788[/C][C]4.66496301817394[/C][C]79.526980881837[/C][C]99.3417600897989[/C][/ROW]
[ROW][C]56[/C][C]42.0959719500054[/C][C]-15.4243778999308[/C][C]4.48543676552462[/C][C]79.7065071344863[/C][C]99.6163217999417[/C][/ROW]
[ROW][C]57[/C][C]42.0959719500054[/C][C]-15.6976352567783[/C][C]4.30676338365294[/C][C]79.885180516358[/C][C]99.8895791567892[/C][/ROW]
[ROW][C]58[/C][C]42.0959719500054[/C][C]-15.9696066752433[/C][C]4.12893083169456[/C][C]80.0630130683163[/C][C]100.161550575254[/C][/ROW]
[ROW][C]59[/C][C]42.0959719500054[/C][C]-16.2403101409702[/C][C]3.9519273494688[/C][C]80.2400165505421[/C][C]100.432254040981[/C][/ROW]
[ROW][C]60[/C][C]42.0959719500054[/C][C]-16.5097632242148[/C][C]3.77574144840292[/C][C]80.416202451608[/C][C]100.701707124226[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75875&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75875&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
5142.0959719500054-14.03814166457255.3918479198372378.800095980173798.2300855645834
5242.0959719500054-14.31811404283225.2087838214669578.98316007854498.5100579428431
5342.0959719500054-14.59670381609535.0266237599116479.165320140099298.7886477161062
5442.0959719500054-14.87393126768644.8453544726181779.346589427392799.0658751676972
5542.0959719500054-15.1498161897884.6649630181739479.52698088183799.3417600897989
5642.0959719500054-15.42437789993084.4854367655246279.706507134486399.6163217999417
5742.0959719500054-15.69763525677834.3067633836529479.88518051635899.8895791567892
5842.0959719500054-15.96960667524334.1289308316945680.0630130683163100.161550575254
5942.0959719500054-16.24031014097023.951927349468880.2400165505421100.432254040981
6042.0959719500054-16.50976322421483.7757414484029280.416202451608100.701707124226







Actuals and Interpolation
TimeActualForecast
110.65NA
23410.65
381.7512.985
4106.519.8615
50.52528.52535
624.02525.725315
75.2525.5552835
8923.52475515
912.822.072279635
1025.0521.1450516715
110.321.53554650435
1275.7519.411991853915
1354.7525.0457926685235
141.52628.0162134016712
151.0225.3671920615040
163.75222.9324728553536
1717.2521.0144255698183
189.220.6379830128364
1950.2519.4941847115528
202.2522.5697662403975
213.9520.5377896163578
226018.879010654722
2355.822.9911095892498
246.7526.2719986303248
2561.9524.3197987672923
267.02528.0828188905631
2785.7525.9770370015068
2818.52531.9543333013561
29630.6113999712205
3025.3528.1502599740985
3146.77527.8702339766886
3251.02529.7607105790198
333031.8871395211178
34331.698425569006
353028.8285830121054
364428.9457247108949
3780.7530.4511522398054
3827.535.4810370158248
3939.72534.6829333142424
4029.2535.1871399828181
4132.72534.5934259845363
4256.2534.4065833860827
4328.6536.5909250474744
4451.7535.796832542727
4532.2637.3921492884543
467236.8789343596088
4765.440.391040923648
4833.7542.8919368312832
4977.8541.9777431481549
5010.87545.5649688333394

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 10.65 & NA \tabularnewline
2 & 34 & 10.65 \tabularnewline
3 & 81.75 & 12.985 \tabularnewline
4 & 106.5 & 19.8615 \tabularnewline
5 & 0.525 & 28.52535 \tabularnewline
6 & 24.025 & 25.725315 \tabularnewline
7 & 5.25 & 25.5552835 \tabularnewline
8 & 9 & 23.52475515 \tabularnewline
9 & 12.8 & 22.072279635 \tabularnewline
10 & 25.05 & 21.1450516715 \tabularnewline
11 & 0.3 & 21.53554650435 \tabularnewline
12 & 75.75 & 19.411991853915 \tabularnewline
13 & 54.75 & 25.0457926685235 \tabularnewline
14 & 1.526 & 28.0162134016712 \tabularnewline
15 & 1.02 & 25.3671920615040 \tabularnewline
16 & 3.752 & 22.9324728553536 \tabularnewline
17 & 17.25 & 21.0144255698183 \tabularnewline
18 & 9.2 & 20.6379830128364 \tabularnewline
19 & 50.25 & 19.4941847115528 \tabularnewline
20 & 2.25 & 22.5697662403975 \tabularnewline
21 & 3.95 & 20.5377896163578 \tabularnewline
22 & 60 & 18.879010654722 \tabularnewline
23 & 55.8 & 22.9911095892498 \tabularnewline
24 & 6.75 & 26.2719986303248 \tabularnewline
25 & 61.95 & 24.3197987672923 \tabularnewline
26 & 7.025 & 28.0828188905631 \tabularnewline
27 & 85.75 & 25.9770370015068 \tabularnewline
28 & 18.525 & 31.9543333013561 \tabularnewline
29 & 6 & 30.6113999712205 \tabularnewline
30 & 25.35 & 28.1502599740985 \tabularnewline
31 & 46.775 & 27.8702339766886 \tabularnewline
32 & 51.025 & 29.7607105790198 \tabularnewline
33 & 30 & 31.8871395211178 \tabularnewline
34 & 3 & 31.698425569006 \tabularnewline
35 & 30 & 28.8285830121054 \tabularnewline
36 & 44 & 28.9457247108949 \tabularnewline
37 & 80.75 & 30.4511522398054 \tabularnewline
38 & 27.5 & 35.4810370158248 \tabularnewline
39 & 39.725 & 34.6829333142424 \tabularnewline
40 & 29.25 & 35.1871399828181 \tabularnewline
41 & 32.725 & 34.5934259845363 \tabularnewline
42 & 56.25 & 34.4065833860827 \tabularnewline
43 & 28.65 & 36.5909250474744 \tabularnewline
44 & 51.75 & 35.796832542727 \tabularnewline
45 & 32.26 & 37.3921492884543 \tabularnewline
46 & 72 & 36.8789343596088 \tabularnewline
47 & 65.4 & 40.391040923648 \tabularnewline
48 & 33.75 & 42.8919368312832 \tabularnewline
49 & 77.85 & 41.9777431481549 \tabularnewline
50 & 10.875 & 45.5649688333394 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75875&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]10.65[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]34[/C][C]10.65[/C][/ROW]
[ROW][C]3[/C][C]81.75[/C][C]12.985[/C][/ROW]
[ROW][C]4[/C][C]106.5[/C][C]19.8615[/C][/ROW]
[ROW][C]5[/C][C]0.525[/C][C]28.52535[/C][/ROW]
[ROW][C]6[/C][C]24.025[/C][C]25.725315[/C][/ROW]
[ROW][C]7[/C][C]5.25[/C][C]25.5552835[/C][/ROW]
[ROW][C]8[/C][C]9[/C][C]23.52475515[/C][/ROW]
[ROW][C]9[/C][C]12.8[/C][C]22.072279635[/C][/ROW]
[ROW][C]10[/C][C]25.05[/C][C]21.1450516715[/C][/ROW]
[ROW][C]11[/C][C]0.3[/C][C]21.53554650435[/C][/ROW]
[ROW][C]12[/C][C]75.75[/C][C]19.411991853915[/C][/ROW]
[ROW][C]13[/C][C]54.75[/C][C]25.0457926685235[/C][/ROW]
[ROW][C]14[/C][C]1.526[/C][C]28.0162134016712[/C][/ROW]
[ROW][C]15[/C][C]1.02[/C][C]25.3671920615040[/C][/ROW]
[ROW][C]16[/C][C]3.752[/C][C]22.9324728553536[/C][/ROW]
[ROW][C]17[/C][C]17.25[/C][C]21.0144255698183[/C][/ROW]
[ROW][C]18[/C][C]9.2[/C][C]20.6379830128364[/C][/ROW]
[ROW][C]19[/C][C]50.25[/C][C]19.4941847115528[/C][/ROW]
[ROW][C]20[/C][C]2.25[/C][C]22.5697662403975[/C][/ROW]
[ROW][C]21[/C][C]3.95[/C][C]20.5377896163578[/C][/ROW]
[ROW][C]22[/C][C]60[/C][C]18.879010654722[/C][/ROW]
[ROW][C]23[/C][C]55.8[/C][C]22.9911095892498[/C][/ROW]
[ROW][C]24[/C][C]6.75[/C][C]26.2719986303248[/C][/ROW]
[ROW][C]25[/C][C]61.95[/C][C]24.3197987672923[/C][/ROW]
[ROW][C]26[/C][C]7.025[/C][C]28.0828188905631[/C][/ROW]
[ROW][C]27[/C][C]85.75[/C][C]25.9770370015068[/C][/ROW]
[ROW][C]28[/C][C]18.525[/C][C]31.9543333013561[/C][/ROW]
[ROW][C]29[/C][C]6[/C][C]30.6113999712205[/C][/ROW]
[ROW][C]30[/C][C]25.35[/C][C]28.1502599740985[/C][/ROW]
[ROW][C]31[/C][C]46.775[/C][C]27.8702339766886[/C][/ROW]
[ROW][C]32[/C][C]51.025[/C][C]29.7607105790198[/C][/ROW]
[ROW][C]33[/C][C]30[/C][C]31.8871395211178[/C][/ROW]
[ROW][C]34[/C][C]3[/C][C]31.698425569006[/C][/ROW]
[ROW][C]35[/C][C]30[/C][C]28.8285830121054[/C][/ROW]
[ROW][C]36[/C][C]44[/C][C]28.9457247108949[/C][/ROW]
[ROW][C]37[/C][C]80.75[/C][C]30.4511522398054[/C][/ROW]
[ROW][C]38[/C][C]27.5[/C][C]35.4810370158248[/C][/ROW]
[ROW][C]39[/C][C]39.725[/C][C]34.6829333142424[/C][/ROW]
[ROW][C]40[/C][C]29.25[/C][C]35.1871399828181[/C][/ROW]
[ROW][C]41[/C][C]32.725[/C][C]34.5934259845363[/C][/ROW]
[ROW][C]42[/C][C]56.25[/C][C]34.4065833860827[/C][/ROW]
[ROW][C]43[/C][C]28.65[/C][C]36.5909250474744[/C][/ROW]
[ROW][C]44[/C][C]51.75[/C][C]35.796832542727[/C][/ROW]
[ROW][C]45[/C][C]32.26[/C][C]37.3921492884543[/C][/ROW]
[ROW][C]46[/C][C]72[/C][C]36.8789343596088[/C][/ROW]
[ROW][C]47[/C][C]65.4[/C][C]40.391040923648[/C][/ROW]
[ROW][C]48[/C][C]33.75[/C][C]42.8919368312832[/C][/ROW]
[ROW][C]49[/C][C]77.85[/C][C]41.9777431481549[/C][/ROW]
[ROW][C]50[/C][C]10.875[/C][C]45.5649688333394[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75875&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75875&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
110.65NA
23410.65
381.7512.985
4106.519.8615
50.52528.52535
624.02525.725315
75.2525.5552835
8923.52475515
912.822.072279635
1025.0521.1450516715
110.321.53554650435
1275.7519.411991853915
1354.7525.0457926685235
141.52628.0162134016712
151.0225.3671920615040
163.75222.9324728553536
1717.2521.0144255698183
189.220.6379830128364
1950.2519.4941847115528
202.2522.5697662403975
213.9520.5377896163578
226018.879010654722
2355.822.9911095892498
246.7526.2719986303248
2561.9524.3197987672923
267.02528.0828188905631
2785.7525.9770370015068
2818.52531.9543333013561
29630.6113999712205
3025.3528.1502599740985
3146.77527.8702339766886
3251.02529.7607105790198
333031.8871395211178
34331.698425569006
353028.8285830121054
364428.9457247108949
3780.7530.4511522398054
3827.535.4810370158248
3939.72534.6829333142424
4029.2535.1871399828181
4132.72534.5934259845363
4256.2534.4065833860827
4328.6536.5909250474744
4451.7535.796832542727
4532.2637.3921492884543
467236.8789343596088
4765.440.391040923648
4833.7542.8919368312832
4977.8541.9777431481549
5010.87545.5649688333394







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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75875&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 = Croston ; par3 = NA ; par4 = NA ; par5 = ZZZ ; par6 = 12 ; par7 = dum ; par8 = dumresult ; par9 = 3 ; par10 = 0.1 ;
Parameters (R input):
par1 = Input box ; par2 = Croston ; 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