Home » date » 2008 » Jun » 01 »

Glenn Van Passen 2 Mar 01-A opgave 10 oefening 2

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 12:30:05 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz.htm/, Retrieved Sun, 01 Jun 2008 18:31:04 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
11835.70 11542.20 13093.70 11180.20 12035.70 12112.00 10875.20 9897.30 11672.10 12385.70 11405.60 9830.90 11025.10 10853.80 12252.60 11839.40 11669.10 11601.40 11178.40 9516.40 12102.80 12989.00 11610.20 10205.50 11356.20 11307.10 12648.60 11947.20 11714.10 12192.50 11268.80 9097.40 12639.80 13040.10 11687.30 11191.70 11391.90 11793.10 13933.20 12778.10 11810.30 13698.40 11956.60 10723.80 13938.90 13979.80 13807.40 12973.90 12509.80 12934.10 14908.30 13772.10 13012.60 14049.90 11816.50 11593.20 14466.20 13615.90 14733.90 13880.70 13527.50 13584.00 16170.20 13260.60 14741.90 15486.50 13154.50 12621.20 15031.60 15452.40 15428.00 13105.90 14716.80 14180.00 16202.20 14392.40 15140.60 15960.10 14729.90 13705.20 15728.50 17315.60 16152.80
 
Text written by user:
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.17805872722291
beta0.0478690546647562
gamma0.58355895556279


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1311025.111016.38706208368.7129379164071
1410853.810863.0373765497-9.23737654965407
1512252.612273.6993659766-21.0993659766045
1611839.411825.130842669214.2691573308184
1711669.111636.94065256632.1593474339898
1811601.411564.684899835436.7151001646198
1911178.411134.455308659043.9446913409683
209516.49470.6463891949445.7536108050554
2112102.812033.630344951569.1696550485485
221298912921.956371728567.0436282714709
2311610.211570.746097402839.4539025971972
2410205.510168.118155725237.3818442748252
2511356.211256.999949136099.200050863983
2611307.111110.8717665178196.228233482154
2712648.612595.683215864552.916784135472
2811947.212171.4217199111-224.221719911111
2911714.111948.9203377463-234.820337746269
3012192.511831.5898388765360.910161123458
3111268.811455.4714702502-186.671470250218
329097.49714.8118448612-617.41184486121
3312639.812194.7233343156445.076665684384
3413040.113161.7591863968-121.659186396799
3511687.311742.6771031474-55.3771031473989
3611191.710302.6732522839889.02674771613
3711391.911606.5901758006-214.690175800575
3811793.111450.1689564520342.93104354804
3913933.212929.11315193861004.08684806136
4012778.112530.2145032048247.885496795167
4111810.312392.0803782404-581.780378240381
4213698.412518.30330634711180.09669365291
4311956.612003.9300753699-47.3300753699023
4410723.89981.22134570794742.578654292056
4513938.913514.9818584203423.918141579677
4613979.814297.4127364848-317.612736484789
4713807.412785.61108965441021.78891034562
4812973.911914.89533147881059.00466852118
4912509.812827.3061342329-317.506134232914
5012934.112974.9410424626-40.8410424626109
5114908.314927.8086018990-19.5086018990442
5213772.113919.7558657906-147.655865790593
5313012.613279.7565899022-267.156589902186
5414049.914435.3190521728-385.419052172778
5511816.512961.0793369486-1144.57933694863
5611593.211013.8774169365579.32258306352
5714466.214568.3003079413-102.100307941249
5813615.914918.4772920713-1302.57729207126
5914733.913823.4566599641910.443340035932
6013880.712892.6787134222988.021286577774
6113527.513123.3740067632404.125993236834
621358413542.703934732441.296065267572
6316170.215607.1920689984563.007931001555
6413260.614584.3120785899-1323.71207858991
6514741.913642.74579529371099.15420470629
6615486.515050.1933174055436.306682594521
6713154.513238.1520312516-83.652031251555
6812621.212242.4751487302378.724851269786
6915031.615701.1610463770-669.561046376955
7015452.415359.751994964692.6480050353839
711542815610.6308813893-182.630881389294
7213105.914443.2602639418-1337.36026394177
7314716.813961.0841708753755.715829124656
741418014274.0196794399-94.0196794398598
7516202.216673.7299494038-471.529949403815
7614392.414460.7603890167-68.3603890166632
7715140.614918.8105645343221.789435465673
7815960.115877.070252962983.0297470370679
7914729.913663.63451169661066.26548830342
8013705.213052.2723736871652.927626312925
8115728.516210.1127280847-481.612728084703
8217315.616276.65313456111038.94686543892
8316152.816578.8065691304-426.006569130441


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8414697.962153364613965.140352594215430.783954135
8515534.753823062514769.997684884016299.5099612411
8615298.689950428414505.727613185516091.6522876714
8717716.418176616116863.502869693018569.3334835393
8815635.296646448614780.656057761216489.9372351359
8916311.603196394615411.472759471217211.7336333181
9017248.740208433316293.081012702618204.3994041639
9115351.430112298514407.636842846816295.2233817502
9214282.943158594713333.171054662115232.7152625274
9316924.030963325715853.814338829617994.2475878217
9417857.364452885416713.559218404719001.169687366
9517231.997029543316334.198432972918129.7956261136
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/1fpwb1212344998.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/1fpwb1212344998.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/2hsst1212344998.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/2hsst1212344998.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/3skoc1212344998.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212345064kh4srvidozqj9uz/3skoc1212344998.ps (open in new window)


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





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