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 computationMon, 19 Dec 2011 15:53:47 -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/Dec/19/t1324328089ym63mipra5xicon.htm/, Retrieved Thu, 09 May 2024 02:13:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=157687, Retrieved Thu, 09 May 2024 02:13:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Decomposition by Loess] [HPC Retail Sales] [2008-03-06 11:35:25] [74be16979710d4c4e7c6647856088456]
-  M D  [Decomposition by Loess] [WS8_births_Loess] [2011-11-28 11:59:50] [2adcc8dcd741502b8a9375c7fd3d7ce3]
- RMPD      [Exponential Smoothing] [Paper - Exponenti...] [2011-12-19 20:53:47] [850c8b4f3ff1a893cc2b9e9f060c8f7e] [Current]
Feedback Forum

Post a new message
Dataseries X:
283495
279998
287224
296369
300653
302686
277891
277537
285383
292213
298522
300431
297584
286445
288576
293299
295881
292710
271993
267430
273963
273046
268347
264319
255765
246263
245098
246969
248333
247934
226839
225554
237085
237080
245039
248541
247105
243422
250643
254663
260993
258556
235372
246057
253353
255198
264176
269034
265861
269826
278506
292300
290726
289802
271311
274352
275216
276836
280408
280190




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=157687&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=157687&T=0

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

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

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







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13297584299419.214476496-1835.21447649575
14286445286971.513496831-526.513496830943
15288576288428.814951173147.185048827319
16293299293179.334382068119.665617931925
17295881296591.728344604-710.728344603733
18292710294412.263408202-1702.26340820163
19271993268787.1331006933205.86689930718
20267430267867.585180909-437.58518090914
21273963274026.821221471-63.8212214707164
22273046279706.098711107-6660.09871110675
23268347280511.508948357-12164.5089483567
24264319271538.405420226-7219.40542022558
25255765256880.899323176-1115.8993231761
26246263238017.0956740138245.90432598739
27245098238492.7064597536605.29354024725
28246969242662.3401116844306.6598883156
29248333245227.9088550963105.09114490356
30247934243003.9238087554930.07619124543
31226839223766.1304666843072.86953331574
32225554221396.426193644157.57380636013
33237085231688.0495348115396.95046518897
34237080239328.047521068-2248.04752106784
35245039243502.4281067521536.5718932478
36248541251636.377912637-3095.37791263679
37247105251868.964029197-4763.96402919746
38243422245512.072276438-2090.07227643824
39250643246456.7174164774186.28258352305
40254663253374.6366622971288.36333770267
41260993258240.6847058242752.31529417555
42258556261094.760554462-2538.76055446232
43235372239751.034184914-4379.03418491432
44246057234934.05602199411122.943978006
45253353250847.3515551772505.64844482273
46255198254019.0925152431178.90748475696
47264176263951.108202678224.891797322431
48269034270610.405716413-1576.40571641258
49265861272694.586968024-6833.58696802374
50269826268627.9631828831198.03681711684
51278506277109.3397203631396.66027963668
52292300282922.2908599449377.70914005581
53290726296013.928101541-5287.92810154054
54289802294182.441311123-4380.44131112332
55271311272251.21151519-940.211515189847
56274352280067.329746254-5715.32974625379
57275216281468.297193694-6252.2971936937
58276836275336.3227197061499.67728029354
59280408280084.823840989323.176159011142
60280190281003.011638248-813.011638247874

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 297584 & 299419.214476496 & -1835.21447649575 \tabularnewline
14 & 286445 & 286971.513496831 & -526.513496830943 \tabularnewline
15 & 288576 & 288428.814951173 & 147.185048827319 \tabularnewline
16 & 293299 & 293179.334382068 & 119.665617931925 \tabularnewline
17 & 295881 & 296591.728344604 & -710.728344603733 \tabularnewline
18 & 292710 & 294412.263408202 & -1702.26340820163 \tabularnewline
19 & 271993 & 268787.133100693 & 3205.86689930718 \tabularnewline
20 & 267430 & 267867.585180909 & -437.58518090914 \tabularnewline
21 & 273963 & 274026.821221471 & -63.8212214707164 \tabularnewline
22 & 273046 & 279706.098711107 & -6660.09871110675 \tabularnewline
23 & 268347 & 280511.508948357 & -12164.5089483567 \tabularnewline
24 & 264319 & 271538.405420226 & -7219.40542022558 \tabularnewline
25 & 255765 & 256880.899323176 & -1115.8993231761 \tabularnewline
26 & 246263 & 238017.095674013 & 8245.90432598739 \tabularnewline
27 & 245098 & 238492.706459753 & 6605.29354024725 \tabularnewline
28 & 246969 & 242662.340111684 & 4306.6598883156 \tabularnewline
29 & 248333 & 245227.908855096 & 3105.09114490356 \tabularnewline
30 & 247934 & 243003.923808755 & 4930.07619124543 \tabularnewline
31 & 226839 & 223766.130466684 & 3072.86953331574 \tabularnewline
32 & 225554 & 221396.42619364 & 4157.57380636013 \tabularnewline
33 & 237085 & 231688.049534811 & 5396.95046518897 \tabularnewline
34 & 237080 & 239328.047521068 & -2248.04752106784 \tabularnewline
35 & 245039 & 243502.428106752 & 1536.5718932478 \tabularnewline
36 & 248541 & 251636.377912637 & -3095.37791263679 \tabularnewline
37 & 247105 & 251868.964029197 & -4763.96402919746 \tabularnewline
38 & 243422 & 245512.072276438 & -2090.07227643824 \tabularnewline
39 & 250643 & 246456.717416477 & 4186.28258352305 \tabularnewline
40 & 254663 & 253374.636662297 & 1288.36333770267 \tabularnewline
41 & 260993 & 258240.684705824 & 2752.31529417555 \tabularnewline
42 & 258556 & 261094.760554462 & -2538.76055446232 \tabularnewline
43 & 235372 & 239751.034184914 & -4379.03418491432 \tabularnewline
44 & 246057 & 234934.056021994 & 11122.943978006 \tabularnewline
45 & 253353 & 250847.351555177 & 2505.64844482273 \tabularnewline
46 & 255198 & 254019.092515243 & 1178.90748475696 \tabularnewline
47 & 264176 & 263951.108202678 & 224.891797322431 \tabularnewline
48 & 269034 & 270610.405716413 & -1576.40571641258 \tabularnewline
49 & 265861 & 272694.586968024 & -6833.58696802374 \tabularnewline
50 & 269826 & 268627.963182883 & 1198.03681711684 \tabularnewline
51 & 278506 & 277109.339720363 & 1396.66027963668 \tabularnewline
52 & 292300 & 282922.290859944 & 9377.70914005581 \tabularnewline
53 & 290726 & 296013.928101541 & -5287.92810154054 \tabularnewline
54 & 289802 & 294182.441311123 & -4380.44131112332 \tabularnewline
55 & 271311 & 272251.21151519 & -940.211515189847 \tabularnewline
56 & 274352 & 280067.329746254 & -5715.32974625379 \tabularnewline
57 & 275216 & 281468.297193694 & -6252.2971936937 \tabularnewline
58 & 276836 & 275336.322719706 & 1499.67728029354 \tabularnewline
59 & 280408 & 280084.823840989 & 323.176159011142 \tabularnewline
60 & 280190 & 281003.011638248 & -813.011638247874 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=157687&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]297584[/C][C]299419.214476496[/C][C]-1835.21447649575[/C][/ROW]
[ROW][C]14[/C][C]286445[/C][C]286971.513496831[/C][C]-526.513496830943[/C][/ROW]
[ROW][C]15[/C][C]288576[/C][C]288428.814951173[/C][C]147.185048827319[/C][/ROW]
[ROW][C]16[/C][C]293299[/C][C]293179.334382068[/C][C]119.665617931925[/C][/ROW]
[ROW][C]17[/C][C]295881[/C][C]296591.728344604[/C][C]-710.728344603733[/C][/ROW]
[ROW][C]18[/C][C]292710[/C][C]294412.263408202[/C][C]-1702.26340820163[/C][/ROW]
[ROW][C]19[/C][C]271993[/C][C]268787.133100693[/C][C]3205.86689930718[/C][/ROW]
[ROW][C]20[/C][C]267430[/C][C]267867.585180909[/C][C]-437.58518090914[/C][/ROW]
[ROW][C]21[/C][C]273963[/C][C]274026.821221471[/C][C]-63.8212214707164[/C][/ROW]
[ROW][C]22[/C][C]273046[/C][C]279706.098711107[/C][C]-6660.09871110675[/C][/ROW]
[ROW][C]23[/C][C]268347[/C][C]280511.508948357[/C][C]-12164.5089483567[/C][/ROW]
[ROW][C]24[/C][C]264319[/C][C]271538.405420226[/C][C]-7219.40542022558[/C][/ROW]
[ROW][C]25[/C][C]255765[/C][C]256880.899323176[/C][C]-1115.8993231761[/C][/ROW]
[ROW][C]26[/C][C]246263[/C][C]238017.095674013[/C][C]8245.90432598739[/C][/ROW]
[ROW][C]27[/C][C]245098[/C][C]238492.706459753[/C][C]6605.29354024725[/C][/ROW]
[ROW][C]28[/C][C]246969[/C][C]242662.340111684[/C][C]4306.6598883156[/C][/ROW]
[ROW][C]29[/C][C]248333[/C][C]245227.908855096[/C][C]3105.09114490356[/C][/ROW]
[ROW][C]30[/C][C]247934[/C][C]243003.923808755[/C][C]4930.07619124543[/C][/ROW]
[ROW][C]31[/C][C]226839[/C][C]223766.130466684[/C][C]3072.86953331574[/C][/ROW]
[ROW][C]32[/C][C]225554[/C][C]221396.42619364[/C][C]4157.57380636013[/C][/ROW]
[ROW][C]33[/C][C]237085[/C][C]231688.049534811[/C][C]5396.95046518897[/C][/ROW]
[ROW][C]34[/C][C]237080[/C][C]239328.047521068[/C][C]-2248.04752106784[/C][/ROW]
[ROW][C]35[/C][C]245039[/C][C]243502.428106752[/C][C]1536.5718932478[/C][/ROW]
[ROW][C]36[/C][C]248541[/C][C]251636.377912637[/C][C]-3095.37791263679[/C][/ROW]
[ROW][C]37[/C][C]247105[/C][C]251868.964029197[/C][C]-4763.96402919746[/C][/ROW]
[ROW][C]38[/C][C]243422[/C][C]245512.072276438[/C][C]-2090.07227643824[/C][/ROW]
[ROW][C]39[/C][C]250643[/C][C]246456.717416477[/C][C]4186.28258352305[/C][/ROW]
[ROW][C]40[/C][C]254663[/C][C]253374.636662297[/C][C]1288.36333770267[/C][/ROW]
[ROW][C]41[/C][C]260993[/C][C]258240.684705824[/C][C]2752.31529417555[/C][/ROW]
[ROW][C]42[/C][C]258556[/C][C]261094.760554462[/C][C]-2538.76055446232[/C][/ROW]
[ROW][C]43[/C][C]235372[/C][C]239751.034184914[/C][C]-4379.03418491432[/C][/ROW]
[ROW][C]44[/C][C]246057[/C][C]234934.056021994[/C][C]11122.943978006[/C][/ROW]
[ROW][C]45[/C][C]253353[/C][C]250847.351555177[/C][C]2505.64844482273[/C][/ROW]
[ROW][C]46[/C][C]255198[/C][C]254019.092515243[/C][C]1178.90748475696[/C][/ROW]
[ROW][C]47[/C][C]264176[/C][C]263951.108202678[/C][C]224.891797322431[/C][/ROW]
[ROW][C]48[/C][C]269034[/C][C]270610.405716413[/C][C]-1576.40571641258[/C][/ROW]
[ROW][C]49[/C][C]265861[/C][C]272694.586968024[/C][C]-6833.58696802374[/C][/ROW]
[ROW][C]50[/C][C]269826[/C][C]268627.963182883[/C][C]1198.03681711684[/C][/ROW]
[ROW][C]51[/C][C]278506[/C][C]277109.339720363[/C][C]1396.66027963668[/C][/ROW]
[ROW][C]52[/C][C]292300[/C][C]282922.290859944[/C][C]9377.70914005581[/C][/ROW]
[ROW][C]53[/C][C]290726[/C][C]296013.928101541[/C][C]-5287.92810154054[/C][/ROW]
[ROW][C]54[/C][C]289802[/C][C]294182.441311123[/C][C]-4380.44131112332[/C][/ROW]
[ROW][C]55[/C][C]271311[/C][C]272251.21151519[/C][C]-940.211515189847[/C][/ROW]
[ROW][C]56[/C][C]274352[/C][C]280067.329746254[/C][C]-5715.32974625379[/C][/ROW]
[ROW][C]57[/C][C]275216[/C][C]281468.297193694[/C][C]-6252.2971936937[/C][/ROW]
[ROW][C]58[/C][C]276836[/C][C]275336.322719706[/C][C]1499.67728029354[/C][/ROW]
[ROW][C]59[/C][C]280408[/C][C]280084.823840989[/C][C]323.176159011142[/C][/ROW]
[ROW][C]60[/C][C]280190[/C][C]281003.011638248[/C][C]-813.011638247874[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=157687&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=157687&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
13297584299419.214476496-1835.21447649575
14286445286971.513496831-526.513496830943
15288576288428.814951173147.185048827319
16293299293179.334382068119.665617931925
17295881296591.728344604-710.728344603733
18292710294412.263408202-1702.26340820163
19271993268787.1331006933205.86689930718
20267430267867.585180909-437.58518090914
21273963274026.821221471-63.8212214707164
22273046279706.098711107-6660.09871110675
23268347280511.508948357-12164.5089483567
24264319271538.405420226-7219.40542022558
25255765256880.899323176-1115.8993231761
26246263238017.0956740138245.90432598739
27245098238492.7064597536605.29354024725
28246969242662.3401116844306.6598883156
29248333245227.9088550963105.09114490356
30247934243003.9238087554930.07619124543
31226839223766.1304666843072.86953331574
32225554221396.426193644157.57380636013
33237085231688.0495348115396.95046518897
34237080239328.047521068-2248.04752106784
35245039243502.4281067521536.5718932478
36248541251636.377912637-3095.37791263679
37247105251868.964029197-4763.96402919746
38243422245512.072276438-2090.07227643824
39250643246456.7174164774186.28258352305
40254663253374.6366622971288.36333770267
41260993258240.6847058242752.31529417555
42258556261094.760554462-2538.76055446232
43235372239751.034184914-4379.03418491432
44246057234934.05602199411122.943978006
45253353250847.3515551772505.64844482273
46255198254019.0925152431178.90748475696
47264176263951.108202678224.891797322431
48269034270610.405716413-1576.40571641258
49265861272694.586968024-6833.58696802374
50269826268627.9631828831198.03681711684
51278506277109.3397203631396.66027963668
52292300282922.2908599449377.70914005581
53290726296013.928101541-5287.92810154054
54289802294182.441311123-4380.44131112332
55271311272251.21151519-940.211515189847
56274352280067.329746254-5715.32974625379
57275216281468.297193694-6252.2971936937
58276836275336.3227197061499.67728029354
59280408280084.823840989323.176159011142
60280190281003.011638248-813.011638247874







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61275832.630918761266908.556403694284756.705433827
62276649.803252323265777.450413658287522.156090989
63281768.290895163267862.250907682295674.330882644
64288261.451980329270449.975285024306072.928675634
65282965.775932378260562.199465386305369.35239937
66279396.156373949251837.265287218306955.04746068
67258020.976923082224823.607437184291218.346408979
68260443.88754175221178.9063558299708.868727701
69262490.749370948216767.531869969308213.966871927
70263758.779981771211215.589418468316301.970545074
71267059.942201797207357.668913552326762.215490041
72266959.56162212199777.449250286334141.673993954

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 275832.630918761 & 266908.556403694 & 284756.705433827 \tabularnewline
62 & 276649.803252323 & 265777.450413658 & 287522.156090989 \tabularnewline
63 & 281768.290895163 & 267862.250907682 & 295674.330882644 \tabularnewline
64 & 288261.451980329 & 270449.975285024 & 306072.928675634 \tabularnewline
65 & 282965.775932378 & 260562.199465386 & 305369.35239937 \tabularnewline
66 & 279396.156373949 & 251837.265287218 & 306955.04746068 \tabularnewline
67 & 258020.976923082 & 224823.607437184 & 291218.346408979 \tabularnewline
68 & 260443.88754175 & 221178.9063558 & 299708.868727701 \tabularnewline
69 & 262490.749370948 & 216767.531869969 & 308213.966871927 \tabularnewline
70 & 263758.779981771 & 211215.589418468 & 316301.970545074 \tabularnewline
71 & 267059.942201797 & 207357.668913552 & 326762.215490041 \tabularnewline
72 & 266959.56162212 & 199777.449250286 & 334141.673993954 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=157687&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]275832.630918761[/C][C]266908.556403694[/C][C]284756.705433827[/C][/ROW]
[ROW][C]62[/C][C]276649.803252323[/C][C]265777.450413658[/C][C]287522.156090989[/C][/ROW]
[ROW][C]63[/C][C]281768.290895163[/C][C]267862.250907682[/C][C]295674.330882644[/C][/ROW]
[ROW][C]64[/C][C]288261.451980329[/C][C]270449.975285024[/C][C]306072.928675634[/C][/ROW]
[ROW][C]65[/C][C]282965.775932378[/C][C]260562.199465386[/C][C]305369.35239937[/C][/ROW]
[ROW][C]66[/C][C]279396.156373949[/C][C]251837.265287218[/C][C]306955.04746068[/C][/ROW]
[ROW][C]67[/C][C]258020.976923082[/C][C]224823.607437184[/C][C]291218.346408979[/C][/ROW]
[ROW][C]68[/C][C]260443.88754175[/C][C]221178.9063558[/C][C]299708.868727701[/C][/ROW]
[ROW][C]69[/C][C]262490.749370948[/C][C]216767.531869969[/C][C]308213.966871927[/C][/ROW]
[ROW][C]70[/C][C]263758.779981771[/C][C]211215.589418468[/C][C]316301.970545074[/C][/ROW]
[ROW][C]71[/C][C]267059.942201797[/C][C]207357.668913552[/C][C]326762.215490041[/C][/ROW]
[ROW][C]72[/C][C]266959.56162212[/C][C]199777.449250286[/C][C]334141.673993954[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=157687&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=157687&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
61275832.630918761266908.556403694284756.705433827
62276649.803252323265777.450413658287522.156090989
63281768.290895163267862.250907682295674.330882644
64288261.451980329270449.975285024306072.928675634
65282965.775932378260562.199465386305369.35239937
66279396.156373949251837.265287218306955.04746068
67258020.976923082224823.607437184291218.346408979
68260443.88754175221178.9063558299708.868727701
69262490.749370948216767.531869969308213.966871927
70263758.779981771211215.589418468316301.970545074
71267059.942201797207357.668913552326762.215490041
72266959.56162212199777.449250286334141.673993954



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