Home » date » 2009 » Aug » 16 »

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Aug 2009 11:07:26 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63.htm/, Retrieved Sun, 16 Aug 2009 19:08:40 +0200
 
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/2009/Aug/16/t1250442516lqrx1ah9q834g63.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
72,84 73,96 73,26 73,86 73,04 212,8 157,92 111,55 99,01 89,5 100,95 116,06 131,5 137,43 138,53 137,26 136,81 182,98 149,45 109,34 93,37 84,09 83,83 82,94 82,88 81,41 79,87 79,66 76,07 182,69 165,78 142,5 120,6 105,73 98,72 98,41 96,08 97,3 97,5 97,02 98,75 232,81 240,83 193,4 148,28 138,34 135,34 134,02 133,86 131,67 132,43 130,21 129,98 206,16 195,17 159,16 136,33 125,18 121,21 119,38 119,26 119,75 118,78 116,97 121,69 223,51 228,58 205,22 189,4 180,14 177,59 176,39 171,16 173,11 171,74 175,97 179,64 254,62 240,5 212,01 176,36 153,24 146,69 141,52 142,6 143,19 142,32 142,03 144,92 177,31 194,4 189,19 180,44 175,84 178,54 176,55
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.929989159847248
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13131.5113.30571417427418.1942858257257
14137.43137.974551701713-0.544551701712805
15138.53140.340439005924-1.81043900592434
16137.26139.292529560728-2.03252956072808
17136.81139.387640893203-2.57764089320281
18182.98188.245230333321-5.26523033332143
19149.45184.803288962658-35.3532889626577
20109.34103.7367951698325.60320483016845
2193.3793.3794968619423-0.00949686194233834
2284.0981.6650202262472.42497977375298
2383.8391.7655111862668-7.93551118626677
2482.9497.1210791226548-14.1810791226548
2582.8898.5752185079875-15.6952185079875
2681.4188.5952534687052-7.18525346870516
2779.8784.1426336785468-4.27263367854684
2879.6681.119372501963-1.45937250196295
2976.0781.4832106853364-5.41321068533644
30182.69105.82589927087876.8641007291216
31165.78176.216490802454-10.4364908024540
32142.5115.84701818881826.6529818111824
33120.6119.7911160156510.808883984348782
34105.73105.3690526973950.360947302604799
3598.72114.332266471431-15.6122664714306
3698.41114.050955619058-15.6409556190585
3796.08116.449692253561-20.3696922535607
3897.3103.344233617483-6.04423361748266
3997.5100.34415490479-2.84415490479013
4097.0298.7867686268537-1.76676862685372
4198.7598.56615833065350.183841669346549
42232.81140.9393756845691.8706243154399
43240.83216.94915899963723.8808410003633
44193.4168.75901103280424.6409889671965
45148.28160.826969898315-12.5469698983152
46138.34130.1271552293148.21284477068582
47135.34147.037480061412-11.6974800614124
48134.02155.141438975657-21.1214389756574
49133.86157.497848228690-23.6378482286904
50131.67144.560722945706-12.8907229457061
51132.43135.931789495187-3.5017894951867
52130.21133.748952916699-3.53895291669934
53129.98132.069884988681-2.08988498868149
54206.16190.35148506028815.8085149397118
55195.17192.6447343986722.52526560132816
56159.16138.12171336566521.0382866343348
57136.33130.5578670886285.77213291137218
58125.18119.8627315731445.31726842685615
59121.21131.954380405339-10.7443804053388
60119.38138.391881533937-19.0118815339374
61119.26140.253698745492-20.9936987454921
62119.75129.628314538365-9.87831453836537
63118.78124.229876447978-5.44987644797848
64116.97120.260059049991-3.29005904999086
65121.69118.8809450988562.80905490114449
66223.51179.01684031082144.4931596891794
67228.58206.00253717327922.5774628267214
68205.22161.92946123111043.2905387688905
69189.4166.05210933817623.3478906618239
70180.14165.21701875168614.9229812483140
71177.59187.194932773089-9.6049327730889
72176.39200.763514177480-24.3735141774796
73171.16206.059970511165-34.8999705111648
74173.11186.989177727086-13.8791777270861
75171.74179.381107528609-7.64110752860947
76175.97173.4495119240022.52048807599792
77179.64178.2478335174531.39216648254717
78254.62266.870582063894-12.2505820638935
79240.5236.8331719607903.66682803921034
80212.01172.67371215675639.3362878432438
81176.36170.7701658241295.58983417587052
82153.24154.464255749855-1.22425574985505
83146.69158.876839049809-12.1868390498092
84141.52165.384332148669-23.864332148669
85142.6165.15956205409-22.5595620540901
86143.19156.848670740075-13.6586707400753
87142.32149.137645674677-6.81764567467673
88142.03144.599200734974-2.56920073497403
89144.92144.3987102832950.521289716704558
90177.31214.913996051311-37.6039960513109
91194.4168.11108220398826.2889177960116
92189.19140.34753280005548.8424671999452
93180.44150.10422560053330.3357743994673
94175.84156.07959351872019.7604064812797
95178.54179.691595421468-1.15159542146847
96176.55198.797301018429-22.2473010184293


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97205.259082949355162.400179191347248.117986707364
98223.676991638419162.843328577126284.510654699713
99231.407744271001157.327138946502305.488349595499
100233.941863898399149.512909719481318.370818077318
101236.993026804595143.110132423085330.875921186105
102345.021288263484204.387210569578485.65536595739
103328.425851119435189.407657235446467.444045003424
104240.505297334114131.195733644992349.814861023237
105192.78757394447996.5167579893626289.058389899595
106168.01630870040675.2316744704573260.800942930354
107171.66281181728769.36537295357273.960250681004
108189.50990187550375.7845693001444303.235234450861
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/1lsdh1250442443.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/1lsdh1250442443.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/2eelh1250442443.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/2eelh1250442443.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/3ss011250442443.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442516lqrx1ah9q834g63/3ss011250442443.ps (open in new window)


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





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