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 computationWed, 29 Dec 2010 17:48:54 +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/29/t1293644810n5qrdptjx2q8rnv.htm/, Retrieved Fri, 03 May 2024 05:30:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116995, Retrieved Fri, 03 May 2024 05:30:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Monthly US soldie...] [2010-11-02 12:07:39] [b98453cac15ba1066b407e146608df68]
- RMP   [Exponential Smoothing] [] [2010-12-07 12:41:18] [055a14fb8042f7ec27c73c5dfc3bfa50]
-    D      [Exponential Smoothing] [Paper: Exponentia...] [2010-12-29 17:48:54] [4a884731c0d5b018eba30cab82c9416a] [Current]
Feedback Forum

Post a new message
Dataseries X:
31245
30951
30872
30752
30967
30781
30681
31356
31434
31594
31949
32396
32441
32447
32288
32418
32346
32091
31855
31683
31615
31840
31536
31383
31638
31626
31720
31472
31372
31419
31341
31171
31036
30532
30666
30571
30173
30032
29874
30018
29911
29963
30050
29901
29544
29451
29293
29334
29389
29563




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116995&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116995&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116995&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 Server'George Udny Yule' @ 72.249.76.132







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.953617426395245
beta0.348663695525690
gammaFALSE

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

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33087230657215
43075230639.513478516112.486521484017
53096730561.6691607835405.330839216465
63078130897.8554582621-116.855458262118
73068130697.2223237869-16.2223237869039
83135630587.1609107732768.8390892268
93143431481.3804162387-47.3804162386623
103159431581.485178785512.5148212144813
113194931742.8681586578206.131841342241
123239632157.4248449895238.575155010458
133244132682.2443176054-241.244317605357
143244732669.2878279993-222.287827999317
153228832600.4997025092-312.499702509169
163241832341.780380330476.2196196695586
173234632479.0929744682-133.092974468225
183209132372.5491118175-281.549111817545
193185532030.8221253145-175.822125314469
203168331731.4588248743-48.4588248742584
213161531537.439226471577.5607735284975
223184031489.3824325117350.617567488269
233153631818.2948133802-282.294813380224
243138331449.7902146135-66.7902146135239
253163831264.5873596225373.412640377519
263162631623.32625028152.67374971845493
273172031629.411073958290.5889260418298
283147231749.4534147274-277.453414727373
293137231426.2731870665-54.2731870665048
303141931297.8761253727121.123874627276
313134131377.0134504400-36.0134504400448
323117131294.3277078892-123.327707889170
333103631087.3721192354-51.3721192353878
343053230931.9538266867-399.953826686688
353066630311.1405852349354.859414765102
363057130528.118241552642.8817584473582
373017330461.8464001842-288.846400184200
383003229983.193753328948.8062466710981
392987429842.760230219131.2397697809029
403001829695.9619751629322.03802483714
412991129933.5489985127-22.5489985127133
422996329835.0344749239127.965525076135
433005029922.6007086549127.399291345148
442990130051.9861886736-150.98618867364
452954429865.6967576668-321.696757666832
462945129409.653226906741.3467730933189
472929329313.5617956373-20.5617956373280
482933429151.5966464339182.403353566056
492938929243.8302154382145.1697845618
502956329348.8249636843214.175036315726

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
3 & 30872 & 30657 & 215 \tabularnewline
4 & 30752 & 30639.513478516 & 112.486521484017 \tabularnewline
5 & 30967 & 30561.6691607835 & 405.330839216465 \tabularnewline
6 & 30781 & 30897.8554582621 & -116.855458262118 \tabularnewline
7 & 30681 & 30697.2223237869 & -16.2223237869039 \tabularnewline
8 & 31356 & 30587.1609107732 & 768.8390892268 \tabularnewline
9 & 31434 & 31481.3804162387 & -47.3804162386623 \tabularnewline
10 & 31594 & 31581.4851787855 & 12.5148212144813 \tabularnewline
11 & 31949 & 31742.8681586578 & 206.131841342241 \tabularnewline
12 & 32396 & 32157.4248449895 & 238.575155010458 \tabularnewline
13 & 32441 & 32682.2443176054 & -241.244317605357 \tabularnewline
14 & 32447 & 32669.2878279993 & -222.287827999317 \tabularnewline
15 & 32288 & 32600.4997025092 & -312.499702509169 \tabularnewline
16 & 32418 & 32341.7803803304 & 76.2196196695586 \tabularnewline
17 & 32346 & 32479.0929744682 & -133.092974468225 \tabularnewline
18 & 32091 & 32372.5491118175 & -281.549111817545 \tabularnewline
19 & 31855 & 32030.8221253145 & -175.822125314469 \tabularnewline
20 & 31683 & 31731.4588248743 & -48.4588248742584 \tabularnewline
21 & 31615 & 31537.4392264715 & 77.5607735284975 \tabularnewline
22 & 31840 & 31489.3824325117 & 350.617567488269 \tabularnewline
23 & 31536 & 31818.2948133802 & -282.294813380224 \tabularnewline
24 & 31383 & 31449.7902146135 & -66.7902146135239 \tabularnewline
25 & 31638 & 31264.5873596225 & 373.412640377519 \tabularnewline
26 & 31626 & 31623.3262502815 & 2.67374971845493 \tabularnewline
27 & 31720 & 31629.4110739582 & 90.5889260418298 \tabularnewline
28 & 31472 & 31749.4534147274 & -277.453414727373 \tabularnewline
29 & 31372 & 31426.2731870665 & -54.2731870665048 \tabularnewline
30 & 31419 & 31297.8761253727 & 121.123874627276 \tabularnewline
31 & 31341 & 31377.0134504400 & -36.0134504400448 \tabularnewline
32 & 31171 & 31294.3277078892 & -123.327707889170 \tabularnewline
33 & 31036 & 31087.3721192354 & -51.3721192353878 \tabularnewline
34 & 30532 & 30931.9538266867 & -399.953826686688 \tabularnewline
35 & 30666 & 30311.1405852349 & 354.859414765102 \tabularnewline
36 & 30571 & 30528.1182415526 & 42.8817584473582 \tabularnewline
37 & 30173 & 30461.8464001842 & -288.846400184200 \tabularnewline
38 & 30032 & 29983.1937533289 & 48.8062466710981 \tabularnewline
39 & 29874 & 29842.7602302191 & 31.2397697809029 \tabularnewline
40 & 30018 & 29695.9619751629 & 322.03802483714 \tabularnewline
41 & 29911 & 29933.5489985127 & -22.5489985127133 \tabularnewline
42 & 29963 & 29835.0344749239 & 127.965525076135 \tabularnewline
43 & 30050 & 29922.6007086549 & 127.399291345148 \tabularnewline
44 & 29901 & 30051.9861886736 & -150.98618867364 \tabularnewline
45 & 29544 & 29865.6967576668 & -321.696757666832 \tabularnewline
46 & 29451 & 29409.6532269067 & 41.3467730933189 \tabularnewline
47 & 29293 & 29313.5617956373 & -20.5617956373280 \tabularnewline
48 & 29334 & 29151.5966464339 & 182.403353566056 \tabularnewline
49 & 29389 & 29243.8302154382 & 145.1697845618 \tabularnewline
50 & 29563 & 29348.8249636843 & 214.175036315726 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116995&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]3[/C][C]30872[/C][C]30657[/C][C]215[/C][/ROW]
[ROW][C]4[/C][C]30752[/C][C]30639.513478516[/C][C]112.486521484017[/C][/ROW]
[ROW][C]5[/C][C]30967[/C][C]30561.6691607835[/C][C]405.330839216465[/C][/ROW]
[ROW][C]6[/C][C]30781[/C][C]30897.8554582621[/C][C]-116.855458262118[/C][/ROW]
[ROW][C]7[/C][C]30681[/C][C]30697.2223237869[/C][C]-16.2223237869039[/C][/ROW]
[ROW][C]8[/C][C]31356[/C][C]30587.1609107732[/C][C]768.8390892268[/C][/ROW]
[ROW][C]9[/C][C]31434[/C][C]31481.3804162387[/C][C]-47.3804162386623[/C][/ROW]
[ROW][C]10[/C][C]31594[/C][C]31581.4851787855[/C][C]12.5148212144813[/C][/ROW]
[ROW][C]11[/C][C]31949[/C][C]31742.8681586578[/C][C]206.131841342241[/C][/ROW]
[ROW][C]12[/C][C]32396[/C][C]32157.4248449895[/C][C]238.575155010458[/C][/ROW]
[ROW][C]13[/C][C]32441[/C][C]32682.2443176054[/C][C]-241.244317605357[/C][/ROW]
[ROW][C]14[/C][C]32447[/C][C]32669.2878279993[/C][C]-222.287827999317[/C][/ROW]
[ROW][C]15[/C][C]32288[/C][C]32600.4997025092[/C][C]-312.499702509169[/C][/ROW]
[ROW][C]16[/C][C]32418[/C][C]32341.7803803304[/C][C]76.2196196695586[/C][/ROW]
[ROW][C]17[/C][C]32346[/C][C]32479.0929744682[/C][C]-133.092974468225[/C][/ROW]
[ROW][C]18[/C][C]32091[/C][C]32372.5491118175[/C][C]-281.549111817545[/C][/ROW]
[ROW][C]19[/C][C]31855[/C][C]32030.8221253145[/C][C]-175.822125314469[/C][/ROW]
[ROW][C]20[/C][C]31683[/C][C]31731.4588248743[/C][C]-48.4588248742584[/C][/ROW]
[ROW][C]21[/C][C]31615[/C][C]31537.4392264715[/C][C]77.5607735284975[/C][/ROW]
[ROW][C]22[/C][C]31840[/C][C]31489.3824325117[/C][C]350.617567488269[/C][/ROW]
[ROW][C]23[/C][C]31536[/C][C]31818.2948133802[/C][C]-282.294813380224[/C][/ROW]
[ROW][C]24[/C][C]31383[/C][C]31449.7902146135[/C][C]-66.7902146135239[/C][/ROW]
[ROW][C]25[/C][C]31638[/C][C]31264.5873596225[/C][C]373.412640377519[/C][/ROW]
[ROW][C]26[/C][C]31626[/C][C]31623.3262502815[/C][C]2.67374971845493[/C][/ROW]
[ROW][C]27[/C][C]31720[/C][C]31629.4110739582[/C][C]90.5889260418298[/C][/ROW]
[ROW][C]28[/C][C]31472[/C][C]31749.4534147274[/C][C]-277.453414727373[/C][/ROW]
[ROW][C]29[/C][C]31372[/C][C]31426.2731870665[/C][C]-54.2731870665048[/C][/ROW]
[ROW][C]30[/C][C]31419[/C][C]31297.8761253727[/C][C]121.123874627276[/C][/ROW]
[ROW][C]31[/C][C]31341[/C][C]31377.0134504400[/C][C]-36.0134504400448[/C][/ROW]
[ROW][C]32[/C][C]31171[/C][C]31294.3277078892[/C][C]-123.327707889170[/C][/ROW]
[ROW][C]33[/C][C]31036[/C][C]31087.3721192354[/C][C]-51.3721192353878[/C][/ROW]
[ROW][C]34[/C][C]30532[/C][C]30931.9538266867[/C][C]-399.953826686688[/C][/ROW]
[ROW][C]35[/C][C]30666[/C][C]30311.1405852349[/C][C]354.859414765102[/C][/ROW]
[ROW][C]36[/C][C]30571[/C][C]30528.1182415526[/C][C]42.8817584473582[/C][/ROW]
[ROW][C]37[/C][C]30173[/C][C]30461.8464001842[/C][C]-288.846400184200[/C][/ROW]
[ROW][C]38[/C][C]30032[/C][C]29983.1937533289[/C][C]48.8062466710981[/C][/ROW]
[ROW][C]39[/C][C]29874[/C][C]29842.7602302191[/C][C]31.2397697809029[/C][/ROW]
[ROW][C]40[/C][C]30018[/C][C]29695.9619751629[/C][C]322.03802483714[/C][/ROW]
[ROW][C]41[/C][C]29911[/C][C]29933.5489985127[/C][C]-22.5489985127133[/C][/ROW]
[ROW][C]42[/C][C]29963[/C][C]29835.0344749239[/C][C]127.965525076135[/C][/ROW]
[ROW][C]43[/C][C]30050[/C][C]29922.6007086549[/C][C]127.399291345148[/C][/ROW]
[ROW][C]44[/C][C]29901[/C][C]30051.9861886736[/C][C]-150.98618867364[/C][/ROW]
[ROW][C]45[/C][C]29544[/C][C]29865.6967576668[/C][C]-321.696757666832[/C][/ROW]
[ROW][C]46[/C][C]29451[/C][C]29409.6532269067[/C][C]41.3467730933189[/C][/ROW]
[ROW][C]47[/C][C]29293[/C][C]29313.5617956373[/C][C]-20.5617956373280[/C][/ROW]
[ROW][C]48[/C][C]29334[/C][C]29151.5966464339[/C][C]182.403353566056[/C][/ROW]
[ROW][C]49[/C][C]29389[/C][C]29243.8302154382[/C][C]145.1697845618[/C][/ROW]
[ROW][C]50[/C][C]29563[/C][C]29348.8249636843[/C][C]214.175036315726[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116995&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116995&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
33087230657215
43075230639.513478516112.486521484017
53096730561.6691607835405.330839216465
63078130897.8554582621-116.855458262118
73068130697.2223237869-16.2223237869039
83135630587.1609107732768.8390892268
93143431481.3804162387-47.3804162386623
103159431581.485178785512.5148212144813
113194931742.8681586578206.131841342241
123239632157.4248449895238.575155010458
133244132682.2443176054-241.244317605357
143244732669.2878279993-222.287827999317
153228832600.4997025092-312.499702509169
163241832341.780380330476.2196196695586
173234632479.0929744682-133.092974468225
183209132372.5491118175-281.549111817545
193185532030.8221253145-175.822125314469
203168331731.4588248743-48.4588248742584
213161531537.439226471577.5607735284975
223184031489.3824325117350.617567488269
233153631818.2948133802-282.294813380224
243138331449.7902146135-66.7902146135239
253163831264.5873596225373.412640377519
263162631623.32625028152.67374971845493
273172031629.411073958290.5889260418298
283147231749.4534147274-277.453414727373
293137231426.2731870665-54.2731870665048
303141931297.8761253727121.123874627276
313134131377.0134504400-36.0134504400448
323117131294.3277078892-123.327707889170
333103631087.3721192354-51.3721192353878
343053230931.9538266867-399.953826686688
353066630311.1405852349354.859414765102
363057130528.118241552642.8817584473582
373017330461.8464001842-288.846400184200
383003229983.193753328948.8062466710981
392987429842.760230219131.2397697809029
403001829695.9619751629322.03802483714
412991129933.5489985127-22.5489985127133
422996329835.0344749239127.965525076135
433005029922.6007086549127.399291345148
442990130051.9861886736-150.98618867364
452954429865.6967576668-321.696757666832
462945129409.653226906741.3467730933189
472929329313.5617956373-20.5617956373280
482933429151.5966464339182.403353566056
492938929243.8302154382145.1697845618
502956329348.8249636843214.175036315726







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
5129590.835760716229141.973793977530039.6977274549
5229628.605510818528897.349317233330359.8617044038
5329666.375260920928635.560455249630697.1900665922
5429704.145011023328351.534724262331056.7552977843
5529741.914761125728044.796972843831439.0325494075
5629779.684511228127715.928552833831843.4404696224
5729817.454261330427365.772983669832269.1355389911
5829855.224011432826995.204260550332715.2437623154
5929892.993761535226605.053492264633180.9340308058
6029930.763511637626196.087796444233665.439226831
6129968.533261740025769.007774331434168.0587491486
6230006.303011842325324.451564671934688.1544590128

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
51 & 29590.8357607162 & 29141.9737939775 & 30039.6977274549 \tabularnewline
52 & 29628.6055108185 & 28897.3493172333 & 30359.8617044038 \tabularnewline
53 & 29666.3752609209 & 28635.5604552496 & 30697.1900665922 \tabularnewline
54 & 29704.1450110233 & 28351.5347242623 & 31056.7552977843 \tabularnewline
55 & 29741.9147611257 & 28044.7969728438 & 31439.0325494075 \tabularnewline
56 & 29779.6845112281 & 27715.9285528338 & 31843.4404696224 \tabularnewline
57 & 29817.4542613304 & 27365.7729836698 & 32269.1355389911 \tabularnewline
58 & 29855.2240114328 & 26995.2042605503 & 32715.2437623154 \tabularnewline
59 & 29892.9937615352 & 26605.0534922646 & 33180.9340308058 \tabularnewline
60 & 29930.7635116376 & 26196.0877964442 & 33665.439226831 \tabularnewline
61 & 29968.5332617400 & 25769.0077743314 & 34168.0587491486 \tabularnewline
62 & 30006.3030118423 & 25324.4515646719 & 34688.1544590128 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116995&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]51[/C][C]29590.8357607162[/C][C]29141.9737939775[/C][C]30039.6977274549[/C][/ROW]
[ROW][C]52[/C][C]29628.6055108185[/C][C]28897.3493172333[/C][C]30359.8617044038[/C][/ROW]
[ROW][C]53[/C][C]29666.3752609209[/C][C]28635.5604552496[/C][C]30697.1900665922[/C][/ROW]
[ROW][C]54[/C][C]29704.1450110233[/C][C]28351.5347242623[/C][C]31056.7552977843[/C][/ROW]
[ROW][C]55[/C][C]29741.9147611257[/C][C]28044.7969728438[/C][C]31439.0325494075[/C][/ROW]
[ROW][C]56[/C][C]29779.6845112281[/C][C]27715.9285528338[/C][C]31843.4404696224[/C][/ROW]
[ROW][C]57[/C][C]29817.4542613304[/C][C]27365.7729836698[/C][C]32269.1355389911[/C][/ROW]
[ROW][C]58[/C][C]29855.2240114328[/C][C]26995.2042605503[/C][C]32715.2437623154[/C][/ROW]
[ROW][C]59[/C][C]29892.9937615352[/C][C]26605.0534922646[/C][C]33180.9340308058[/C][/ROW]
[ROW][C]60[/C][C]29930.7635116376[/C][C]26196.0877964442[/C][C]33665.439226831[/C][/ROW]
[ROW][C]61[/C][C]29968.5332617400[/C][C]25769.0077743314[/C][C]34168.0587491486[/C][/ROW]
[ROW][C]62[/C][C]30006.3030118423[/C][C]25324.4515646719[/C][C]34688.1544590128[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116995&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116995&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
5129590.835760716229141.973793977530039.6977274549
5229628.605510818528897.349317233330359.8617044038
5329666.375260920928635.560455249630697.1900665922
5429704.145011023328351.534724262331056.7552977843
5529741.914761125728044.796972843831439.0325494075
5629779.684511228127715.928552833831843.4404696224
5729817.454261330427365.772983669832269.1355389911
5829855.224011432826995.204260550332715.2437623154
5929892.993761535226605.053492264633180.9340308058
6029930.763511637626196.087796444233665.439226831
6129968.533261740025769.007774331434168.0587491486
6230006.303011842325324.451564671934688.1544590128



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