Home » date » 2009 » Jul » 18 »

opgave10_hanne jacobs

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 18 Jul 2009 06:13: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/2009/Jul/18/t12479193031u9b7syadirw5e5.htm/, Retrieved Sat, 18 Jul 2009 14:15: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/2009/Jul/18/t12479193031u9b7syadirw5e5.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 «
0.88 1.03 0.69 0.71 1.11 1.05 1.03 0.65 0.59 0.77 0.9 1.26 0.96 0.83 0.87 0.79 1.12 0.88 0.64 0.64 0.58 0.5 0.99 1.07 0.89 0.89 0.83 0.86 0.9 1.12 0.88 0.88 0.89 0.82 0.88 0.81 0.88 0.76 1.13 0.85 1.45 1.55 0.71 0.81 0.83 0.73 0.9 0.94 1.78 0.88 1.04 0.83 1.41 0.96 1.3 0.83 1.4 0.91 0.87 0.97 1.19 1.23 1.33 1.17 1.09 0.63 0.89 0.63 1.51 0.97 0.84 0.92 0.95 0.73 1.02 0.79 1.27 0.95 0.75 0.52 0.95 0.82 0.76 1.24 0.94 1.04 1.81 0.95 1.39 0.86 1.15 1.51 0.6 0.72 1.1 1.62 1.84 1.73 1.36 1.07 1 1.49 0.9 1.43 1.54 0.81 1.61 1.3 1.4 1.03 0.79 1.11 1.15 1.03 1.59 1.11 1.33 0.93 1.07 1.14 1.12 0.86 0.82 1.02 1.07 1.31 0.98 0.89 0.8 0.8 0.78 0.97
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.153600290204256
beta0.00875809637850753
gamma0.180419308731852


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.960.978002136752137-0.0180021367521371
140.830.855399266204118-0.0253992662041179
150.870.885792692827306-0.0157926928273064
160.790.808473780183224-0.0184737801832237
171.121.13655153329496-0.0165515332949606
180.880.89156894486688-0.0115689448668803
190.640.971086120388833-0.331086120388833
200.640.5381633060314630.101836693968537
210.580.487707890348780.0922921096512194
220.50.66424391268317-0.164243912683169
230.990.7582383123820450.231761687617955
241.071.15378773039326-0.0837877303932648
250.890.8546735681628740.0353264318371262
260.890.738855689162990.151144310837010
270.830.7977940448632550.0322059551367447
280.860.7274636829107330.132536317089267
290.91.07925868164790-0.179258681647904
301.120.8100547328291240.309945267170876
310.880.890606268236178-0.0106062682361777
320.880.5738928011551520.306107198844848
330.890.5545039344683880.335496065531612
340.820.730696579742820.0893034202571799
350.880.925925007719033-0.0459250077190331
360.811.23207787030021-0.422077870300208
370.880.900179468848156-0.0201794688481559
380.760.794435057706646-0.0344350577066463
391.130.8073690236756210.322630976324378
400.850.7980232128306820.0519767871693178
411.451.090776689703310.359223310296690
421.550.980658593827770.569341406172231
430.711.05412205611671-0.344122056116706
440.810.736115142551960.0738848574480397
450.830.6868027011351570.143197298864843
460.730.796862170407452-0.0668621704074522
470.90.948242403690176-0.0482424036901755
480.941.19738426983259-0.257384269832594
491.780.953163120991940.82683687900806
500.880.977490814745658-0.0974908147456585
511.041.037328076250440.00267192374955916
520.830.939137538199761-0.109137538199761
531.411.255477543342220.154522456657784
540.961.14714352308623-0.187143523086233
551.30.9650406073285390.334959392671461
560.830.816208907394130.0137910926058705
571.40.7692052767300650.630794723269935
580.910.92369301630739-0.0136930163073893
590.871.08776562301761-0.217765623017610
600.971.28038543731481-0.310385437314809
611.191.19497415063005-0.00497415063004802
621.230.9506481271844460.279351872815554
631.331.084434886710620.245565113289383
641.171.007576308904990.162423691095011
651.091.40735376844290-0.317353768442903
660.631.17519278102677-0.545192781026773
670.891.01816851655071-0.128168516550711
680.630.748879044002418-0.118879044002418
691.510.7752628573265270.734737142673473
700.970.8469832521521280.123016747847872
710.841.00075990393264-0.160759903932638
720.921.18793749048538-0.267937490485378
730.951.15568707680261-0.205687076802607
740.730.923682473266993-0.193682473266993
751.020.9787476547374330.0412523452625672
760.790.856631565189815-0.0666315651898147
771.271.146473883830100.123526116169896
780.950.9463458063089660.00365419369103404
790.750.937151602454259-0.187151602454259
800.520.659986074116214-0.139986074116214
810.950.8132176840122730.136782315987727
820.820.6986105556669760.121389444333023
830.760.807732831927355-0.0477328319273547
841.240.9949869246073750.245013075392625
850.941.05080424285307-0.110804242853069
861.040.835106807642290.204893192357709
871.810.9877056179182930.822294382081707
880.950.970570028161343-0.020570028161343
891.391.298074585454310.0919254145456918
900.861.0762936490887-0.216293649088699
911.151.005388438416140.144611561583860
921.510.7880410286175310.721958971382469
930.61.11874830605443-0.518748306054429
940.720.903035266158807-0.183035266158807
951.10.9410965413924780.158903458607522
961.621.206597163473720.413402836526276
971.841.235972811222290.604027188777706
981.731.181273832010110.548726167989891
991.361.48442039791460-0.124420397914597
1001.071.19533792884992-0.125337928849916
10111.52596794750683-0.525967947506834
1021.491.163419046819910.326580953180089
1030.91.23295032852915-0.332950328529151
1041.431.031709838010760.398290161989240
1051.541.124097236949270.415902763050731
1060.811.10533013461671-0.29533013461671
1071.611.180325788065790.429674211934212
1081.31.52861144507659-0.228611445076588
1091.41.48995026025923-0.0899502602592306
1101.031.32074483120732-0.290744831207323
1110.791.39155855329633-0.60155855329633
1121.111.02780978089230.0821902191077004
1131.151.32817878041062-0.178178780410619
1141.031.14874986181696-0.118749861816962
1151.591.048073584204760.541926415795239
1161.111.092967100348300.0170328996516975
1171.331.129057205662310.200942794337688
1180.930.967947247546804-0.0379472475468036
1191.071.19282155448416-0.122821554484157
1201.141.35460716613285-0.214607166132855
1211.121.33817858879710-0.218178588797097
1220.861.11734907941166-0.257349079411659
1230.821.14460847424558-0.324608474245583
1241.020.9269644621710160.0930355378289837
1251.071.18840579173005-0.118405791730054
1261.311.026480249752530.283519750247474
1270.981.08827067174577-0.108270671745768
1280.890.952052392565045-0.0620523925650451
1290.81.00288638739959-0.202886387399587
1300.80.7415318667547330.0584681332452672
1310.780.966648281378973-0.186648281378973
1320.971.10292150023691-0.132921500236906


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1331.096912074172370.5451541880014521.64866996034329
1340.9023243509828980.3439824135429591.46066628842284
1350.9578989604969190.3929368929908351.522861028003
1360.853385976057660.281767989398631.42500396271669
1371.067617294847220.4893078830018511.64592670669259
1380.9847837998019660.3997477333395521.56981986626438
1390.9423431198971040.350545439738261.53414080005595
1400.8291054413102410.2305114526682831.4276994299522
1410.8673402077321560.261915474240751.47276494122356
1420.6767084748096030.06441881283042751.28899813678878
1430.854983311486860.2357947845912021.47417183838252
1441.027951395933410.4018303095517951.65407248231502
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/1lly01247919182.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/1lly01247919182.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/21wgm1247919182.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/21wgm1247919182.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/38cxw1247919182.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jul/18/t12479193031u9b7syadirw5e5/38cxw1247919182.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=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