Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationTue, 21 Dec 2010 18:33:15 +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/Dec/21/t12929562625hikfqly6l1blr3.htm/, Retrieved Sun, 19 May 2024 19:48:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113814, Retrieved Sun, 19 May 2024 19:48:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact168
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Exponential Smoothing] [HPC Retail Sales] [2008-03-10 17:50:48] [74be16979710d4c4e7c6647856088456]
- RMPD    [Exponential Smoothing] [Exponential smoot...] [2010-12-21 18:33:15] [039869833c16fe697975601e6b065e0f] [Current]
Feedback Forum

Post a new message
Dataseries X:
1038.00
934.00
988.00
870.00
854.00
834.00
872.00
954.00
870.00
1238.00
1082.00
1053.00
934.00
787.00
1081.00
908.00
995.00
825.00
822.00
856.00
887.00
1094.00
990.00
936.00
1097.00
918.00
926.00
907.00
899.00
971.00
1087.00
1000.00
1071.00
1190.00
1116.00
1070.00
1314.00
1068.00
1185.00
1215.00
1145.00
1251.00
1363.00
1368.00
1535.00
1853.00
1866.00
2023.00
1373.00
1968.00
1424.00
1160.00
1243.00
1375.00
1539.00
1773.00
1906.00
2076.00
2004.00




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 2 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113814&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113814&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113814&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 time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.389032955231208
beta0.0286225511594326
gamma0.689233804798979

\begin{tabular}{lllllllll}
\hline
Estimated Parameters of Exponential Smoothing \tabularnewline
Parameter & Value \tabularnewline
alpha & 0.389032955231208 \tabularnewline
beta & 0.0286225511594326 \tabularnewline
gamma & 0.689233804798979 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113814&T=1

