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, 29 Nov 2011 09:44:31 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Nov/29/t13225779067uz21xji9e97bya.htm/, Retrieved Fri, 29 Mar 2024 10:31:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=148447, Retrieved Fri, 29 Mar 2024 10:31:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact81
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Classical Decomposition] [HPC Retail Sales] [2008-03-02 16:19:32] [74be16979710d4c4e7c6647856088456]
- RMPD    [Exponential Smoothing] [Paper: Smoothing ...] [2011-11-29 14:44:31] [e889f2ef2eeddd5259af4a52678400a6] [Current]
Feedback Forum

Post a new message
Dataseries X:
3440
2678
2981
2260
2844
2546
2456
2295
2379
2479
2057
2280
2351
2276
2548
2311
2201
2725
2408
2139
1898
2539
2070
2063
2565
2442
2194
2798
2074
2628
2289
2154
2467
2137
1850
2075
1791
1755
2232
1952
1822
2522
2074
2366
2173
2094
1833
1858
2040
2133
2921
3252
3318
3554
2308
1621
1315
1501
1418
1657




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148447&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148447&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148447&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.955126450650762
beta0
gamma0

\begin{tabular}{lllllllll}
\hline
Estimated Parameters of Exponential Smoothing \tabularnewline
Parameter & Value \tabularnewline
alpha & 0.955126450650762 \tabularnewline
beta & 0 \tabularnewline
gamma & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148447&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.955126450650762[/C][/ROW]
[ROW][C]beta[/C][C]0[/C][/ROW]
[ROW][C]gamma[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148447&T=1

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1323512463.04754273504-112.047542735043
1422762272.983973269383.01602673061598
1525482557.86232917333-9.86232917333427
1623112312.44022671253-1.44022671252742
1722012181.4789637487919.5210362512057
1827252716.080024147448.91997585256422
1924082229.63906468772178.360935312278
2021392284.57731409829-145.57731409829
2118982247.78023978599-349.780239785988
2225392013.06854984909525.931450150906
2320702101.52225811501-31.522258115006
2420632297.20385126946-234.203851269458
2525652122.50722707539442.49277292461
2624422462.09978104849-20.0997810484887
2721942724.89961751446-530.899617514458
2827981981.8210191837816.178980816304
2920742631.78948789086-557.789487890864
3026282614.9859964423613.014003557641
3122892132.45535113346156.544648866539
3221542166.55628830473-12.5562883047301
3324672256.81111422055210.188885779445
3421372556.94074765898-419.940747658984
3518501741.9669008615108.0330991385
3620752070.941507058794.05849294120708
3717912123.81555001439-332.815550014388
3817551722.8906173387732.1093826612332
3922322035.55680703025196.443192969753
4019521987.18256568362-35.1825656836193
4118221823.99310226177-1.99310226177204
4225222338.0454399037183.954560096296
4320742018.7846416338455.2153583661625
4423661956.10329322252409.896706777478
4521732449.854148898-276.854148898
4620942284.79609731079-190.796097310785
4718331688.68436708599144.315632914014
4818582052.3133809889-194.313380988902
4920401915.71720008869124.282799911308
5021331951.37899197592181.621008024079
5129212406.84768973124514.152310268757
5232522661.9258299298590.074170070201
5333183095.93561327398222.064386726021
5435543823.99118511454-269.991185114544
5523083071.15479843343-763.154798433432
5616212226.82646683961-605.826466839612
5713151750.43325285447-435.433252854471
5815011433.9121045579367.0878954420664
5914181084.11219701081333.887802989187
6016571628.8066048597928.1933951402086

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 2351 & 2463.04754273504 & -112.047542735043 \tabularnewline
14 & 2276 & 2272.98397326938 & 3.01602673061598 \tabularnewline
15 & 2548 & 2557.86232917333 & -9.86232917333427 \tabularnewline
16 & 2311 & 2312.44022671253 & -1.44022671252742 \tabularnewline
17 & 2201 & 2181.47896374879 & 19.5210362512057 \tabularnewline
18 & 2725 & 2716.08002414744 & 8.91997585256422 \tabularnewline
19 & 2408 & 2229.63906468772 & 178.360935312278 \tabularnewline
20 & 2139 & 2284.57731409829 & -145.57731409829 \tabularnewline
21 & 1898 & 2247.78023978599 & -349.780239785988 \tabularnewline
22 & 2539 & 2013.06854984909 & 525.931450150906 \tabularnewline
23 & 2070 & 2101.52225811501 & -31.522258115006 \tabularnewline
24 & 2063 & 2297.20385126946 & -234.203851269458 \tabularnewline
25 & 2565 & 2122.50722707539 & 442.49277292461 \tabularnewline
26 & 2442 & 2462.09978104849 & -20.0997810484887 \tabularnewline
27 & 2194 & 2724.89961751446 & -530.899617514458 \tabularnewline
28 & 2798 & 1981.8210191837 & 816.178980816304 \tabularnewline
29 & 2074 & 2631.78948789086 & -557.789487890864 \tabularnewline
30 & 2628 & 2614.98599644236 & 13.014003557641 \tabularnewline
31 & 2289 & 2132.45535113346 & 156.544648866539 \tabularnewline
32 & 2154 & 2166.55628830473 & -12.5562883047301 \tabularnewline
33 & 2467 & 2256.81111422055 & 210.188885779445 \tabularnewline
34 & 2137 & 2556.94074765898 & -419.940747658984 \tabularnewline
35 & 1850 & 1741.9669008615 & 108.0330991385 \tabularnewline
36 & 2075 & 2070.94150705879 & 4.05849294120708 \tabularnewline
37 & 1791 & 2123.81555001439 & -332.815550014388 \tabularnewline
38 & 1755 & 1722.89061733877 & 32.1093826612332 \tabularnewline
39 & 2232 & 2035.55680703025 & 196.443192969753 \tabularnewline
40 & 1952 & 1987.18256568362 & -35.1825656836193 \tabularnewline
41 & 1822 & 1823.99310226177 & -1.99310226177204 \tabularnewline
42 & 2522 & 2338.0454399037 & 183.954560096296 \tabularnewline
43 & 2074 & 2018.78464163384 & 55.2153583661625 \tabularnewline
44 & 2366 & 1956.10329322252 & 409.896706777478 \tabularnewline
45 & 2173 & 2449.854148898 & -276.854148898 \tabularnewline
46 & 2094 & 2284.79609731079 & -190.796097310785 \tabularnewline
47 & 1833 & 1688.68436708599 & 144.315632914014 \tabularnewline
48 & 1858 & 2052.3133809889 & -194.313380988902 \tabularnewline
49 & 2040 & 1915.71720008869 & 124.282799911308 \tabularnewline
50 & 2133 & 1951.37899197592 & 181.621008024079 \tabularnewline
51 & 2921 & 2406.84768973124 & 514.152310268757 \tabularnewline
52 & 3252 & 2661.9258299298 & 590.074170070201 \tabularnewline
53 & 3318 & 3095.93561327398 & 222.064386726021 \tabularnewline
54 & 3554 & 3823.99118511454 & -269.991185114544 \tabularnewline
55 & 2308 & 3071.15479843343 & -763.154798433432 \tabularnewline
56 & 1621 & 2226.82646683961 & -605.826466839612 \tabularnewline
57 & 1315 & 1750.43325285447 & -435.433252854471 \tabularnewline
58 & 1501 & 1433.91210455793 & 67.0878954420664 \tabularnewline
59 & 1418 & 1084.11219701081 & 333.887802989187 \tabularnewline
60 & 1657 & 1628.80660485979 & 28.1933951402086 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148447&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]2351[/C][C]2463.04754273504[/C][C]-112.047542735043[/C][/ROW]
[ROW][C]14[/C][C]2276[/C][C]2272.98397326938[/C][C]3.01602673061598[/C][/ROW]
[ROW][C]15[/C][C]2548[/C][C]2557.86232917333[/C][C]-9.86232917333427[/C][/ROW]
[ROW][C]16[/C][C]2311[/C][C]2312.44022671253[/C][C]-1.44022671252742[/C][/ROW]
[ROW][C]17[/C][C]2201[/C][C]2181.47896374879[/C][C]19.5210362512057[/C][/ROW]
[ROW][C]18[/C][C]2725[/C][C]2716.08002414744[/C][C]8.91997585256422[/C][/ROW]
[ROW][C]19[/C][C]2408[/C][C]2229.63906468772[/C][C]178.360935312278[/C][/ROW]
[ROW][C]20[/C][C]2139[/C][C]2284.57731409829[/C][C]-145.57731409829[/C][/ROW]
[ROW][C]21[/C][C]1898[/C][C]2247.78023978599[/C][C]-349.780239785988[/C][/ROW]
[ROW][C]22[/C][C]2539[/C][C]2013.06854984909[/C][C]525.931450150906[/C][/ROW]
[ROW][C]23[/C][C]2070[/C][C]2101.52225811501[/C][C]-31.522258115006[/C][/ROW]
[ROW][C]24[/C][C]2063[/C][C]2297.20385126946[/C][C]-234.203851269458[/C][/ROW]
[ROW][C]25[/C][C]2565[/C][C]2122.50722707539[/C][C]442.49277292461[/C][/ROW]
[ROW][C]26[/C][C]2442[/C][C]2462.09978104849[/C][C]-20.0997810484887[/C][/ROW]
[ROW][C]27[/C][C]2194[/C][C]2724.89961751446[/C][C]-530.899617514458[/C][/ROW]
[ROW][C]28[/C][C]2798[/C][C]1981.8210191837[/C][C]816.178980816304[/C][/ROW]
[ROW][C]29[/C][C]2074[/C][C]2631.78948789086[/C][C]-557.789487890864[/C][/ROW]
[ROW][C]30[/C][C]2628[/C][C]2614.98599644236[/C][C]13.014003557641[/C][/ROW]
[ROW][C]31[/C][C]2289[/C][C]2132.45535113346[/C][C]156.544648866539[/C][/ROW]
[ROW][C]32[/C][C]2154[/C][C]2166.55628830473[/C][C]-12.5562883047301[/C][/ROW]
[ROW][C]33[/C][C]2467[/C][C]2256.81111422055[/C][C]210.188885779445[/C][/ROW]
[ROW][C]34[/C][C]2137[/C][C]2556.94074765898[/C][C]-419.940747658984[/C][/ROW]
[ROW][C]35[/C][C]1850[/C][C]1741.9669008615[/C][C]108.0330991385[/C][/ROW]
[ROW][C]36[/C][C]2075[/C][C]2070.94150705879[/C][C]4.05849294120708[/C][/ROW]
[ROW][C]37[/C][C]1791[/C][C]2123.81555001439[/C][C]-332.815550014388[/C][/ROW]
[ROW][C]38[/C][C]1755[/C][C]1722.89061733877[/C][C]32.1093826612332[/C][/ROW]
[ROW][C]39[/C][C]2232[/C][C]2035.55680703025[/C][C]196.443192969753[/C][/ROW]
[ROW][C]40[/C][C]1952[/C][C]1987.18256568362[/C][C]-35.1825656836193[/C][/ROW]
[ROW][C]41[/C][C]1822[/C][C]1823.99310226177[/C][C]-1.99310226177204[/C][/ROW]
[ROW][C]42[/C][C]2522[/C][C]2338.0454399037[/C][C]183.954560096296[/C][/ROW]
[ROW][C]43[/C][C]2074[/C][C]2018.78464163384[/C][C]55.2153583661625[/C][/ROW]
[ROW][C]44[/C][C]2366[/C][C]1956.10329322252[/C][C]409.896706777478[/C][/ROW]
[ROW][C]45[/C][C]2173[/C][C]2449.854148898[/C][C]-276.854148898[/C][/ROW]
[ROW][C]46[/C][C]2094[/C][C]2284.79609731079[/C][C]-190.796097310785[/C][/ROW]
[ROW][C]47[/C][C]1833[/C][C]1688.68436708599[/C][C]144.315632914014[/C][/ROW]
[ROW][C]48[/C][C]1858[/C][C]2052.3133809889[/C][C]-194.313380988902[/C][/ROW]
[ROW][C]49[/C][C]2040[/C][C]1915.71720008869[/C][C]124.282799911308[/C][/ROW]
[ROW][C]50[/C][C]2133[/C][C]1951.37899197592[/C][C]181.621008024079[/C][/ROW]
[ROW][C]51[/C][C]2921[/C][C]2406.84768973124[/C][C]514.152310268757[/C][/ROW]
[ROW][C]52[/C][C]3252[/C][C]2661.9258299298[/C][C]590.074170070201[/C][/ROW]
[ROW][C]53[/C][C]3318[/C][C]3095.93561327398[/C][C]222.064386726021[/C][/ROW]
[ROW][C]54[/C][C]3554[/C][C]3823.99118511454[/C][C]-269.991185114544[/C][/ROW]
[ROW][C]55[/C][C]2308[/C][C]3071.15479843343[/C][C]-763.154798433432[/C][/ROW]
[ROW][C]56[/C][C]1621[/C][C]2226.82646683961[/C][C]-605.826466839612[/C][/ROW]
[ROW][C]57[/C][C]1315[/C][C]1750.43325285447[/C][C]-435.433252854471[/C][/ROW]
[ROW][C]58[/C][C]1501[/C][C]1433.91210455793[/C][C]67.0878954420664[/C][/ROW]
[ROW][C]59[/C][C]1418[/C][C]1084.11219701081[/C][C]333.887802989187[/C][/ROW]
[ROW][C]60[/C][C]1657[/C][C]1628.80660485979[/C][C]28.1933951402086[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148447&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148447&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
1323512463.04754273504-112.047542735043
1422762272.983973269383.01602673061598
1525482557.86232917333-9.86232917333427
1623112312.44022671253-1.44022671252742
1722012181.4789637487919.5210362512057
1827252716.080024147448.91997585256422
1924082229.63906468772178.360935312278
2021392284.57731409829-145.57731409829
2118982247.78023978599-349.780239785988
2225392013.06854984909525.931450150906
2320702101.52225811501-31.522258115006
2420632297.20385126946-234.203851269458
2525652122.50722707539442.49277292461
2624422462.09978104849-20.0997810484887
2721942724.89961751446-530.899617514458
2827981981.8210191837816.178980816304
2920742631.78948789086-557.789487890864
3026282614.9859964423613.014003557641
3122892132.45535113346156.544648866539
3221542166.55628830473-12.5562883047301
3324672256.81111422055210.188885779445
3421372556.94074765898-419.940747658984
3518501741.9669008615108.0330991385
3620752070.941507058794.05849294120708
3717912123.81555001439-332.815550014388
3817551722.8906173387732.1093826612332
3922322035.55680703025196.443192969753
4019521987.18256568362-35.1825656836193
4118221823.99310226177-1.99310226177204
4225222338.0454399037183.954560096296
4320742018.7846416338455.2153583661625
4423661956.10329322252409.896706777478
4521732449.854148898-276.854148898
4620942284.79609731079-190.796097310785
4718331688.68436708599144.315632914014
4818582052.3133809889-194.313380988902
4920401915.71720008869124.282799911308
5021331951.37899197592181.621008024079
5129212406.84768973124514.152310268757
5232522661.9258299298590.074170070201
5333183095.93561327398222.064386726021
5435543823.99118511454-269.991185114544
5523083071.15479843343-763.154798433432
5616212226.82646683961-605.826466839612
5713151750.43325285447-435.433252854471
5815011433.9121045579367.0878954420664
5914181084.11219701081333.887802989187
6016571628.8066048597928.1933951402086







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
611704.732531289521078.349965971292331.11509660775
621621.68853362052755.4971212152162487.87994602583
631903.68620261819850.9659132180332956.40649201835
641667.68387161586456.8360477730772878.53169545865
651538.0982072802187.5113358443532888.68507871604
662054.0542096112576.8889033286163531.21951589378
671559.09354527554-34.62844643913353152.81553699021
681443.67454760654-258.6421772320063145.99127244508
691545.92221660421-258.4654015241933350.30983473261
701645.29488560188-255.6909431841073546.28071438786
711231.41755459955-761.4897603639953224.32486956309
721457.20689026388-623.565084466953537.97886499471

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 1704.73253128952 & 1078.34996597129 & 2331.11509660775 \tabularnewline
62 & 1621.68853362052 & 755.497121215216 & 2487.87994602583 \tabularnewline
63 & 1903.68620261819 & 850.965913218033 & 2956.40649201835 \tabularnewline
64 & 1667.68387161586 & 456.836047773077 & 2878.53169545865 \tabularnewline
65 & 1538.0982072802 & 187.511335844353 & 2888.68507871604 \tabularnewline
66 & 2054.0542096112 & 576.888903328616 & 3531.21951589378 \tabularnewline
67 & 1559.09354527554 & -34.6284464391335 & 3152.81553699021 \tabularnewline
68 & 1443.67454760654 & -258.642177232006 & 3145.99127244508 \tabularnewline
69 & 1545.92221660421 & -258.465401524193 & 3350.30983473261 \tabularnewline
70 & 1645.29488560188 & -255.690943184107 & 3546.28071438786 \tabularnewline
71 & 1231.41755459955 & -761.489760363995 & 3224.32486956309 \tabularnewline
72 & 1457.20689026388 & -623.56508446695 & 3537.97886499471 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148447&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]61[/C][C]1704.73253128952[/C][C]1078.34996597129[/C][C]2331.11509660775[/C][/ROW]
[ROW][C]62[/C][C]1621.68853362052[/C][C]755.497121215216[/C][C]2487.87994602583[/C][/ROW]
[ROW][C]63[/C][C]1903.68620261819[/C][C]850.965913218033[/C][C]2956.40649201835[/C][/ROW]
[ROW][C]64[/C][C]1667.68387161586[/C][C]456.836047773077[/C][C]2878.53169545865[/C][/ROW]
[ROW][C]65[/C][C]1538.0982072802[/C][C]187.511335844353[/C][C]2888.68507871604[/C][/ROW]
[ROW][C]66[/C][C]2054.0542096112[/C][C]576.888903328616[/C][C]3531.21951589378[/C][/ROW]
[ROW][C]67[/C][C]1559.09354527554[/C][C]-34.6284464391335[/C][C]3152.81553699021[/C][/ROW]
[ROW][C]68[/C][C]1443.67454760654[/C][C]-258.642177232006[/C][C]3145.99127244508[/C][/ROW]
[ROW][C]69[/C][C]1545.92221660421[/C][C]-258.465401524193[/C][C]3350.30983473261[/C][/ROW]
[ROW][C]70[/C][C]1645.29488560188[/C][C]-255.690943184107[/C][C]3546.28071438786[/C][/ROW]
[ROW][C]71[/C][C]1231.41755459955[/C][C]-761.489760363995[/C][C]3224.32486956309[/C][/ROW]
[ROW][C]72[/C][C]1457.20689026388[/C][C]-623.56508446695[/C][C]3537.97886499471[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148447&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148447&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
611704.732531289521078.349965971292331.11509660775
621621.68853362052755.4971212152162487.87994602583
631903.68620261819850.9659132180332956.40649201835
641667.68387161586456.8360477730772878.53169545865
651538.0982072802187.5113358443532888.68507871604
662054.0542096112576.8889033286163531.21951589378
671559.09354527554-34.62844643913353152.81553699021
681443.67454760654-258.6421772320063145.99127244508
691545.92221660421-258.4654015241933350.30983473261
701645.29488560188-255.6909431841073546.28071438786
711231.41755459955-761.4897603639953224.32486956309
721457.20689026388-623.565084466953537.97886499471



Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = additive ;
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')