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:55:37 +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/t127375897659pst6ncmhptk2o.htm/, Retrieved Sun, 05 May 2024 21:21:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=75943, Retrieved Sun, 05 May 2024 21:21:05 +0000
QR Codes:

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

Post a new message
Dataseries X:
275.0916667
401.3423333
260.6333333
286.1
368.0833333
385.1916667
181.5333333
145.1
203.1833333
227.5833333
239.0833333
109.175
231.0833333
216.9166667
229.8583333
272.7916667
155.0833333




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

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







Demand Forecast
PointForecast95% LB80% LB80% UB95% UB
18207.42493279826294.5096117667222133.593572842993281.256292753531320.340253829802
19207.42493279826287.2584199716981128.852273375106285.997592221418327.591445624826
20207.42493279826280.3574032157714124.339941058202290.509924538322334.492462380752
21207.42493279826273.7517460449962120.020733993464294.82913160306341.098119551528
22207.42493279826267.3990925974477115.866957171397298.982908425127347.450772999076
23207.42493279826261.2659183418931111.856690079265302.993175517258353.583947254631
24207.42493279826255.325155315354107.972233927395306.877631669129359.52471028117
25207.42493279826249.5545792579592104.199057053340310.650808543184365.295286338565
26207.42493279826243.9356797846552100.525056166869314.324809429655370.914185811869
27207.42493279826238.452847847075396.9400250598447317.909840536679376.397017749449
28207.42493279826233.092778009809393.4352637756782321.414601820846381.757087586715
29207.42493279826227.844020009445190.0032853895498324.846580206974387.005845587079
30207.42493279826222.696636446958586.6375921854927328.212273411031392.153229149565
31207.42493279826217.641937465493883.3325021715183331.517363425006397.20792813103
32207.42493279826212.672272274055280.0830127642856334.766852832238402.177593322469
33207.4249327982627.7808633195760776.8846923600447337.965173236479407.069002276948
34207.4249327982622.9616729169824573.7335931287235341.116272467800411.888192679541
35207.424932798262-1.7907050964903470.6261801704925344.223685426031416.640570693014
36207.424932798262-6.4811341857380667.5592734365854347.290592159938421.330999782262
37207.424932798262-11.114008549517364.5299997148716350.319865881652425.963874146041
38207.424932798262-15.693314294883461.5357526300413353.314112966483430.543179891407
39207.424932798262-20.222680762371558.5741590838738356.27570651265435.072546358895
40207.424932798262-24.7054238705155.643050913783359.206814682741439.555289467034
41207.424932798262-29.144582943553152.7404408124576362.109424784066443.994448540077

