Home » date » 2011 » Jan » 06 »

Opdracht 10

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 06 Jan 2011 18:55:40 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa.htm/, Retrieved Thu, 06 Jan 2011 19:53:35 +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/2011/Jan/06/t1294340015ff8spkuokt453wa.htm/},
    year = {2011},
}
@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 = {2011},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
Eigen tijdreeks
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
361,58 363,19 363,61 364,14 365,51 365,51 365,5 365,5 364,59 364,63 364,54 363,67 365,22 369,05 370,45 370,46 370,46 370,58 370,58 370,22 370,21 370,29 370,29 370,2 370,2 372,55 374,51 375,58 375,75 375,75 375,75 375,69 375,76 377,5 377,51 377,74 369,82 373,1 374,55 375,01 374,81 375,31 375,31 375,39 375,59 376,26 377,18 377,26 377,26 381,87 387,09 387,14 388,78 389,16 389,16 389,42 389,49 388,97 388,97 389,09 389,09 391,76 390,96 391,76 392,8 393,06 393,06 393,26 393,87 394,47 394,57 394,57 394,57 399,57 406,13 407,03 409,46 409,9 409,9 410,14 410,54 410,69 410,79 410,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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.883046242290146
beta0.0232953695718167
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13365.22362.4460941143822.77390588561815
14369.05368.8282792201480.221720779852205
15370.45370.511943494574-0.0619434945735975
16370.46370.514428569369-0.0544285693695201
17370.46370.506934160959-0.0469341609594949
18370.58370.588702684452-0.00870268445248712
19370.58371.110917019533-0.530917019532637
20370.22370.744672684485-0.524672684484756
21370.21369.3164983692380.893501630762216
22370.29370.1010962655640.188903734436224
23370.29370.2148276393260.0751723606742303
24370.2369.4895370538750.710462946125404
25370.2372.125612277186-1.92561227718613
26372.55374.08194541213-1.53194541212969
27374.51374.1350412234770.374958776523385
28375.58374.4701277504961.10987224950367
29375.75375.4601290181770.289870981822673
30375.75375.820122163439-0.0701221634388389
31375.75376.206877243224-0.45687724322363
32375.69375.883141885205-0.193141885205421
33375.76374.883193647920.876806352079825
34377.5375.5505153708131.94948462918722
35377.51377.2195349720110.290465027989342
36377.74376.7638127355470.976187264452676
37369.82379.383421653442-9.56342165344176
38373.1374.523545441961-1.42354544196075
39374.55374.775959409283-0.225959409283348
40375.01374.5320996686860.477900331314174
41374.81374.722445640730.0875543592703139
42375.31374.7121617945890.597838205411279
43375.31375.506746545563-0.196746545562917
44375.39375.3126051966310.0773948033691454
45375.59374.5520483541211.03795164587893
46376.26375.3645181431430.895481856857316
47377.18375.7682012600771.41179873992292
48377.26376.2642412469820.995758753018151
49377.26377.523632457265-0.263632457265430
50381.87381.98352585277-0.113525852770124
51387.09383.662889668683.42711033132031
52387.14386.8917422932090.248257706790525
53388.78386.9828392464011.7971607535992
54389.16388.7322807207220.427719279278222
55389.16389.477534014307-0.317534014306943
56389.42389.3940789808540.0259210191463239
57389.49388.8564096161190.633590383880971
58388.97389.464412763687-0.49441276368691
59388.97388.8350113095320.134988690467878
60389.09388.2487018215410.841298178458999
61389.09389.346813542291-0.256813542291411
62391.76394.095009697957-2.33500969795716
63390.96394.355436559733-3.3954365597329
64391.76391.1252804320540.634719567945638
65392.8391.6854076442321.11459235576831
66393.06392.6053438238680.45465617613246
67393.06393.223969271839-0.163969271838766
68393.26393.2558472407670.00415275923313629
69393.87392.7020960605661.16790393943450
70394.47393.5963919253230.873608074677406
71394.57394.2209780791860.34902192081438
72394.57393.8753920336450.694607966354738
73394.57394.693870848066-0.123870848065678
74399.57399.3594059639930.210594036006796
75406.13401.8120279638014.31797203619863
76407.03406.0529670989980.977032901001735
77409.46407.1586981895352.30130181046508
78409.9409.2504828244440.649517175555502
79409.9410.185034367644-0.285034367644471
80410.14410.345491252696-0.205491252696163
81410.54409.9268136076660.613186392334114
82410.69410.4796445261960.210355473804498
83410.79410.6246862743480.165313725651799
84410.97410.3034715737430.666528426256889


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85411.175913862679408.020937789566414.330889935792
86416.366618366145412.093710492739420.639526239551
87419.394692698775414.203216764207424.586168633342
88419.516738653851413.535594135651425.497883172051
89419.989786149479413.280420876775426.699151422183
90419.871773845462412.488256467218427.255291223705
91420.135961428111412.106302687455428.165620168768
92420.579849562928411.926700001179429.232999124678
93420.450547130019411.205145632918429.69594862712
94420.417803621503410.594791411491430.240815831515
95420.370514244835409.983767806696430.757260682974
96419.94887862866408.688949637695431.208807619625
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/1uuht1294340136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/1uuht1294340136.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/2ctpb1294340136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/2ctpb1294340136.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/3s8rh1294340136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/06/t1294340015ff8spkuokt453wa/3s8rh1294340136.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=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