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 computationThu, 03 Dec 2009 08:14:53 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/03/t1259853350gm59rvhos0uutti.htm/, Retrieved Thu, 28 Mar 2024 13:03:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=62830, Retrieved Thu, 28 Mar 2024 13:03:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWS 9 link 11
Estimated Impact174
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]
- RMP   [Exponential Smoothing] [] [2009-11-27 15:04:36] [b98453cac15ba1066b407e146608df68]
-    D      [Exponential Smoothing] [WS 9] [2009-12-03 15:14:53] [100339cefec36dfa6f2b82a1c918e250] [Current]
-   P         [Exponential Smoothing] [WS 9] [2009-12-04 20:00:31] [786e067c4f7cec17385c4742b96b6dfa]
Feedback Forum

Post a new message
Dataseries X:
162
161
149
139
135
130
127
122
117
112
113
149
157
157
147
137
132
125
123
117
114
111
112
144
150
149
134
123
116
117
111
105
102
95
93
124
130
124
115
106
105
105
101
95
93
84
87
116
120
117
109
105
107
109
109
108
107
99
103
131
137




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62830&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' @ 72.249.127.135







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.837256207348513
beta0
gamma1

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

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13157158.906178603059-1.90617860305909
14157157.431844504105-0.431844504104788
15147147.132924301797-0.132924301797033
16137136.9095214517060.0904785482941293
17132131.7956449657440.20435503425594
18125124.9464077830270.0535922169731577
19123123.978412132794-0.978412132794162
20117118.392756452051-1.39275645205112
21114112.3934650969201.6065349030804
22111108.7847739019272.21522609807320
23112111.5702793676480.429720632352101
24144147.652982354818-3.65298235481836
25150152.164591695020-2.16459169502025
26149150.684660732368-1.68466073236763
27134139.857094564603-5.85709456460339
28123125.679901575758-2.67990157575771
29116118.749874893847-2.74987489384704
30117110.2021017083076.79789829169296
31111114.779133267667-3.77913326766672
32105107.203544782240-2.20354478224027
33102101.4192609751230.580739024877204
349597.5360567028293-2.53605670282933
359395.930342754738-2.93034275473806
36124122.6763779010571.32362209894310
37130130.451363345676-0.451363345676242
38124130.384226756879-6.38422675687943
39115116.488835101663-1.48883510166277
40106107.665375326701-1.66537532670129
41105102.1675706711252.83242932887478
42105100.2361323885764.76386761142398
43101101.654950790650-0.654950790650176
449597.2941041902427-2.29410419024268
459392.18437263177060.8156273682294
468488.3983956037706-4.39839560377061
478785.08408104966441.91591895033561
48116114.5287631164011.47123688359866
49120121.693115513950-1.69311551394961
50117119.604682370739-2.60468237073938
51109110.063161084503-1.06316108450297
52105101.9350718820573.06492811794340
53107101.1632231096545.83677689034555
54109101.9943079205807.00569207941987
55109104.3205962028254.67940379717521
56108103.8764504723564.12354952764403
57107104.3278853186692.67211468133128
5899100.469523285408-1.46952328540777
59103100.9233904171822.07660958281848
60131135.481192586871-4.48119258687078
61137137.92127557445-0.921275574449965

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 157 & 158.906178603059 & -1.90617860305909 \tabularnewline
14 & 157 & 157.431844504105 & -0.431844504104788 \tabularnewline
15 & 147 & 147.132924301797 & -0.132924301797033 \tabularnewline
16 & 137 & 136.909521451706 & 0.0904785482941293 \tabularnewline
17 & 132 & 131.795644965744 & 0.20435503425594 \tabularnewline
18 & 125 & 124.946407783027 & 0.0535922169731577 \tabularnewline
19 & 123 & 123.978412132794 & -0.978412132794162 \tabularnewline
20 & 117 & 118.392756452051 & -1.39275645205112 \tabularnewline
21 & 114 & 112.393465096920 & 1.6065349030804 \tabularnewline
22 & 111 & 108.784773901927 & 2.21522609807320 \tabularnewline
23 & 112 & 111.570279367648 & 0.429720632352101 \tabularnewline
24 & 144 & 147.652982354818 & -3.65298235481836 \tabularnewline
25 & 150 & 152.164591695020 & -2.16459169502025 \tabularnewline
26 & 149 & 150.684660732368 & -1.68466073236763 \tabularnewline
27 & 134 & 139.857094564603 & -5.85709456460339 \tabularnewline
28 & 123 & 125.679901575758 & -2.67990157575771 \tabularnewline
29 & 116 & 118.749874893847 & -2.74987489384704 \tabularnewline
30 & 117 & 110.202101708307 & 6.79789829169296 \tabularnewline
31 & 111 & 114.779133267667 & -3.77913326766672 \tabularnewline
32 & 105 & 107.203544782240 & -2.20354478224027 \tabularnewline
33 & 102 & 101.419260975123 & 0.580739024877204 \tabularnewline
34 & 95 & 97.5360567028293 & -2.53605670282933 \tabularnewline
35 & 93 & 95.930342754738 & -2.93034275473806 \tabularnewline
36 & 124 & 122.676377901057 & 1.32362209894310 \tabularnewline
37 & 130 & 130.451363345676 & -0.451363345676242 \tabularnewline
38 & 124 & 130.384226756879 & -6.38422675687943 \tabularnewline
39 & 115 & 116.488835101663 & -1.48883510166277 \tabularnewline
40 & 106 & 107.665375326701 & -1.66537532670129 \tabularnewline
41 & 105 & 102.167570671125 & 2.83242932887478 \tabularnewline
42 & 105 & 100.236132388576 & 4.76386761142398 \tabularnewline
43 & 101 & 101.654950790650 & -0.654950790650176 \tabularnewline
44 & 95 & 97.2941041902427 & -2.29410419024268 \tabularnewline
45 & 93 & 92.1843726317706 & 0.8156273682294 \tabularnewline
46 & 84 & 88.3983956037706 & -4.39839560377061 \tabularnewline
47 & 87 & 85.0840810496644 & 1.91591895033561 \tabularnewline
48 & 116 & 114.528763116401 & 1.47123688359866 \tabularnewline
49 & 120 & 121.693115513950 & -1.69311551394961 \tabularnewline
50 & 117 & 119.604682370739 & -2.60468237073938 \tabularnewline
51 & 109 & 110.063161084503 & -1.06316108450297 \tabularnewline
52 & 105 & 101.935071882057 & 3.06492811794340 \tabularnewline
53 & 107 & 101.163223109654 & 5.83677689034555 \tabularnewline
54 & 109 & 101.994307920580 & 7.00569207941987 \tabularnewline
55 & 109 & 104.320596202825 & 4.67940379717521 \tabularnewline
56 & 108 & 103.876450472356 & 4.12354952764403 \tabularnewline
57 & 107 & 104.327885318669 & 2.67211468133128 \tabularnewline
58 & 99 & 100.469523285408 & -1.46952328540777 \tabularnewline
59 & 103 & 100.923390417182 & 2.07660958281848 \tabularnewline
60 & 131 & 135.481192586871 & -4.48119258687078 \tabularnewline
61 & 137 & 137.92127557445 & -0.921275574449965 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=62830&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]157[/C][C]158.906178603059[/C][C]-1.90617860305909[/C][/ROW]
[ROW][C]14[/C][C]157[/C][C]157.431844504105[/C][C]-0.431844504104788[/C][/ROW]
[ROW][C]15[/C][C]147[/C][C]147.132924301797[/C][C]-0.132924301797033[/C][/ROW]
[ROW][C]16[/C][C]137[/C][C]136.909521451706[/C][C]0.0904785482941293[/C][/ROW]
[ROW][C]17[/C][C]132[/C][C]131.795644965744[/C][C]0.20435503425594[/C][/ROW]
[ROW][C]18[/C][C]125[/C][C]124.946407783027[/C][C]0.0535922169731577[/C][/ROW]
[ROW][C]19[/C][C]123[/C][C]123.978412132794[/C][C]-0.978412132794162[/C][/ROW]
[ROW][C]20[/C][C]117[/C][C]118.392756452051[/C][C]-1.39275645205112[/C][/ROW]
[ROW][C]21[/C][C]114[/C][C]112.393465096920[/C][C]1.6065349030804[/C][/ROW]
[ROW][C]22[/C][C]111[/C][C]108.784773901927[/C][C]2.21522609807320[/C][/ROW]
[ROW][C]23[/C][C]112[/C][C]111.570279367648[/C][C]0.429720632352101[/C][/ROW]
[ROW][C]24[/C][C]144[/C][C]147.652982354818[/C][C]-3.65298235481836[/C][/ROW]
[ROW][C]25[/C][C]150[/C][C]152.164591695020[/C][C]-2.16459169502025[/C][/ROW]
[ROW][C]26[/C][C]149[/C][C]150.684660732368[/C][C]-1.68466073236763[/C][/ROW]
[ROW][C]27[/C][C]134[/C][C]139.857094564603[/C][C]-5.85709456460339[/C][/ROW]
[ROW][C]28[/C][C]123[/C][C]125.679901575758[/C][C]-2.67990157575771[/C][/ROW]
[ROW][C]29[/C][C]116[/C][C]118.749874893847[/C][C]-2.74987489384704[/C][/ROW]
[ROW][C]30[/C][C]117[/C][C]110.202101708307[/C][C]6.79789829169296[/C][/ROW]
[ROW][C]31[/C][C]111[/C][C]114.779133267667[/C][C]-3.77913326766672[/C][/ROW]
[ROW][C]32[/C][C]105[/C][C]107.203544782240[/C][C]-2.20354478224027[/C][/ROW]
[ROW][C]33[/C][C]102[/C][C]101.419260975123[/C][C]0.580739024877204[/C][/ROW]
[ROW][C]34[/C][C]95[/C][C]97.5360567028293[/C][C]-2.53605670282933[/C][/ROW]
[ROW][C]35[/C][C]93[/C][C]95.930342754738[/C][C]-2.93034275473806[/C][/ROW]
[ROW][C]36[/C][C]124[/C][C]122.676377901057[/C][C]1.32362209894310[/C][/ROW]
[ROW][C]37[/C][C]130[/C][C]130.451363345676[/C][C]-0.451363345676242[/C][/ROW]
[ROW][C]38[/C][C]124[/C][C]130.384226756879[/C][C]-6.38422675687943[/C][/ROW]
[ROW][C]39[/C][C]115[/C][C]116.488835101663[/C][C]-1.48883510166277[/C][/ROW]
[ROW][C]40[/C][C]106[/C][C]107.665375326701[/C][C]-1.66537532670129[/C][/ROW]
[ROW][C]41[/C][C]105[/C][C]102.167570671125[/C][C]2.83242932887478[/C][/ROW]
[ROW][C]42[/C][C]105[/C][C]100.236132388576[/C][C]4.76386761142398[/C][/ROW]
[ROW][C]43[/C][C]101[/C][C]101.654950790650[/C][C]-0.654950790650176[/C][/ROW]
[ROW][C]44[/C][C]95[/C][C]97.2941041902427[/C][C]-2.29410419024268[/C][/ROW]
[ROW][C]45[/C][C]93[/C][C]92.1843726317706[/C][C]0.8156273682294[/C][/ROW]
[ROW][C]46[/C][C]84[/C][C]88.3983956037706[/C][C]-4.39839560377061[/C][/ROW]
[ROW][C]47[/C][C]87[/C][C]85.0840810496644[/C][C]1.91591895033561[/C][/ROW]
[ROW][C]48[/C][C]116[/C][C]114.528763116401[/C][C]1.47123688359866[/C][/ROW]
[ROW][C]49[/C][C]120[/C][C]121.693115513950[/C][C]-1.69311551394961[/C][/ROW]
[ROW][C]50[/C][C]117[/C][C]119.604682370739[/C][C]-2.60468237073938[/C][/ROW]
[ROW][C]51[/C][C]109[/C][C]110.063161084503[/C][C]-1.06316108450297[/C][/ROW]
[ROW][C]52[/C][C]105[/C][C]101.935071882057[/C][C]3.06492811794340[/C][/ROW]
[ROW][C]53[/C][C]107[/C][C]101.163223109654[/C][C]5.83677689034555[/C][/ROW]
[ROW][C]54[/C][C]109[/C][C]101.994307920580[/C][C]7.00569207941987[/C][/ROW]
[ROW][C]55[/C][C]109[/C][C]104.320596202825[/C][C]4.67940379717521[/C][/ROW]
[ROW][C]56[/C][C]108[/C][C]103.876450472356[/C][C]4.12354952764403[/C][/ROW]
[ROW][C]57[/C][C]107[/C][C]104.327885318669[/C][C]2.67211468133128[/C][/ROW]
[ROW][C]58[/C][C]99[/C][C]100.469523285408[/C][C]-1.46952328540777[/C][/ROW]
[ROW][C]59[/C][C]103[/C][C]100.923390417182[/C][C]2.07660958281848[/C][/ROW]
[ROW][C]60[/C][C]131[/C][C]135.481192586871[/C][C]-4.48119258687078[/C][/ROW]
[ROW][C]61[/C][C]137[/C][C]137.92127557445[/C][C]-0.921275574449965[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=62830&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62830&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
13157158.906178603059-1.90617860305909
14157157.431844504105-0.431844504104788
15147147.132924301797-0.132924301797033
16137136.9095214517060.0904785482941293
17132131.7956449657440.20435503425594
18125124.9464077830270.0535922169731577
19123123.978412132794-0.978412132794162
20117118.392756452051-1.39275645205112
21114112.3934650969201.6065349030804
22111108.7847739019272.21522609807320
23112111.5702793676480.429720632352101
24144147.652982354818-3.65298235481836
25150152.164591695020-2.16459169502025
26149150.684660732368-1.68466073236763
27134139.857094564603-5.85709456460339
28123125.679901575758-2.67990157575771
29116118.749874893847-2.74987489384704
30117110.2021017083076.79789829169296
31111114.779133267667-3.77913326766672
32105107.203544782240-2.20354478224027
33102101.4192609751230.580739024877204
349597.5360567028293-2.53605670282933
359395.930342754738-2.93034275473806
36124122.6763779010571.32362209894310
37130130.451363345676-0.451363345676242
38124130.384226756879-6.38422675687943
39115116.488835101663-1.48883510166277
40106107.665375326701-1.66537532670129
41105102.1675706711252.83242932887478
42105100.2361323885764.76386761142398
43101101.654950790650-0.654950790650176
449597.2941041902427-2.29410419024268
459392.18437263177060.8156273682294
468488.3983956037706-4.39839560377061
478785.08408104966441.91591895033561
48116114.5287631164011.47123688359866
49120121.693115513950-1.69311551394961
50117119.604682370739-2.60468237073938
51109110.063161084503-1.06316108450297
52105101.9350718820573.06492811794340
53107101.1632231096545.83677689034555
54109101.9943079205807.00569207941987
55109104.3205962028254.67940379717521
56108103.8764504723564.12354952764403
57107104.3278853186692.67211468133128
5899100.469523285408-1.46952328540777
59103100.9233904171822.07660958281848
60131135.481192586871-4.48119258687078
61137137.92127557445-0.921275574449965







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
62136.250293428768130.250961460929142.249625396608
63128.018483184182120.378422752515135.658543615849
64120.341758085133111.495253126718129.188263043548
65117.023275329465107.017206971342127.029343687588
66112.752794770666101.828422999044123.677166542287
67108.68040776838796.960780387749120.400035149024
68104.21874500415291.8512903084259116.586199699877
69101.07759639672388.0246107745957114.13058201885
7094.667340049095381.3753571888381107.959322909352
7196.814099238095482.3106694200394111.317529056151
72126.621291845258107.152381317610146.090202372906
73133.154775984433100.420396587777165.889155381090

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
62 & 136.250293428768 & 130.250961460929 & 142.249625396608 \tabularnewline
63 & 128.018483184182 & 120.378422752515 & 135.658543615849 \tabularnewline
64 & 120.341758085133 & 111.495253126718 & 129.188263043548 \tabularnewline
65 & 117.023275329465 & 107.017206971342 & 127.029343687588 \tabularnewline
66 & 112.752794770666 & 101.828422999044 & 123.677166542287 \tabularnewline
67 & 108.680407768387 & 96.960780387749 & 120.400035149024 \tabularnewline
68 & 104.218745004152 & 91.8512903084259 & 116.586199699877 \tabularnewline
69 & 101.077596396723 & 88.0246107745957 & 114.13058201885 \tabularnewline
70 & 94.6673400490953 & 81.3753571888381 & 107.959322909352 \tabularnewline
71 & 96.8140992380954 & 82.3106694200394 & 111.317529056151 \tabularnewline
72 & 126.621291845258 & 107.152381317610 & 146.090202372906 \tabularnewline
73 & 133.154775984433 & 100.420396587777 & 165.889155381090 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=62830&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]62[/C][C]136.250293428768[/C][C]130.250961460929[/C][C]142.249625396608[/C][/ROW]
[ROW][C]63[/C][C]128.018483184182[/C][C]120.378422752515[/C][C]135.658543615849[/C][/ROW]
[ROW][C]64[/C][C]120.341758085133[/C][C]111.495253126718[/C][C]129.188263043548[/C][/ROW]
[ROW][C]65[/C][C]117.023275329465[/C][C]107.017206971342[/C][C]127.029343687588[/C][/ROW]
[ROW][C]66[/C][C]112.752794770666[/C][C]101.828422999044[/C][C]123.677166542287[/C][/ROW]
[ROW][C]67[/C][C]108.680407768387[/C][C]96.960780387749[/C][C]120.400035149024[/C][/ROW]
[ROW][C]68[/C][C]104.218745004152[/C][C]91.8512903084259[/C][C]116.586199699877[/C][/ROW]
[ROW][C]69[/C][C]101.077596396723[/C][C]88.0246107745957[/C][C]114.13058201885[/C][/ROW]
[ROW][C]70[/C][C]94.6673400490953[/C][C]81.3753571888381[/C][C]107.959322909352[/C][/ROW]
[ROW][C]71[/C][C]96.8140992380954[/C][C]82.3106694200394[/C][C]111.317529056151[/C][/ROW]
[ROW][C]72[/C][C]126.621291845258[/C][C]107.152381317610[/C][C]146.090202372906[/C][/ROW]
[ROW][C]73[/C][C]133.154775984433[/C][C]100.420396587777[/C][C]165.889155381090[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=62830&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62830&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
62136.250293428768130.250961460929142.249625396608
63128.018483184182120.378422752515135.658543615849
64120.341758085133111.495253126718129.188263043548
65117.023275329465107.017206971342127.029343687588
66112.752794770666101.828422999044123.677166542287
67108.68040776838796.960780387749120.400035149024
68104.21874500415291.8512903084259116.586199699877
69101.07759639672388.0246107745957114.13058201885
7094.667340049095381.3753571888381107.959322909352
7196.814099238095482.3106694200394111.317529056151
72126.621291845258107.152381317610146.090202372906
73133.154775984433100.420396587777165.889155381090



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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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')