Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationTue, 29 Nov 2011 07:04:52 -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/t132256831785r13zcm671ery6.htm/, Retrieved Fri, 29 Mar 2024 13:35:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=148222, Retrieved Fri, 29 Mar 2024 13:35:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact101
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMPD  [Classical Decomposition] [compendium 8] [2011-11-24 14:23:11] [380049693c521f4999989215fb37aeca]
- RMPD    [Exponential Smoothing] [WS 8 Q3] [2011-11-24 15:31:44] [380049693c521f4999989215fb37aeca]
- R           [Exponential Smoothing] [compendium 8] [2011-11-29 12:04:52] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
135094
135411
135698
135880
135891
135971
136173
136358
136514
136506
136711
136891
137094
137182
137400
137479
137620
137687
137638
137612
137681
137772
137899
137983
137996
137913
137841
137656
137423
137245
137014
136747
136313
135804
135002
134383
133563
132837
132041
131381
130995
130493
130193
129962
129726
129505
129450
129320
129281
129246
129438
129715
130173
129981
129932
129873
129844
130015
130108
130260




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148222&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'Herman Ole Andreas Wold' @ wold.wessa.net







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.848868141789721
beta0.724748156429199
gamma0.372296217430524

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

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13137094136245.097489316848.902510683751
14137182137587.108287325-405.10828732542
15137400137757.816989627-357.816989627376
16137479137609.035166518-130.035166517831
17137620137634.735410628-14.735410627909
18137687137682.4944894724.50551052833907
19137638137630.2751004277.72489957290236
20137612137760.499360398-148.499360398273
21137681137650.16736357430.8326364259701
22137772137554.199971884217.800028115744
23137899137962.812222064-63.8122220638907
24137983138063.239528916-80.2395289157867
25137996138182.121801868-186.121801867819
26137913137882.54680674330.4531932568934
27137841138001.18620052-160.186200519995
28137656137730.104280811-74.1042808110651
29137423137541.300553552-118.300553551817
30137245137170.04484085974.9551591413037
31137014136888.966532692125.033467307629
32136747136893.307752949-146.307752949302
33136313136579.60225504-266.602255039674
34135804135843.360993242-39.3609932418622
35135002135461.312083807-459.312083806755
36134383134425.249951756-42.2499517561519
37133563133793.956684645-230.9566846448
38132837132664.459306141172.54069385858
39132041132176.350971511-135.350971510576
40131381131229.838577698151.161422302015
41130995130667.000190619327.999809380693
42130493130397.27048437895.7295156223117
43130193129861.227426954331.772573046095
44129962129877.56764332184.4323566786334
45129726129746.688516213-20.6885162131512
46129505129376.998393575128.001606425154
47129450129361.37034157188.6296584294614
48129320129398.988130232-78.9881302324939
49129281129288.372643319-7.372643319497
50129246129071.40552822174.594471779521
51129438129269.014102922168.98589707783
52129715129485.494530749229.505469250536
53130173129935.8384424237.161557599902
54129981130456.773624832-475.773624832174
55129932129978.126720179-46.1267201792361
56129873129956.519723211-83.5197232108476
57129844129870.586228388-26.5862283878814
58130015129694.05704694320.942953059712
59130108130148.497142389-40.4971423894312
60130260130296.13300644-36.133006439879

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 137094 & 136245.097489316 & 848.902510683751 \tabularnewline
14 & 137182 & 137587.108287325 & -405.10828732542 \tabularnewline
15 & 137400 & 137757.816989627 & -357.816989627376 \tabularnewline
16 & 137479 & 137609.035166518 & -130.035166517831 \tabularnewline
17 & 137620 & 137634.735410628 & -14.735410627909 \tabularnewline
18 & 137687 & 137682.494489472 & 4.50551052833907 \tabularnewline
19 & 137638 & 137630.275100427 & 7.72489957290236 \tabularnewline
20 & 137612 & 137760.499360398 & -148.499360398273 \tabularnewline
21 & 137681 & 137650.167363574 & 30.8326364259701 \tabularnewline
22 & 137772 & 137554.199971884 & 217.800028115744 \tabularnewline
23 & 137899 & 137962.812222064 & -63.8122220638907 \tabularnewline
24 & 137983 & 138063.239528916 & -80.2395289157867 \tabularnewline
25 & 137996 & 138182.121801868 & -186.121801867819 \tabularnewline
26 & 137913 & 137882.546806743 & 30.4531932568934 \tabularnewline
27 & 137841 & 138001.18620052 & -160.186200519995 \tabularnewline
28 & 137656 & 137730.104280811 & -74.1042808110651 \tabularnewline
29 & 137423 & 137541.300553552 & -118.300553551817 \tabularnewline
30 & 137245 & 137170.044840859 & 74.9551591413037 \tabularnewline
31 & 137014 & 136888.966532692 & 125.033467307629 \tabularnewline
32 & 136747 & 136893.307752949 & -146.307752949302 \tabularnewline
33 & 136313 & 136579.60225504 & -266.602255039674 \tabularnewline
34 & 135804 & 135843.360993242 & -39.3609932418622 \tabularnewline
35 & 135002 & 135461.312083807 & -459.312083806755 \tabularnewline
36 & 134383 & 134425.249951756 & -42.2499517561519 \tabularnewline
37 & 133563 & 133793.956684645 & -230.9566846448 \tabularnewline
38 & 132837 & 132664.459306141 & 172.54069385858 \tabularnewline
39 & 132041 & 132176.350971511 & -135.350971510576 \tabularnewline
40 & 131381 & 131229.838577698 & 151.161422302015 \tabularnewline
41 & 130995 & 130667.000190619 & 327.999809380693 \tabularnewline
42 & 130493 & 130397.270484378 & 95.7295156223117 \tabularnewline
43 & 130193 & 129861.227426954 & 331.772573046095 \tabularnewline
44 & 129962 & 129877.567643321 & 84.4323566786334 \tabularnewline
45 & 129726 & 129746.688516213 & -20.6885162131512 \tabularnewline
46 & 129505 & 129376.998393575 & 128.001606425154 \tabularnewline
47 & 129450 & 129361.370341571 & 88.6296584294614 \tabularnewline
48 & 129320 & 129398.988130232 & -78.9881302324939 \tabularnewline
49 & 129281 & 129288.372643319 & -7.372643319497 \tabularnewline
50 & 129246 & 129071.40552822 & 174.594471779521 \tabularnewline
51 & 129438 & 129269.014102922 & 168.98589707783 \tabularnewline
52 & 129715 & 129485.494530749 & 229.505469250536 \tabularnewline
53 & 130173 & 129935.8384424 & 237.161557599902 \tabularnewline
54 & 129981 & 130456.773624832 & -475.773624832174 \tabularnewline
55 & 129932 & 129978.126720179 & -46.1267201792361 \tabularnewline
56 & 129873 & 129956.519723211 & -83.5197232108476 \tabularnewline
57 & 129844 & 129870.586228388 & -26.5862283878814 \tabularnewline
58 & 130015 & 129694.05704694 & 320.942953059712 \tabularnewline
59 & 130108 & 130148.497142389 & -40.4971423894312 \tabularnewline
60 & 130260 & 130296.13300644 & -36.133006439879 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148222&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]137094[/C][C]136245.097489316[/C][C]848.902510683751[/C][/ROW]
[ROW][C]14[/C][C]137182[/C][C]137587.108287325[/C][C]-405.10828732542[/C][/ROW]
[ROW][C]15[/C][C]137400[/C][C]137757.816989627[/C][C]-357.816989627376[/C][/ROW]
[ROW][C]16[/C][C]137479[/C][C]137609.035166518[/C][C]-130.035166517831[/C][/ROW]
[ROW][C]17[/C][C]137620[/C][C]137634.735410628[/C][C]-14.735410627909[/C][/ROW]
[ROW][C]18[/C][C]137687[/C][C]137682.494489472[/C][C]4.50551052833907[/C][/ROW]
[ROW][C]19[/C][C]137638[/C][C]137630.275100427[/C][C]7.72489957290236[/C][/ROW]
[ROW][C]20[/C][C]137612[/C][C]137760.499360398[/C][C]-148.499360398273[/C][/ROW]
[ROW][C]21[/C][C]137681[/C][C]137650.167363574[/C][C]30.8326364259701[/C][/ROW]
[ROW][C]22[/C][C]137772[/C][C]137554.199971884[/C][C]217.800028115744[/C][/ROW]
[ROW][C]23[/C][C]137899[/C][C]137962.812222064[/C][C]-63.8122220638907[/C][/ROW]
[ROW][C]24[/C][C]137983[/C][C]138063.239528916[/C][C]-80.2395289157867[/C][/ROW]
[ROW][C]25[/C][C]137996[/C][C]138182.121801868[/C][C]-186.121801867819[/C][/ROW]
[ROW][C]26[/C][C]137913[/C][C]137882.546806743[/C][C]30.4531932568934[/C][/ROW]
[ROW][C]27[/C][C]137841[/C][C]138001.18620052[/C][C]-160.186200519995[/C][/ROW]
[ROW][C]28[/C][C]137656[/C][C]137730.104280811[/C][C]-74.1042808110651[/C][/ROW]
[ROW][C]29[/C][C]137423[/C][C]137541.300553552[/C][C]-118.300553551817[/C][/ROW]
[ROW][C]30[/C][C]137245[/C][C]137170.044840859[/C][C]74.9551591413037[/C][/ROW]
[ROW][C]31[/C][C]137014[/C][C]136888.966532692[/C][C]125.033467307629[/C][/ROW]
[ROW][C]32[/C][C]136747[/C][C]136893.307752949[/C][C]-146.307752949302[/C][/ROW]
[ROW][C]33[/C][C]136313[/C][C]136579.60225504[/C][C]-266.602255039674[/C][/ROW]
[ROW][C]34[/C][C]135804[/C][C]135843.360993242[/C][C]-39.3609932418622[/C][/ROW]
[ROW][C]35[/C][C]135002[/C][C]135461.312083807[/C][C]-459.312083806755[/C][/ROW]
[ROW][C]36[/C][C]134383[/C][C]134425.249951756[/C][C]-42.2499517561519[/C][/ROW]
[ROW][C]37[/C][C]133563[/C][C]133793.956684645[/C][C]-230.9566846448[/C][/ROW]
[ROW][C]38[/C][C]132837[/C][C]132664.459306141[/C][C]172.54069385858[/C][/ROW]
[ROW][C]39[/C][C]132041[/C][C]132176.350971511[/C][C]-135.350971510576[/C][/ROW]
[ROW][C]40[/C][C]131381[/C][C]131229.838577698[/C][C]151.161422302015[/C][/ROW]
[ROW][C]41[/C][C]130995[/C][C]130667.000190619[/C][C]327.999809380693[/C][/ROW]
[ROW][C]42[/C][C]130493[/C][C]130397.270484378[/C][C]95.7295156223117[/C][/ROW]
[ROW][C]43[/C][C]130193[/C][C]129861.227426954[/C][C]331.772573046095[/C][/ROW]
[ROW][C]44[/C][C]129962[/C][C]129877.567643321[/C][C]84.4323566786334[/C][/ROW]
[ROW][C]45[/C][C]129726[/C][C]129746.688516213[/C][C]-20.6885162131512[/C][/ROW]
[ROW][C]46[/C][C]129505[/C][C]129376.998393575[/C][C]128.001606425154[/C][/ROW]
[ROW][C]47[/C][C]129450[/C][C]129361.370341571[/C][C]88.6296584294614[/C][/ROW]
[ROW][C]48[/C][C]129320[/C][C]129398.988130232[/C][C]-78.9881302324939[/C][/ROW]
[ROW][C]49[/C][C]129281[/C][C]129288.372643319[/C][C]-7.372643319497[/C][/ROW]
[ROW][C]50[/C][C]129246[/C][C]129071.40552822[/C][C]174.594471779521[/C][/ROW]
[ROW][C]51[/C][C]129438[/C][C]129269.014102922[/C][C]168.98589707783[/C][/ROW]
[ROW][C]52[/C][C]129715[/C][C]129485.494530749[/C][C]229.505469250536[/C][/ROW]
[ROW][C]53[/C][C]130173[/C][C]129935.8384424[/C][C]237.161557599902[/C][/ROW]
[ROW][C]54[/C][C]129981[/C][C]130456.773624832[/C][C]-475.773624832174[/C][/ROW]
[ROW][C]55[/C][C]129932[/C][C]129978.126720179[/C][C]-46.1267201792361[/C][/ROW]
[ROW][C]56[/C][C]129873[/C][C]129956.519723211[/C][C]-83.5197232108476[/C][/ROW]
[ROW][C]57[/C][C]129844[/C][C]129870.586228388[/C][C]-26.5862283878814[/C][/ROW]
[ROW][C]58[/C][C]130015[/C][C]129694.05704694[/C][C]320.942953059712[/C][/ROW]
[ROW][C]59[/C][C]130108[/C][C]130148.497142389[/C][C]-40.4971423894312[/C][/ROW]
[ROW][C]60[/C][C]130260[/C][C]130296.13300644[/C][C]-36.133006439879[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148222&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148222&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
13137094136245.097489316848.902510683751
14137182137587.108287325-405.10828732542
15137400137757.816989627-357.816989627376
16137479137609.035166518-130.035166517831
17137620137634.735410628-14.735410627909
18137687137682.4944894724.50551052833907
19137638137630.2751004277.72489957290236
20137612137760.499360398-148.499360398273
21137681137650.16736357430.8326364259701
22137772137554.199971884217.800028115744
23137899137962.812222064-63.8122220638907
24137983138063.239528916-80.2395289157867
25137996138182.121801868-186.121801867819
26137913137882.54680674330.4531932568934
27137841138001.18620052-160.186200519995
28137656137730.104280811-74.1042808110651
29137423137541.300553552-118.300553551817
30137245137170.04484085974.9551591413037
31137014136888.966532692125.033467307629
32136747136893.307752949-146.307752949302
33136313136579.60225504-266.602255039674
34135804135843.360993242-39.3609932418622
35135002135461.312083807-459.312083806755
36134383134425.249951756-42.2499517561519
37133563133793.956684645-230.9566846448
38132837132664.459306141172.54069385858
39132041132176.350971511-135.350971510576
40131381131229.838577698151.161422302015
41130995130667.000190619327.999809380693
42130493130397.27048437895.7295156223117
43130193129861.227426954331.772573046095
44129962129877.56764332184.4323566786334
45129726129746.688516213-20.6885162131512
46129505129376.998393575128.001606425154
47129450129361.37034157188.6296584294614
48129320129398.988130232-78.9881302324939
49129281129288.372643319-7.372643319497
50129246129071.40552822174.594471779521
51129438129269.014102922168.98589707783
52129715129485.494530749229.505469250536
53130173129935.8384424237.161557599902
54129981130456.773624832-475.773624832174
55129932129978.126720179-46.1267201792361
56129873129956.519723211-83.5197232108476
57129844129870.586228388-26.5862283878814
58130015129694.05704694320.942953059712
59130108130148.497142389-40.4971423894312
60130260130296.13300644-36.133006439879







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61130481.351369488130036.707404122130925.995334854
62130540.842947175129752.487658772131329.198235578
63130742.476781618129527.448830201131957.504733034
64130867.501400343129161.120393572132573.882407115
65131030.846609155128777.516848153133284.176370158
66131071.833926247128221.705712325133921.962140169
67131075.41880282127582.768675679134568.06892996
68131173.42951331126995.717396049135351.141630571
69131295.545450979126392.799994962136198.290906997
70131311.443539419125645.830631321136977.056447517
71131425.964599056124961.468509889137890.460688224
72131585.99315881124288.171943387138883.814374233

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 130481.351369488 & 130036.707404122 & 130925.995334854 \tabularnewline
62 & 130540.842947175 & 129752.487658772 & 131329.198235578 \tabularnewline
63 & 130742.476781618 & 129527.448830201 & 131957.504733034 \tabularnewline
64 & 130867.501400343 & 129161.120393572 & 132573.882407115 \tabularnewline
65 & 131030.846609155 & 128777.516848153 & 133284.176370158 \tabularnewline
66 & 131071.833926247 & 128221.705712325 & 133921.962140169 \tabularnewline
67 & 131075.41880282 & 127582.768675679 & 134568.06892996 \tabularnewline
68 & 131173.42951331 & 126995.717396049 & 135351.141630571 \tabularnewline
69 & 131295.545450979 & 126392.799994962 & 136198.290906997 \tabularnewline
70 & 131311.443539419 & 125645.830631321 & 136977.056447517 \tabularnewline
71 & 131425.964599056 & 124961.468509889 & 137890.460688224 \tabularnewline
72 & 131585.99315881 & 124288.171943387 & 138883.814374233 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148222&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]130481.351369488[/C][C]130036.707404122[/C][C]130925.995334854[/C][/ROW]
[ROW][C]62[/C][C]130540.842947175[/C][C]129752.487658772[/C][C]131329.198235578[/C][/ROW]
[ROW][C]63[/C][C]130742.476781618[/C][C]129527.448830201[/C][C]131957.504733034[/C][/ROW]
[ROW][C]64[/C][C]130867.501400343[/C][C]129161.120393572[/C][C]132573.882407115[/C][/ROW]
[ROW][C]65[/C][C]131030.846609155[/C][C]128777.516848153[/C][C]133284.176370158[/C][/ROW]
[ROW][C]66[/C][C]131071.833926247[/C][C]128221.705712325[/C][C]133921.962140169[/C][/ROW]
[ROW][C]67[/C][C]131075.41880282[/C][C]127582.768675679[/C][C]134568.06892996[/C][/ROW]
[ROW][C]68[/C][C]131173.42951331[/C][C]126995.717396049[/C][C]135351.141630571[/C][/ROW]
[ROW][C]69[/C][C]131295.545450979[/C][C]126392.799994962[/C][C]136198.290906997[/C][/ROW]
[ROW][C]70[/C][C]131311.443539419[/C][C]125645.830631321[/C][C]136977.056447517[/C][/ROW]
[ROW][C]71[/C][C]131425.964599056[/C][C]124961.468509889[/C][C]137890.460688224[/C][/ROW]
[ROW][C]72[/C][C]131585.99315881[/C][C]124288.171943387[/C][C]138883.814374233[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148222&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148222&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
61130481.351369488130036.707404122130925.995334854
62130540.842947175129752.487658772131329.198235578
63130742.476781618129527.448830201131957.504733034
64130867.501400343129161.120393572132573.882407115
65131030.846609155128777.516848153133284.176370158
66131071.833926247128221.705712325133921.962140169
67131075.41880282127582.768675679134568.06892996
68131173.42951331126995.717396049135351.141630571
69131295.545450979126392.799994962136198.290906997
70131311.443539419125645.830631321136977.056447517
71131425.964599056124961.468509889137890.460688224
72131585.99315881124288.171943387138883.814374233



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')