Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationTue, 31 May 2016 12:25:51 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/May/31/t1464693963g95mnhz66r95jod.htm/, Retrieved Tue, 07 May 2024 00:36:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=295753, Retrieved Tue, 07 May 2024 00:36:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact133
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Exponential Smoothing] [] [2016-05-31 11:25:51] [9b4dafad127b39cd929ee42874de7246] [Current]
Feedback Forum

Post a new message
Dataseries X:
113149
112534
108783
106640
102617
102191
117359
116083
108666
105017
100918
103907
105732
103409
100255
97036
94055
92523
106380
104846
101411
98072
95678
99148
106813
106782
103496
100854
99592
98923
110497
114783
113551
112376
111683
113467
117277
117442
115640
114872
111628
111098
124301
125847
125323
122394
121164
123963
130549
128563
125418
121982
117708
116905
128862
129655
128649
126084
123725
123974




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=295753&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'Sir Ronald Aylmer Fisher' @ fisher.wessa.net







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.669030592244568
beta0.113723295587826
gamma1

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

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13105732110489.715606266-4757.71560626557
14103409104790.46196232-1381.46196231966
15100255100277.307213388-22.3072133884707
169703696456.610825984579.389174016003
179405593261.1273993318793.872600668197
189252391639.2503739604883.749626039615
19106380107451.220649662-1071.2206496618
20104846105068.038707366-222.038707366111
2110141197761.63827493443649.36172506564
229807296698.25043630621373.74956369377
239567893779.36985845751898.6301415425
249914897997.60836418391150.39163581608
2510681399353.13919135767459.86080864241
26106782104116.4477986262665.55220137394
27103496104164.454839666-668.454839665734
28100854101392.63753408-538.637534079709
299959298668.8205642321923.179435767888
309892398344.3789867848578.621013215175
31110497115783.195886368-5286.1958863685
32114783111955.3258846742827.67411532624
33113551108809.2909621074741.70903789251
34112376108672.8279098563703.1720901442
35111683108525.0054935323157.99450646814
36113467115438.157928436-1971.15792843631
37117277118532.513719205-1255.51371920462
38117442116374.7262486981067.27375130157
39115640114513.8236218151126.17637818542
40114872113385.6575633551486.34243664535
41111628113045.082263511-1417.08226351142
42111098111512.691224069-414.691224068767
43124301128767.075696286-4466.07569628647
44125847129211.484914983-3364.48491498276
45125323122256.9814740663066.01852593407
46122394120329.410259582064.58974042015
47121164118557.0462815422606.95371845766
48123963123480.704648581482.295351418754
49130549128905.6402293881643.35977061209
50128563129638.422862312-1075.42286231232
51125418126190.225206063-772.225206062751
52121982123691.178294589-1709.17829458919
53117708119806.831640723-2098.83164072303
54116905117810.613577856-905.613577856115
55128862133845.587446791-4983.58744679109
56129655134041.723668533-4386.72366853312
57128649127918.388443903730.611556097487
58126084123341.7301197072742.2698802933
59123725121546.7906430052178.20935699483
60123974124903.069361998-929.069361998321

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 105732 & 110489.715606266 & -4757.71560626557 \tabularnewline
14 & 103409 & 104790.46196232 & -1381.46196231966 \tabularnewline
15 & 100255 & 100277.307213388 & -22.3072133884707 \tabularnewline
16 & 97036 & 96456.610825984 & 579.389174016003 \tabularnewline
17 & 94055 & 93261.1273993318 & 793.872600668197 \tabularnewline
18 & 92523 & 91639.2503739604 & 883.749626039615 \tabularnewline
19 & 106380 & 107451.220649662 & -1071.2206496618 \tabularnewline
20 & 104846 & 105068.038707366 & -222.038707366111 \tabularnewline
21 & 101411 & 97761.6382749344 & 3649.36172506564 \tabularnewline
22 & 98072 & 96698.2504363062 & 1373.74956369377 \tabularnewline
23 & 95678 & 93779.3698584575 & 1898.6301415425 \tabularnewline
24 & 99148 & 97997.6083641839 & 1150.39163581608 \tabularnewline
25 & 106813 & 99353.1391913576 & 7459.86080864241 \tabularnewline
26 & 106782 & 104116.447798626 & 2665.55220137394 \tabularnewline
27 & 103496 & 104164.454839666 & -668.454839665734 \tabularnewline
28 & 100854 & 101392.63753408 & -538.637534079709 \tabularnewline
29 & 99592 & 98668.8205642321 & 923.179435767888 \tabularnewline
30 & 98923 & 98344.3789867848 & 578.621013215175 \tabularnewline
31 & 110497 & 115783.195886368 & -5286.1958863685 \tabularnewline
32 & 114783 & 111955.325884674 & 2827.67411532624 \tabularnewline
33 & 113551 & 108809.290962107 & 4741.70903789251 \tabularnewline
34 & 112376 & 108672.827909856 & 3703.1720901442 \tabularnewline
35 & 111683 & 108525.005493532 & 3157.99450646814 \tabularnewline
36 & 113467 & 115438.157928436 & -1971.15792843631 \tabularnewline
37 & 117277 & 118532.513719205 & -1255.51371920462 \tabularnewline
38 & 117442 & 116374.726248698 & 1067.27375130157 \tabularnewline
39 & 115640 & 114513.823621815 & 1126.17637818542 \tabularnewline
40 & 114872 & 113385.657563355 & 1486.34243664535 \tabularnewline
41 & 111628 & 113045.082263511 & -1417.08226351142 \tabularnewline
42 & 111098 & 111512.691224069 & -414.691224068767 \tabularnewline
43 & 124301 & 128767.075696286 & -4466.07569628647 \tabularnewline
44 & 125847 & 129211.484914983 & -3364.48491498276 \tabularnewline
45 & 125323 & 122256.981474066 & 3066.01852593407 \tabularnewline
46 & 122394 & 120329.41025958 & 2064.58974042015 \tabularnewline
47 & 121164 & 118557.046281542 & 2606.95371845766 \tabularnewline
48 & 123963 & 123480.704648581 & 482.295351418754 \tabularnewline
49 & 130549 & 128905.640229388 & 1643.35977061209 \tabularnewline
50 & 128563 & 129638.422862312 & -1075.42286231232 \tabularnewline
51 & 125418 & 126190.225206063 & -772.225206062751 \tabularnewline
52 & 121982 & 123691.178294589 & -1709.17829458919 \tabularnewline
53 & 117708 & 119806.831640723 & -2098.83164072303 \tabularnewline
54 & 116905 & 117810.613577856 & -905.613577856115 \tabularnewline
55 & 128862 & 133845.587446791 & -4983.58744679109 \tabularnewline
56 & 129655 & 134041.723668533 & -4386.72366853312 \tabularnewline
57 & 128649 & 127918.388443903 & 730.611556097487 \tabularnewline
58 & 126084 & 123341.730119707 & 2742.2698802933 \tabularnewline
59 & 123725 & 121546.790643005 & 2178.20935699483 \tabularnewline
60 & 123974 & 124903.069361998 & -929.069361998321 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=295753&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]105732[/C][C]110489.715606266[/C][C]-4757.71560626557[/C][/ROW]
[ROW][C]14[/C][C]103409[/C][C]104790.46196232[/C][C]-1381.46196231966[/C][/ROW]
[ROW][C]15[/C][C]100255[/C][C]100277.307213388[/C][C]-22.3072133884707[/C][/ROW]
[ROW][C]16[/C][C]97036[/C][C]96456.610825984[/C][C]579.389174016003[/C][/ROW]
[ROW][C]17[/C][C]94055[/C][C]93261.1273993318[/C][C]793.872600668197[/C][/ROW]
[ROW][C]18[/C][C]92523[/C][C]91639.2503739604[/C][C]883.749626039615[/C][/ROW]
[ROW][C]19[/C][C]106380[/C][C]107451.220649662[/C][C]-1071.2206496618[/C][/ROW]
[ROW][C]20[/C][C]104846[/C][C]105068.038707366[/C][C]-222.038707366111[/C][/ROW]
[ROW][C]21[/C][C]101411[/C][C]97761.6382749344[/C][C]3649.36172506564[/C][/ROW]
[ROW][C]22[/C][C]98072[/C][C]96698.2504363062[/C][C]1373.74956369377[/C][/ROW]
[ROW][C]23[/C][C]95678[/C][C]93779.3698584575[/C][C]1898.6301415425[/C][/ROW]
[ROW][C]24[/C][C]99148[/C][C]97997.6083641839[/C][C]1150.39163581608[/C][/ROW]
[ROW][C]25[/C][C]106813[/C][C]99353.1391913576[/C][C]7459.86080864241[/C][/ROW]
[ROW][C]26[/C][C]106782[/C][C]104116.447798626[/C][C]2665.55220137394[/C][/ROW]
[ROW][C]27[/C][C]103496[/C][C]104164.454839666[/C][C]-668.454839665734[/C][/ROW]
[ROW][C]28[/C][C]100854[/C][C]101392.63753408[/C][C]-538.637534079709[/C][/ROW]
[ROW][C]29[/C][C]99592[/C][C]98668.8205642321[/C][C]923.179435767888[/C][/ROW]
[ROW][C]30[/C][C]98923[/C][C]98344.3789867848[/C][C]578.621013215175[/C][/ROW]
[ROW][C]31[/C][C]110497[/C][C]115783.195886368[/C][C]-5286.1958863685[/C][/ROW]
[ROW][C]32[/C][C]114783[/C][C]111955.325884674[/C][C]2827.67411532624[/C][/ROW]
[ROW][C]33[/C][C]113551[/C][C]108809.290962107[/C][C]4741.70903789251[/C][/ROW]
[ROW][C]34[/C][C]112376[/C][C]108672.827909856[/C][C]3703.1720901442[/C][/ROW]
[ROW][C]35[/C][C]111683[/C][C]108525.005493532[/C][C]3157.99450646814[/C][/ROW]
[ROW][C]36[/C][C]113467[/C][C]115438.157928436[/C][C]-1971.15792843631[/C][/ROW]
[ROW][C]37[/C][C]117277[/C][C]118532.513719205[/C][C]-1255.51371920462[/C][/ROW]
[ROW][C]38[/C][C]117442[/C][C]116374.726248698[/C][C]1067.27375130157[/C][/ROW]
[ROW][C]39[/C][C]115640[/C][C]114513.823621815[/C][C]1126.17637818542[/C][/ROW]
[ROW][C]40[/C][C]114872[/C][C]113385.657563355[/C][C]1486.34243664535[/C][/ROW]
[ROW][C]41[/C][C]111628[/C][C]113045.082263511[/C][C]-1417.08226351142[/C][/ROW]
[ROW][C]42[/C][C]111098[/C][C]111512.691224069[/C][C]-414.691224068767[/C][/ROW]
[ROW][C]43[/C][C]124301[/C][C]128767.075696286[/C][C]-4466.07569628647[/C][/ROW]
[ROW][C]44[/C][C]125847[/C][C]129211.484914983[/C][C]-3364.48491498276[/C][/ROW]
[ROW][C]45[/C][C]125323[/C][C]122256.981474066[/C][C]3066.01852593407[/C][/ROW]
[ROW][C]46[/C][C]122394[/C][C]120329.41025958[/C][C]2064.58974042015[/C][/ROW]
[ROW][C]47[/C][C]121164[/C][C]118557.046281542[/C][C]2606.95371845766[/C][/ROW]
[ROW][C]48[/C][C]123963[/C][C]123480.704648581[/C][C]482.295351418754[/C][/ROW]
[ROW][C]49[/C][C]130549[/C][C]128905.640229388[/C][C]1643.35977061209[/C][/ROW]
[ROW][C]50[/C][C]128563[/C][C]129638.422862312[/C][C]-1075.42286231232[/C][/ROW]
[ROW][C]51[/C][C]125418[/C][C]126190.225206063[/C][C]-772.225206062751[/C][/ROW]
[ROW][C]52[/C][C]121982[/C][C]123691.178294589[/C][C]-1709.17829458919[/C][/ROW]
[ROW][C]53[/C][C]117708[/C][C]119806.831640723[/C][C]-2098.83164072303[/C][/ROW]
[ROW][C]54[/C][C]116905[/C][C]117810.613577856[/C][C]-905.613577856115[/C][/ROW]
[ROW][C]55[/C][C]128862[/C][C]133845.587446791[/C][C]-4983.58744679109[/C][/ROW]
[ROW][C]56[/C][C]129655[/C][C]134041.723668533[/C][C]-4386.72366853312[/C][/ROW]
[ROW][C]57[/C][C]128649[/C][C]127918.388443903[/C][C]730.611556097487[/C][/ROW]
[ROW][C]58[/C][C]126084[/C][C]123341.730119707[/C][C]2742.2698802933[/C][/ROW]
[ROW][C]59[/C][C]123725[/C][C]121546.790643005[/C][C]2178.20935699483[/C][/ROW]
[ROW][C]60[/C][C]123974[/C][C]124903.069361998[/C][C]-929.069361998321[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=295753&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=295753&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
13105732110489.715606266-4757.71560626557
14103409104790.46196232-1381.46196231966
15100255100277.307213388-22.3072133884707
169703696456.610825984579.389174016003
179405593261.1273993318793.872600668197
189252391639.2503739604883.749626039615
19106380107451.220649662-1071.2206496618
20104846105068.038707366-222.038707366111
2110141197761.63827493443649.36172506564
229807296698.25043630621373.74956369377
239567893779.36985845751898.6301415425
249914897997.60836418391150.39163581608
2510681399353.13919135767459.86080864241
26106782104116.4477986262665.55220137394
27103496104164.454839666-668.454839665734
28100854101392.63753408-538.637534079709
299959298668.8205642321923.179435767888
309892398344.3789867848578.621013215175
31110497115783.195886368-5286.1958863685
32114783111955.3258846742827.67411532624
33113551108809.2909621074741.70903789251
34112376108672.8279098563703.1720901442
35111683108525.0054935323157.99450646814
36113467115438.157928436-1971.15792843631
37117277118532.513719205-1255.51371920462
38117442116374.7262486981067.27375130157
39115640114513.8236218151126.17637818542
40114872113385.6575633551486.34243664535
41111628113045.082263511-1417.08226351142
42111098111512.691224069-414.691224068767
43124301128767.075696286-4466.07569628647
44125847129211.484914983-3364.48491498276
45125323122256.9814740663066.01852593407
46122394120329.410259582064.58974042015
47121164118557.0462815422606.95371845766
48123963123480.704648581482.295351418754
49130549128905.6402293881643.35977061209
50128563129638.422862312-1075.42286231232
51125418126190.225206063-772.225206062751
52121982123691.178294589-1709.17829458919
53117708119806.831640723-2098.83164072303
54116905117810.613577856-905.613577856115
55128862133845.587446791-4983.58744679109
56129655134041.723668533-4386.72366853312
57128649127918.388443903730.611556097487
58126084123341.7301197072742.2698802933
59123725121546.7906430052178.20935699483
60123974124903.069361998-929.069361998321







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61129041.438481281123879.357346945134203.519615617
62126956.832448288120560.809208817133352.855687758
63123632.232652024116083.645458831131180.819845217
64120715.745405203112034.891255526129396.599554881
65117356.435012543107594.797462126127118.072562959
66116802.32899906105782.474034882127822.183963238
67131713.164268729118054.962335128145371.366202331
68135535.74420923120069.081666512151002.406751947
69134353.397723343117549.686971641151157.108475045
70130056.750763524112298.755214992147814.746312055
71126202.998310749107481.444637787144924.551983712
72127012.445340943107341.204410194146683.686271692

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 129041.438481281 & 123879.357346945 & 134203.519615617 \tabularnewline
62 & 126956.832448288 & 120560.809208817 & 133352.855687758 \tabularnewline
63 & 123632.232652024 & 116083.645458831 & 131180.819845217 \tabularnewline
64 & 120715.745405203 & 112034.891255526 & 129396.599554881 \tabularnewline
65 & 117356.435012543 & 107594.797462126 & 127118.072562959 \tabularnewline
66 & 116802.32899906 & 105782.474034882 & 127822.183963238 \tabularnewline
67 & 131713.164268729 & 118054.962335128 & 145371.366202331 \tabularnewline
68 & 135535.74420923 & 120069.081666512 & 151002.406751947 \tabularnewline
69 & 134353.397723343 & 117549.686971641 & 151157.108475045 \tabularnewline
70 & 130056.750763524 & 112298.755214992 & 147814.746312055 \tabularnewline
71 & 126202.998310749 & 107481.444637787 & 144924.551983712 \tabularnewline
72 & 127012.445340943 & 107341.204410194 & 146683.686271692 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=295753&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]129041.438481281[/C][C]123879.357346945[/C][C]134203.519615617[/C][/ROW]
[ROW][C]62[/C][C]126956.832448288[/C][C]120560.809208817[/C][C]133352.855687758[/C][/ROW]
[ROW][C]63[/C][C]123632.232652024[/C][C]116083.645458831[/C][C]131180.819845217[/C][/ROW]
[ROW][C]64[/C][C]120715.745405203[/C][C]112034.891255526[/C][C]129396.599554881[/C][/ROW]
[ROW][C]65[/C][C]117356.435012543[/C][C]107594.797462126[/C][C]127118.072562959[/C][/ROW]
[ROW][C]66[/C][C]116802.32899906[/C][C]105782.474034882[/C][C]127822.183963238[/C][/ROW]
[ROW][C]67[/C][C]131713.164268729[/C][C]118054.962335128[/C][C]145371.366202331[/C][/ROW]
[ROW][C]68[/C][C]135535.74420923[/C][C]120069.081666512[/C][C]151002.406751947[/C][/ROW]
[ROW][C]69[/C][C]134353.397723343[/C][C]117549.686971641[/C][C]151157.108475045[/C][/ROW]
[ROW][C]70[/C][C]130056.750763524[/C][C]112298.755214992[/C][C]147814.746312055[/C][/ROW]
[ROW][C]71[/C][C]126202.998310749[/C][C]107481.444637787[/C][C]144924.551983712[/C][/ROW]
[ROW][C]72[/C][C]127012.445340943[/C][C]107341.204410194[/C][C]146683.686271692[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=295753&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=295753&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
61129041.438481281123879.357346945134203.519615617
62126956.832448288120560.809208817133352.855687758
63123632.232652024116083.645458831131180.819845217
64120715.745405203112034.891255526129396.599554881
65117356.435012543107594.797462126127118.072562959
66116802.32899906105782.474034882127822.183963238
67131713.164268729118054.962335128145371.366202331
68135535.74420923120069.081666512151002.406751947
69134353.397723343117549.686971641151157.108475045
70130056.750763524112298.755214992147814.746312055
71126202.998310749107481.444637787144924.551983712
72127012.445340943107341.204410194146683.686271692



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