\begin{tabular}{lllllllll}
\hline
Demand Forecast \tabularnewline
Point & Forecast & 95% LB & 80% LB & 80% UB & 95% UB \tabularnewline
18 & 207.424932798262 & 94.5096117667222 & 133.593572842993 & 281.256292753531 & 320.340253829802 \tabularnewline
19 & 207.424932798262 & 87.2584199716981 & 128.852273375106 & 285.997592221418 & 327.591445624826 \tabularnewline
20 & 207.424932798262 & 80.3574032157714 & 124.339941058202 & 290.509924538322 & 334.492462380752 \tabularnewline
21 & 207.424932798262 & 73.7517460449962 & 120.020733993464 & 294.82913160306 & 341.098119551528 \tabularnewline
22 & 207.424932798262 & 67.3990925974477 & 115.866957171397 & 298.982908425127 & 347.450772999076 \tabularnewline
23 & 207.424932798262 & 61.2659183418931 & 111.856690079265 & 302.993175517258 & 353.583947254631 \tabularnewline
24 & 207.424932798262 & 55.325155315354 & 107.972233927395 & 306.877631669129 & 359.52471028117 \tabularnewline
25 & 207.424932798262 & 49.5545792579592 & 104.199057053340 & 310.650808543184 & 365.295286338565 \tabularnewline
26 & 207.424932798262 & 43.9356797846552 & 100.525056166869 & 314.324809429655 & 370.914185811869 \tabularnewline
27 & 207.424932798262 & 38.4528478470753 & 96.9400250598447 & 317.909840536679 & 376.397017749449 \tabularnewline
28 & 207.424932798262 & 33.0927780098093 & 93.4352637756782 & 321.414601820846 & 381.757087586715 \tabularnewline
29 & 207.424932798262 & 27.8440200094451 & 90.0032853895498 & 324.846580206974 & 387.005845587079 \tabularnewline
30 & 207.424932798262 & 22.6966364469585 & 86.6375921854927 & 328.212273411031 & 392.153229149565 \tabularnewline
31 & 207.424932798262 & 17.6419374654938 & 83.3325021715183 & 331.517363425006 & 397.20792813103 \tabularnewline
32 & 207.424932798262 & 12.6722722740552 & 80.0830127642856 & 334.766852832238 & 402.177593322469 \tabularnewline
33 & 207.424932798262 & 7.78086331957607 & 76.8846923600447 & 337.965173236479 & 407.069002276948 \tabularnewline
34 & 207.424932798262 & 2.96167291698245 & 73.7335931287235 & 341.116272467800 & 411.888192679541 \tabularnewline
35 & 207.424932798262 & -1.79070509649034 & 70.6261801704925 & 344.223685426031 & 416.640570693014 \tabularnewline
36 & 207.424932798262 & -6.48113418573806 & 67.5592734365854 & 347.290592159938 & 421.330999782262 \tabularnewline
37 & 207.424932798262 & -11.1140085495173 & 64.5299997148716 & 350.319865881652 & 425.963874146041 \tabularnewline
38 & 207.424932798262 & -15.6933142948834 & 61.5357526300413 & 353.314112966483 & 430.543179891407 \tabularnewline
39 & 207.424932798262 & -20.2226807623715 & 58.5741590838738 & 356.27570651265 & 435.072546358895 \tabularnewline
40 & 207.424932798262 & -24.70542387051 & 55.643050913783 & 359.206814682741 & 439.555289467034 \tabularnewline
41 & 207.424932798262 & -29.1445829435531 & 52.7404408124576 & 362.109424784066 & 443.994448540077 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75943&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]207.424932798262[/C][C]94.5096117667222[/C][C]133.593572842993[/C][C]281.256292753531[/C][C]320.340253829802[/C][/ROW]
[ROW][C]19[/C][C]207.424932798262[/C][C]87.2584199716981[/C][C]128.852273375106[/C][C]285.997592221418[/C][C]327.591445624826[/C][/ROW]
[ROW][C]20[/C][C]207.424932798262[/C][C]80.3574032157714[/C][C]124.339941058202[/C][C]290.509924538322[/C][C]334.492462380752[/C][/ROW]
[ROW][C]21[/C][C]207.424932798262[/C][C]73.7517460449962[/C][C]120.020733993464[/C][C]294.82913160306[/C][C]341.098119551528[/C][/ROW]
[ROW][C]22[/C][C]207.424932798262[/C][C]67.3990925974477[/C][C]115.866957171397[/C][C]298.982908425127[/C][C]347.450772999076[/C][/ROW]
[ROW][C]23[/C][C]207.424932798262[/C][C]61.2659183418931[/C][C]111.856690079265[/C][C]302.993175517258[/C][C]353.583947254631[/C][/ROW]
[ROW][C]24[/C][C]207.424932798262[/C][C]55.325155315354[/C][C]107.972233927395[/C][C]306.877631669129[/C][C]359.52471028117[/C][/ROW]
[ROW][C]25[/C][C]207.424932798262[/C][C]49.5545792579592[/C][C]104.199057053340[/C][C]310.650808543184[/C][C]365.295286338565[/C][/ROW]
[ROW][C]26[/C][C]207.424932798262[/C][C]43.9356797846552[/C][C]100.525056166869[/C][C]314.324809429655[/C][C]370.914185811869[/C][/ROW]
[ROW][C]27[/C][C]207.424932798262[/C][C]38.4528478470753[/C][C]96.9400250598447[/C][C]317.909840536679[/C][C]376.397017749449[/C][/ROW]
[ROW][C]28[/C][C]207.424932798262[/C][C]33.0927780098093[/C][C]93.4352637756782[/C][C]321.414601820846[/C][C]381.757087586715[/C][/ROW]
[ROW][C]29[/C][C]207.424932798262[/C][C]27.8440200094451[/C][C]90.0032853895498[/C][C]324.846580206974[/C][C]387.005845587079[/C][/ROW]
[ROW][C]30[/C][C]207.424932798262[/C][C]22.6966364469585[/C][C]86.6375921854927[/C][C]328.212273411031[/C][C]392.153229149565[/C][/ROW]
[ROW][C]31[/C][C]207.424932798262[/C][C]17.6419374654938[/C][C]83.3325021715183[/C][C]331.517363425006[/C][C]397.20792813103[/C][/ROW]
[ROW][C]32[/C][C]207.424932798262[/C][C]12.6722722740552[/C][C]80.0830127642856[/C][C]334.766852832238[/C][C]402.177593322469[/C][/ROW]
[ROW][C]33[/C][C]207.424932798262[/C][C]7.78086331957607[/C][C]76.8846923600447[/C][C]337.965173236479[/C][C]407.069002276948[/C][/ROW]
[ROW][C]34[/C][C]207.424932798262[/C][C]2.96167291698245[/C][C]73.7335931287235[/C][C]341.116272467800[/C][C]411.888192679541[/C][/ROW]
[ROW][C]35[/C][C]207.424932798262[/C][C]-1.79070509649034[/C][C]70.6261801704925[/C][C]344.223685426031[/C][C]416.640570693014[/C][/ROW]
[ROW][C]36[/C][C]207.424932798262[/C][C]-6.48113418573806[/C][C]67.5592734365854[/C][C]347.290592159938[/C][C]421.330999782262[/C][/ROW]
[ROW][C]37[/C][C]207.424932798262[/C][C]-11.1140085495173[/C][C]64.5299997148716[/C][C]350.319865881652[/C][C]425.963874146041[/C][/ROW]
[ROW][C]38[/C][C]207.424932798262[/C][C]-15.6933142948834[/C][C]61.5357526300413[/C][C]353.314112966483[/C][C]430.543179891407[/C][/ROW]
[ROW][C]39[/C][C]207.424932798262[/C][C]-20.2226807623715[/C][C]58.5741590838738[/C][C]356.27570651265[/C][C]435.072546358895[/C][/ROW]
[ROW][C]40[/C][C]207.424932798262[/C][C]-24.70542387051[/C][C]55.643050913783[/C][C]359.206814682741[/C][C]439.555289467034[/C][/ROW]
[ROW][C]41[/C][C]207.424932798262[/C][C]-29.1445829435531[/C][C]52.7404408124576[/C][C]362.109424784066[/C][C]443.994448540077[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75943&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75943&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
18207.42493279826294.5096117667222133.593572842993281.256292753531320.340253829802
19207.42493279826287.2584199716981128.852273375106285.997592221418327.591445624826
20207.42493279826280.3574032157714124.339941058202290.509924538322334.492462380752
21207.42493279826273.7517460449962120.020733993464294.82913160306341.098119551528
22207.42493279826267.3990925974477115.866957171397298.982908425127347.450772999076
23207.42493279826261.2659183418931111.856690079265302.993175517258353.583947254631
24207.42493279826255.325155315354107.972233927395306.877631669129359.52471028117
25207.42493279826249.5545792579592104.199057053340310.650808543184365.295286338565
26207.42493279826243.9356797846552100.525056166869314.324809429655370.914185811869
27207.42493279826238.452847847075396.9400250598447317.909840536679376.397017749449
28207.42493279826233.092778009809393.4352637756782321.414601820846381.757087586715
29207.42493279826227.844020009445190.0032853895498324.846580206974387.005845587079
30207.42493279826222.696636446958586.6375921854927328.212273411031392.153229149565
31207.42493279826217.641937465493883.3325021715183331.517363425006397.20792813103
32207.42493279826212.672272274055280.0830127642856334.766852832238402.177593322469
33207.4249327982627.7808633195760776.8846923600447337.965173236479407.069002276948
34207.4249327982622.9616729169824573.7335931287235341.116272467800411.888192679541
35207.424932798262-1.7907050964903470.6261801704925344.223685426031416.640570693014
36207.424932798262-6.4811341857380667.5592734365854347.290592159938421.330999782262
37207.424932798262-11.114008549517364.5299997148716350.319865881652425.963874146041
38207.424932798262-15.693314294883461.5357526300413353.314112966483430.543179891407
39207.424932798262-20.222680762371558.5741590838738356.27570651265435.072546358895
40207.424932798262-24.7054238705155.643050913783359.206814682741439.555289467034
41207.424932798262-29.144582943553152.7404408124576362.109424784066443.994448540077







Actuals and Interpolation
TimeActualForecast
1275.0916667275.182487301474
2401.3423333400.972242874856
3260.6333333260.845832809383
4286.1286.165919817652
5368.0833333367.853139451386
6385.1916667385.000486465639
7181.5333333182.007237238174
8145.1145.595640852172
9203.1833333203.328434462353
10227.5833333227.574414189821
11239.0833333239.026738533428
12109.175109.701909322141
13231.0833333230.854906936773
14216.9166667216.849097935047
15229.8583333229.753265490343
16272.7916667272.526813215067
17155.0833333155.425389569831

\begin{tabular}{lllllllll}
\hline
Actuals and Interpolation \tabularnewline
Time & Actual & Forecast \tabularnewline
1 & 275.0916667 & 275.182487301474 \tabularnewline
2 & 401.3423333 & 400.972242874856 \tabularnewline
3 & 260.6333333 & 260.845832809383 \tabularnewline
4 & 286.1 & 286.165919817652 \tabularnewline
5 & 368.0833333 & 367.853139451386 \tabularnewline
6 & 385.1916667 & 385.000486465639 \tabularnewline
7 & 181.5333333 & 182.007237238174 \tabularnewline
8 & 145.1 & 145.595640852172 \tabularnewline
9 & 203.1833333 & 203.328434462353 \tabularnewline
10 & 227.5833333 & 227.574414189821 \tabularnewline
11 & 239.0833333 & 239.026738533428 \tabularnewline
12 & 109.175 & 109.701909322141 \tabularnewline
13 & 231.0833333 & 230.854906936773 \tabularnewline
14 & 216.9166667 & 216.849097935047 \tabularnewline
15 & 229.8583333 & 229.753265490343 \tabularnewline
16 & 272.7916667 & 272.526813215067 \tabularnewline
17 & 155.0833333 & 155.425389569831 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=75943&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]275.0916667[/C][C]275.182487301474[/C][/ROW]
[ROW][C]2[/C][C]401.3423333[/C][C]400.972242874856[/C][/ROW]
[ROW][C]3[/C][C]260.6333333[/C][C]260.845832809383[/C][/ROW]
[ROW][C]4[/C][C]286.1[/C][C]286.165919817652[/C][/ROW]
[ROW][C]5[/C][C]368.0833333[/C][C]367.853139451386[/C][/ROW]
[ROW][C]6[/C][C]385.1916667[/C][C]385.000486465639[/C][/ROW]
[ROW][C]7[/C][C]181.5333333[/C][C]182.007237238174[/C][/ROW]
[ROW][C]8[/C][C]145.1[/C][C]145.595640852172[/C][/ROW]
[ROW][C]9[/C][C]203.1833333[/C][C]203.328434462353[/C][/ROW]
[ROW][C]10[/C][C]227.5833333[/C][C]227.574414189821[/C][/ROW]
[ROW][C]11[/C][C]239.0833333[/C][C]239.026738533428[/C][/ROW]
[ROW][C]12[/C][C]109.175[/C][C]109.701909322141[/C][/ROW]
[ROW][C]13[/C][C]231.0833333[/C][C]230.854906936773[/C][/ROW]
[ROW][C]14[/C][C]216.9166667[/C][C]216.849097935047[/C][/ROW]
[ROW][C]15[/C][C]229.8583333[/C][C]229.753265490343[/C][/ROW]
[ROW][C]16[/C][C]272.7916667[/C][C]272.526813215067[/C][/ROW]
[ROW][C]17[/C][C]155.0833333[/C][C]155.425389569831[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=75943&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=75943&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
1275.0916667275.182487301474
2401.3423333400.972242874856
3260.6333333260.845832809383
4286.1286.165919817652
5368.0833333367.853139451386
6385.1916667385.000486465639
7181.5333333182.007237238174
8145.1145.595640852172
9203.1833333203.328434462353
10227.5833333227.574414189821
11239.0833333239.026738533428
12109.175109.701909322141
13231.0833333230.854906936773
14216.9166667216.849097935047
15229.8583333229.753265490343
16272.7916667272.526813215067
17155.0833333155.425389569831







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

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