[TABLE]
[ROW][C]Estimated Parameters of Exponential Smoothing[/C][/ROW]
[ROW][C]Parameter[/C][C]Value[/C][/ROW]
[ROW][C]alpha[/C][C]0.389032955231208[/C][/ROW]
[ROW][C]beta[/C][C]0.0286225511594326[/C][/ROW]
[ROW][C]gamma[/C][C]0.689233804798979[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113814&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113814&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.389032955231208
beta0.0286225511594326
gamma0.689233804798979







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13934918.0726495726515.9273504273501
14787782.1123505837154.8876494162846
1510811080.120001960490.87999803951493
16908911.495010425234-3.49501042523389
179951005.67074573912-10.6707457391155
18825838.811063549857-13.811063549857
19822848.742573118919-26.7425731189189
20856928.928850993235-72.9288509932346
21887816.12674017060470.8732598293964
2210941204.34923810212-110.349238102125
23990994.841460579284-4.8414605792841
24936955.284108655832-19.2841086558321
251097834.55868680411262.44131319589
26918790.708583897266127.291416102734
279261136.8676451593-210.867645159301
28907883.88562477427723.1143752257228
29899985.54998548892-86.5499854889204
30971787.16186261572183.83813738428
311087870.05429339561216.94570660439
3210001029.8221541756-29.8221541755963
331071999.05272560692771.9472743930733
3411901316.10018296636-126.100182966362
3511161149.43838524672-33.4383852467192
3610701096.90005240976-26.9000524097585
3713141095.98725803912218.012741960885
381068981.58790141632586.4120985836752
3911851172.6363050747512.3636949252548
4012151110.70520145293104.294798547072
4111451204.3527485473-59.352748547295
4212511137.28919222821113.710807771793
4313631212.9442126035150.055787396498
4413681248.13399220433119.866007795674
4515351325.47804151983209.521958480171
4618531621.20571160027231.794288399727
4718661645.33839843436220.661601565638
4820231709.77799076074313.222009239262
4913731963.47512299638-590.475122996381
5019681489.28648777257478.713512227433
5114241816.29573481096-392.295734810956
5211601645.66934082907-485.669340829074
5312431444.33868958243-201.338689582428
5413751396.78294379575-21.7829437957541
5515391435.39063657518103.609363424823
5617731439.64051733905333.35948266095
5719061640.01406344116265.985936558845
5820761969.93512922857106.064870771429
5920041941.915141150762.0848588492952

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 934 & 918.07264957265 & 15.9273504273501 \tabularnewline
14 & 787 & 782.112350583715 & 4.8876494162846 \tabularnewline
15 & 1081 & 1080.12000196049 & 0.87999803951493 \tabularnewline
16 & 908 & 911.495010425234 & -3.49501042523389 \tabularnewline
17 & 995 & 1005.67074573912 & -10.6707457391155 \tabularnewline
18 & 825 & 838.811063549857 & -13.811063549857 \tabularnewline
19 & 822 & 848.742573118919 & -26.7425731189189 \tabularnewline
20 & 856 & 928.928850993235 & -72.9288509932346 \tabularnewline
21 & 887 & 816.126740170604 & 70.8732598293964 \tabularnewline
22 & 1094 & 1204.34923810212 & -110.349238102125 \tabularnewline
23 & 990 & 994.841460579284 & -4.8414605792841 \tabularnewline
24 & 936 & 955.284108655832 & -19.2841086558321 \tabularnewline
25 & 1097 & 834.55868680411 & 262.44131319589 \tabularnewline
26 & 918 & 790.708583897266 & 127.291416102734 \tabularnewline
27 & 926 & 1136.8676451593 & -210.867645159301 \tabularnewline
28 & 907 & 883.885624774277 & 23.1143752257228 \tabularnewline
29 & 899 & 985.54998548892 & -86.5499854889204 \tabularnewline
30 & 971 & 787.16186261572 & 183.83813738428 \tabularnewline
31 & 1087 & 870.05429339561 & 216.94570660439 \tabularnewline
32 & 1000 & 1029.8221541756 & -29.8221541755963 \tabularnewline
33 & 1071 & 999.052725606927 & 71.9472743930733 \tabularnewline
34 & 1190 & 1316.10018296636 & -126.100182966362 \tabularnewline
35 & 1116 & 1149.43838524672 & -33.4383852467192 \tabularnewline
36 & 1070 & 1096.90005240976 & -26.9000524097585 \tabularnewline
37 & 1314 & 1095.98725803912 & 218.012741960885 \tabularnewline
38 & 1068 & 981.587901416325 & 86.4120985836752 \tabularnewline
39 & 1185 & 1172.63630507475 & 12.3636949252548 \tabularnewline
40 & 1215 & 1110.70520145293 & 104.294798547072 \tabularnewline
41 & 1145 & 1204.3527485473 & -59.352748547295 \tabularnewline
42 & 1251 & 1137.28919222821 & 113.710807771793 \tabularnewline
43 & 1363 & 1212.9442126035 & 150.055787396498 \tabularnewline
44 & 1368 & 1248.13399220433 & 119.866007795674 \tabularnewline
45 & 1535 & 1325.47804151983 & 209.521958480171 \tabularnewline
46 & 1853 & 1621.20571160027 & 231.794288399727 \tabularnewline
47 & 1866 & 1645.33839843436 & 220.661601565638 \tabularnewline
48 & 2023 & 1709.77799076074 & 313.222009239262 \tabularnewline
49 & 1373 & 1963.47512299638 & -590.475122996381 \tabularnewline
50 & 1968 & 1489.28648777257 & 478.713512227433 \tabularnewline
51 & 1424 & 1816.29573481096 & -392.295734810956 \tabularnewline
52 & 1160 & 1645.66934082907 & -485.669340829074 \tabularnewline
53 & 1243 & 1444.33868958243 & -201.338689582428 \tabularnewline
54 & 1375 & 1396.78294379575 & -21.7829437957541 \tabularnewline
55 & 1539 & 1435.39063657518 & 103.609363424823 \tabularnewline
56 & 1773 & 1439.64051733905 & 333.35948266095 \tabularnewline
57 & 1906 & 1640.01406344116 & 265.985936558845 \tabularnewline
58 & 2076 & 1969.93512922857 & 106.064870771429 \tabularnewline
59 & 2004 & 1941.9151411507 & 62.0848588492952 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113814&T=2

[TABLE]
[ROW][C]Interpolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Observed[/C][C]Fitted[/C][C]Residuals[/C][/ROW]
[ROW][C]13[/C][C]934[/C][C]918.07264957265[/C][C]15.9273504273501[/C][/ROW]
[ROW][C]14[/C][C]787[/C][C]782.112350583715[/C][C]4.8876494162846[/C][/ROW]
[ROW][C]15[/C][C]1081[/C][C]1080.12000196049[/C][C]0.87999803951493[/C][/ROW]
[ROW][C]16[/C][C]908[/C][C]911.495010425234[/C][C]-3.49501042523389[/C][/ROW]
[ROW][C]17[/C][C]995[/C][C]1005.67074573912[/C][C]-10.6707457391155[/C][/ROW]
[ROW][C]18[/C][C]825[/C][C]838.811063549857[/C][C]-13.811063549857[/C][/ROW]
[ROW][C]19[/C][C]822[/C][C]848.742573118919[/C][C]-26.7425731189189[/C][/ROW]
[ROW][C]20[/C][C]856[/C][C]928.928850993235[/C][C]-72.9288509932346[/C][/ROW]
[ROW][C]21[/C][C]887[/C][C]816.126740170604[/C][C]70.8732598293964[/C][/ROW]
[ROW][C]22[/C][C]1094[/C][C]1204.34923810212[/C][C]-110.349238102125[/C][/ROW]
[ROW][C]23[/C][C]990[/C][C]994.841460579284[/C][C]-4.8414605792841[/C][/ROW]
[ROW][C]24[/C][C]936[/C][C]955.284108655832[/C][C]-19.2841086558321[/C][/ROW]
[ROW][C]25[/C][C]1097[/C][C]834.55868680411[/C][C]262.44131319589[/C][/ROW]
[ROW][C]26[/C][C]918[/C][C]790.708583897266[/C][C]127.291416102734[/C][/ROW]
[ROW][C]27[/C][C]926[/C][C]1136.8676451593[/C][C]-210.867645159301[/C][/ROW]
[ROW][C]28[/C][C]907[/C][C]883.885624774277[/C][C]23.1143752257228[/C][/ROW]
[ROW][C]29[/C][C]899[/C][C]985.54998548892[/C][C]-86.5499854889204[/C][/ROW]
[ROW][C]30[/C][C]971[/C][C]787.16186261572[/C][C]183.83813738428[/C][/ROW]
[ROW][C]31[/C][C]1087[/C][C]870.05429339561[/C][C]216.94570660439[/C][/ROW]
[ROW][C]32[/C][C]1000[/C][C]1029.8221541756[/C][C]-29.8221541755963[/C][/ROW]
[ROW][C]33[/C][C]1071[/C][C]999.052725606927[/C][C]71.9472743930733[/C][/ROW]
[ROW][C]34[/C][C]1190[/C][C]1316.10018296636[/C][C]-126.100182966362[/C][/ROW]
[ROW][C]35[/C][C]1116[/C][C]1149.43838524672[/C][C]-33.4383852467192[/C][/ROW]
[ROW][C]36[/C][C]1070[/C][C]1096.90005240976[/C][C]-26.9000524097585[/C][/ROW]
[ROW][C]37[/C][C]1314[/C][C]1095.98725803912[/C][C]218.012741960885[/C][/ROW]
[ROW][C]38[/C][C]1068[/C][C]981.587901416325[/C][C]86.4120985836752[/C][/ROW]
[ROW][C]39[/C][C]1185[/C][C]1172.63630507475[/C][C]12.3636949252548[/C][/ROW]
[ROW][C]40[/C][C]1215[/C][C]1110.70520145293[/C][C]104.294798547072[/C][/ROW]
[ROW][C]41[/C][C]1145[/C][C]1204.3527485473[/C][C]-59.352748547295[/C][/ROW]
[ROW][C]42[/C][C]1251[/C][C]1137.28919222821[/C][C]113.710807771793[/C][/ROW]
[ROW][C]43[/C][C]1363[/C][C]1212.9442126035[/C][C]150.055787396498[/C][/ROW]
[ROW][C]44[/C][C]1368[/C][C]1248.13399220433[/C][C]119.866007795674[/C][/ROW]
[ROW][C]45[/C][C]1535[/C][C]1325.47804151983[/C][C]209.521958480171[/C][/ROW]
[ROW][C]46[/C][C]1853[/C][C]1621.20571160027[/C][C]231.794288399727[/C][/ROW]
[ROW][C]47[/C][C]1866[/C][C]1645.33839843436[/C][C]220.661601565638[/C][/ROW]
[ROW][C]48[/C][C]2023[/C][C]1709.77799076074[/C][C]313.222009239262[/C][/ROW]
[ROW][C]49[/C][C]1373[/C][C]1963.47512299638[/C][C]-590.475122996381[/C][/ROW]
[ROW][C]50[/C][C]1968[/C][C]1489.28648777257[/C][C]478.713512227433[/C][/ROW]
[ROW][C]51[/C][C]1424[/C][C]1816.29573481096[/C][C]-392.295734810956[/C][/ROW]
[ROW][C]52[/C][C]1160[/C][C]1645.66934082907[/C][C]-485.669340829074[/C][/ROW]
[ROW][C]53[/C][C]1243[/C][C]1444.33868958243[/C][C]-201.338689582428[/C][/ROW]
[ROW][C]54[/C][C]1375[/C][C]1396.78294379575[/C][C]-21.7829437957541[/C][/ROW]
[ROW][C]55[/C][C]1539[/C][C]1435.39063657518[/C][C]103.609363424823[/C][/ROW]
[ROW][C]56[/C][C]1773[/C][C]1439.64051733905[/C][C]333.35948266095[/C][/ROW]
[ROW][C]57[/C][C]1906[/C][C]1640.01406344116[/C][C]265.985936558845[/C][/ROW]
[ROW][C]58[/C][C]2076[/C][C]1969.93512922857[/C][C]106.064870771429[/C][/ROW]
[ROW][C]59[/C][C]2004[/C][C]1941.9151411507[/C][C]62.0848588492952[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113814&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113814&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13934918.0726495726515.9273504273501
14787782.1123505837154.8876494162846
1510811080.120001960490.87999803951493
16908911.495010425234-3.49501042523389
179951005.67074573912-10.6707457391155
18825838.811063549857-13.811063549857
19822848.742573118919-26.7425731189189
20856928.928850993235-72.9288509932346
21887816.12674017060470.8732598293964
2210941204.34923810212-110.349238102125
23990994.841460579284-4.8414605792841
24936955.284108655832-19.2841086558321
251097834.55868680411262.44131319589
26918790.708583897266127.291416102734
279261136.8676451593-210.867645159301
28907883.88562477427723.1143752257228
29899985.54998548892-86.5499854889204
30971787.16186261572183.83813738428
311087870.05429339561216.94570660439
3210001029.8221541756-29.8221541755963
331071999.05272560692771.9472743930733
3411901316.10018296636-126.100182966362
3511161149.43838524672-33.4383852467192
3610701096.90005240976-26.9000524097585
3713141095.98725803912218.012741960885
381068981.58790141632586.4120985836752
3911851172.6363050747512.3636949252548
4012151110.70520145293104.294798547072
4111451204.3527485473-59.352748547295
4212511137.28919222821113.710807771793
4313631212.9442126035150.055787396498
4413681248.13399220433119.866007795674
4515351325.47804151983209.521958480171
4618531621.20571160027231.794288399727
4718661645.33839843436220.661601565638
4820231709.77799076074313.222009239262
4913731963.47512299638-590.475122996381
5019681489.28648777257478.713512227433
5114241816.29573481096-392.295734810956
5211601645.66934082907-485.669340829074
5312431444.33868958243-201.338689582428
5413751396.78294379575-21.7829437957541
5515391435.39063657518103.609363424823
5617731439.64051733905333.35948266095
5719061640.01406344116265.985936558845
5820761969.93512922857106.064870771429
5920041941.915141150762.0848588492952







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
601983.322669254581596.326742228292370.31859628088
611730.814674774651313.983144783062147.64620476623
621939.344389331341493.155573424062385.53320523862
631710.77618001721235.580649896652185.97171013775
641655.253589819081151.304524151442159.20265548673
651769.81107476871237.285765100022302.33638443738
661885.650778582881324.666318038212446.63523912755
671995.235196702781405.860206932552584.61018647301
682064.471345703371446.734925055652682.2077663511
692111.620275587091465.518948679812757.72160249437
702272.59378970271598.096988041282947.09059136412
712185.482448350681482.536890693612888.42800600775

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
60 & 1983.32266925458 & 1596.32674222829 & 2370.31859628088 \tabularnewline
61 & 1730.81467477465 & 1313.98314478306 & 2147.64620476623 \tabularnewline
62 & 1939.34438933134 & 1493.15557342406 & 2385.53320523862 \tabularnewline
63 & 1710.7761800172 & 1235.58064989665 & 2185.97171013775 \tabularnewline
64 & 1655.25358981908 & 1151.30452415144 & 2159.20265548673 \tabularnewline
65 & 1769.8110747687 & 1237.28576510002 & 2302.33638443738 \tabularnewline
66 & 1885.65077858288 & 1324.66631803821 & 2446.63523912755 \tabularnewline
67 & 1995.23519670278 & 1405.86020693255 & 2584.61018647301 \tabularnewline
68 & 2064.47134570337 & 1446.73492505565 & 2682.2077663511 \tabularnewline
69 & 2111.62027558709 & 1465.51894867981 & 2757.72160249437 \tabularnewline
70 & 2272.5937897027 & 1598.09698804128 & 2947.09059136412 \tabularnewline
71 & 2185.48244835068 & 1482.53689069361 & 2888.42800600775 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113814&T=3

[TABLE]
[ROW][C]Extrapolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Forecast[/C][C]95% Lower Bound[/C][C]95% Upper Bound[/C][/ROW]
[ROW][C]60[/C][C]1983.32266925458[/C][C]1596.32674222829[/C][C]2370.31859628088[/C][/ROW]
[ROW][C]61[/C][C]1730.81467477465[/C][C]1313.98314478306[/C][C]2147.64620476623[/C][/ROW]
[ROW][C]62[/C][C]1939.34438933134[/C][C]1493.15557342406[/C][C]2385.53320523862[/C][/ROW]
[ROW][C]63[/C][C]1710.7761800172[/C][C]1235.58064989665[/C][C]2185.97171013775[/C][/ROW]
[ROW][C]64[/C][C]1655.25358981908[/C][C]1151.30452415144[/C][C]2159.20265548673[/C][/ROW]
[ROW][C]65[/C][C]1769.8110747687[/C][C]1237.28576510002[/C][C]2302.33638443738[/C][/ROW]
[ROW][C]66[/C][C]1885.65077858288[/C][C]1324.66631803821[/C][C]2446.63523912755[/C][/ROW]
[ROW][C]67[/C][C]1995.23519670278[/C][C]1405.86020693255[/C][C]2584.61018647301[/C][/ROW]
[ROW][C]68[/C][C]2064.47134570337[/C][C]1446.73492505565[/C][C]2682.2077663511[/C][/ROW]
[ROW][C]69[/C][C]2111.62027558709[/C][C]1465.51894867981[/C][C]2757.72160249437[/C][/ROW]
[ROW][C]70[/C][C]2272.5937897027[/C][C]1598.09698804128[/C][C]2947.09059136412[/C][/ROW]
[ROW][C]71[/C][C]2185.48244835068[/C][C]1482.53689069361[/C][C]2888.42800600775[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113814&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113814&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
601983.322669254581596.326742228292370.31859628088
611730.814674774651313.983144783062147.64620476623
621939.344389331341493.155573424062385.53320523862
631710.77618001721235.580649896652185.97171013775
641655.253589819081151.304524151442159.20265548673
651769.81107476871237.285765100022302.33638443738
661885.650778582881324.666318038212446.63523912755
671995.235196702781405.860206932552584.61018647301
682064.471345703371446.734925055652682.2077663511
692111.620275587091465.518948679812757.72160249437
702272.59378970271598.096988041282947.09059136412
712185.482448350681482.536890693612888.42800600775



Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
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,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[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,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')