Home » date » 2010 » Dec » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 16 Dec 2010 17:57:57 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9.htm/, Retrieved Thu, 16 Dec 2010 18:57:56 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
98.6 100.1 98.8 98.3 102.8 103.6 105.2 100.1 98.2 98.4 97.4 98.4 100.3 101.1 104.1 107.3 110.1 112.6 114.3 115.3 109.9 108.2 103.2 101.8 105.6 108.2 109.8 114.6 117.2 116.5 116.1 112.1 106.8 106.9 104.5 103 105.9 107.7 107.1 112.5 114.5 114.6 113.1 112.8 111.9 112 112.4 110 112.3 109.6 111.9 110.8 110.4 110.8 114 108.4 110.5 105.1 102.3 104.3 103.4 102.4 104.5 107.3 110.1 111.8 111.8 105.7 106 106.4 107.1 111.5 109.6 109.9 109.3 111.4 112.9 115.5 118.4 116.2 113.3 113.8 114.1 117.1 115.5 115.2 114.2 115.3 118.8 118 118.1 111.8 112 114.3 115 118.5 117.6 119.1 120.6 123.6 122.7 123.8 123.1 124.5 120.7 118.7 119 122.3 118.6 118.1 118.2 120.8 119.7 119.7 117.1 114.5 116.5 116.4 114.9 115.5
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999933893038648
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2100.198.61.5
398.8100.099900839558-1.29990083955796
498.398.8000859324946-0.500085932494557
5102.898.30003305916144.49996694083859
6103.6102.7997025208590.800297479140639
7105.2103.5999470947651.60005290523453
8100.1105.199894225364-5.09989422536444
998.2100.100337138510-1.90033713851045
1098.498.20012562551380.199874374486228
1197.498.3999867869125-0.999986786912444
1298.497.40006610608790.999933893912129
13100.398.39993389740871.90006610259127
14101.1100.2998743924040.800125607596414
15104.1101.0999471061273.00005289387262
16107.3104.0998016756193.20019832438071
17110.1107.2997884446132.80021155538695
18112.6110.0998148865232.50018511347707
19114.3112.5998347203591.70016527964067
20115.3114.2998876072401.00011239276043
21109.9115.299933885609-5.39993388560869
22108.2109.900356973221-1.70035697322068
23103.2108.200112405433-5.00011240543272
24101.8103.200330542238-1.40033054223754
25105.6101.8000925715973.79990742840296
26108.2105.5997487996662.60025120033352
27109.8108.1998281052941.60017189470560
28114.6109.7998942174984.8001057825016
29117.2114.5996826795932.60031732040746
30116.5117.199828100923-0.699828100923398
31116.1116.500046263509-0.400046263509225
32112.1116.100026445843-4.00002644584288
33106.8112.100264429594-5.30026442959365
34106.9106.8003503843760.0996496156242017
35104.5106.899993412467-2.39999341246671
36103104.500158656272-1.50015865627176
37105.9103.0000991709302.89990082906969
38107.7105.8998082963681.80019170363202
39107.1107.699880994797-0.599880994796635
40112.5107.1000396563105.39996034369027
41114.5112.4996430250302.00035697496975
42114.6114.4998677624790.100132237521223
43113.1114.599993380562-1.49999338056205
44112.8113.100099160004-0.300099160004436
45111.9112.800019838644-0.900019838643559
46112111.9000594975770.0999405024233084
47112.4111.9999933932370.400006606762943
48110112.399973556779-2.39997355677872
49112.3110.0001586549592.29984134504083
50109.6112.299847964477-2.69984796447709
51111.9109.6001784787452.29982152125497
52110.8111.899847965788-1.09984796578759
53110.4110.800072707607-0.400072707606952
54110.8110.4000264475910.399973552408966
55114110.7999735589643.20002644103617
56108.4113.999788455976-5.59978845597573
57110.5108.4003701849992.09962981500095
58105.1110.499861199853-5.39986119985298
59102.3105.100356968416-2.80035696841564
60104.3102.3001851230901.99981487691012
61103.4104.299867798315-0.899867798315213
62102.4103.400059487526-1.00005948752576
63104.5102.4000661108942.09993388910610
64107.3104.4998611797522.80013882024845
65110.1107.2998148913312.80018510866877
66111.8110.0998148882711.70018511172876
67111.8111.7998876059290.000112394071479116
68105.7111.79999999257-6.09999999256996
69106105.7004032524640.299596747536242
70106.4105.9999801945690.400019805430617
71107.1106.3999735559060.700026444093808
72111.5107.0999537233794.4000462766211
73109.6111.499709126311-1.89970912631085
74109.9109.6001255839980.299874416002226
75109.3109.899980176214-0.599980176213577
76111.4109.3000396628662.09996033713369
77112.9111.3998611780031.50013882199684
78115.5112.8999008303812.60009916961913
79118.4115.4998281153452.90017188465532
80116.2118.399808278449-2.19980827844931
81113.3116.200145422641-2.90014542264085
82113.8113.3001917198010.499808280198636
83114.1113.7999669591930.300033040806653
84117.1114.0999801657273.00001983427263
85115.5117.099801677805-1.59980167780475
86115.2115.500105758028-0.300105758027684
87114.2115.200019839080-1.00001983907974
88115.3114.2000661082731.09993389172715
89118.8115.2999272867133.50007271328727
90118118.799768620828-0.799768620828416
91118.1118.0000528702730.0999471297266865
92111.8118.099993392799-6.29999339279895
93112111.8004164734200.199583526580270
94114.3111.9999868061402.30001319386048
95115114.2998479531170.700152046883318
96118.5114.9999537150763.50004628492431
97117.6118.499768622576-0.899768622575522
98119.1117.6000594809701.49994051903045
99120.6119.099900843491.50009915650992
100123.6120.5999008330033.00009916699696
101122.7123.599801672560-0.8998016725603
102123.8122.7000594831541.09994051684561
103123.1123.799927286275-0.699927286274772
104124.5123.1000462700661.39995372993394
105120.7124.499907453313-3.79990745331288
106118.7120.700251200335-2.00025120033516
107119118.7001322305290.299867769471206
108122.3118.9999801766533.30001982334704
109118.6122.299781845717-3.69978184571708
110118.1118.600244581335-0.50024458133548
111118.2118.1000330696490.0999669303508028
112120.8118.199993391492.60000660851
113119.7120.799828121464-1.09982812146362
114119.7119.700072706295-7.27062951142443e-05
115117.1119.700000004806-2.60000000480640
116114.5117.100171878100-2.60017187809983
117116.5114.5001718894621.99982811053815
118116.4116.499867797440-0.0998677974403819
119114.9116.400006601957-1.50000660195663
120115.5114.9000991608780.599900839121531


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121115.499960342378110.656048602652120.343872082105
122115.499960342378108.649861088484122.350059596272
123115.499960342378107.110428851637123.889491833120
124115.499960342378105.812617183386125.187303501371
125115.499960342378104.669217231861126.330703452896
126115.499960342378103.635501856128127.364418828629
127115.499960342378102.684900685166128.315019999591
128115.499960342378101.800101479461129.199819205295
129115.499960342378100.969079030160130.030841654597
130115.499960342378100.183077808529130.816842876227
131115.49996034237899.4354880696372131.564432615120
132115.49996034237898.7211746816814132.278746003075
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/15ibf1292522270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/15ibf1292522270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/25ibf1292522270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/25ibf1292522270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/3y9si1292522270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292522276xq272htw26ihuw9/3y9si1292522270.ps (open in new window)


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





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by