Home » date » 2010 » May » 31 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 17:30:18 +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/May/31/t1275327126eeeug6elr9gkltz.htm/, Retrieved Mon, 31 May 2010 19:32:07 +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/2010/May/31/t1275327126eeeug6elr9gkltz.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
66857.2 64722.8 68489.6 71342.9 63542.5 69425.0 58927.9 61009.0 66837.0 66147.6 65982.3 65527.5 65914.6 59189.9 66211.4 66400.8 60167.7 64547.9 57706.2 58642.6 60082.1 63414.8 66044.0 57628.5 62838.8 55758.6 61004.5 66173.4 57489.0 59552.2 57061.8 55895.3 56314.7 61232.8 60014.1 57685.4 60403.1 52349.7 55693.3 65676.1 54898.8 55518.2 53779.1 52340.9 55704.4 60330.3 52837.4 55388.1 60383.4 52070.3 54077.0 62887.8 49212.8 57722.0 53936.8 46991.0 54984.2 56485.1 51277.8 53596.4 54252.5 49413.0 53213.2 58695.3 48723.5 54510.0 49454.1 46136.6 54622.5 50583.0 53224.3 53056.4
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0775686079515321
beta0.141640000501599
gamma0.670983617686526


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1365914.667882.8211538462-1968.22115384619
1459189.960840.47026691-1650.57026690995
1566211.467781.3746025152-1569.97460251523
1666400.867894.4482735782-1493.64827357818
1760167.761290.5070304832-1122.80703048316
1864547.965531.5536835978-983.65368359779
1957706.256242.49954445081463.70045554917
2058642.658333.6105024026308.989497597358
2160082.164141.0969500315-4058.99695003153
2263414.863023.1526432903391.647356709655
236604462824.53324467593219.46675532407
2457628.562588.4272212497-4959.92722124972
2562838.861197.3470552581641.45294474201
2655758.654534.75790673091223.8420932691
2761004.561683.2493009422-678.749300942232
2866173.461857.22625414244316.17374585757
295748955941.83443560911547.1655643909
3059552.260513.8112049269-961.611204926929
3157061.852779.16248482044282.63751517962
3255895.354443.15219585851452.14780414152
3356314.757717.2762321708-1402.5762321708
3461232.859670.7079360961562.092063904
3560014.161436.6335907519-1422.5335907519
3657685.455850.4440399211834.95596007899
3760403.159219.43605863511183.66394136492
3852349.752405.0010665963-55.3010665962938
3955693.358404.7731654094-2711.47316540936
4065676.161618.36587997074057.73412002931
4154898.854071.9998767351826.800123264853
4255518.257130.3236761668-1612.12367616685
4353779.152678.92263919371100.17736080632
4452340.952397.046114724-56.1461147239534
4555704.453823.59580472751880.80419527246
4660330.357939.04403723822391.25596276176
4752837.458003.4916354791-5166.09163547907
4855388.154183.46658004411204.63341995594
4960383.457133.90019226023249.49980773985
5052070.349769.00883370062301.29116629938
515407754389.6085942253-312.608594225334
5262887.862087.3738016488800.426198351226
5349212.852361.200446708-3148.40044670802
545772253630.56005987034091.43994012966
5553936.851391.90742593862544.89257406144
564699150613.866840064-3622.86684006401
5754984.253030.87504289261953.32495710743
5856485.157536.9576520233-1051.85765202333
5951277.852688.0535885619-1410.25358856188
6053596.453174.9447240306421.455275969405
6154252.557394.173539077-3141.67353907702
624941348940.3314044521472.668595547941
6353213.251774.84357290361438.35642709644
6458695.360290.1576265646-1594.85762656457
6548723.547900.6277648954822.872235104638
665451053969.1802079779540.819792022077
6749454.150469.0328443371-1014.93284433713
6846136.645529.4362067718607.163793228196
6954622.551704.36954999362918.13045000644
705058354414.3738982551-3831.37389825513
7153224.349086.60419968284137.69580031715
7253056.451157.06940267021899.33059732983


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7353321.338296501148761.113148680357881.5634443219
7447418.509436466242840.438420049251996.5804528833
7550879.133834396246278.61307551355479.6545932794
7657454.784350064852826.734549458662082.8341506711
7746752.182896776142091.07617876551413.2896147872
7852640.089648995747939.980673056157340.1986249353
7948186.893769613843441.454791252452932.3327479752
8044392.96350314539595.522887043449190.4041192467
8152007.435338474347151.018863117156863.8518138315
8250337.803869235345415.178031123155260.4297073476
8350305.903150874345309.619588243855302.1867135048
8450690.875055160945613.31517230355768.4349380187
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/1zbrb1275327014.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/1zbrb1275327014.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/2rk8e1275327014.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/2rk8e1275327014.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/3rk8e1275327014.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275327126eeeug6elr9gkltz/3rk8e1275327014.ps (open in new window)


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





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