Home » date » 2011 » May » 10 »

Alexander De Raeymaeker - Opdracht 9.2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 10 May 2011 19:36:39 +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/May/10/t13050559735ztx5f7z43bvgz8.htm/, Retrieved Tue, 10 May 2011 21:32:56 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2435 1379 1511 2021 1614 1680 1630 870 1877 2428 1711 127 3192 1934 2075 1700 1198 1582 1705 911 1817 1168 920 84 2254 1485 1886 1358 1167 1781 1218 779 1418 1641 1196 132 2926 1777 2094 1648 1646 1537 1917 977 1475 2124 1209 135 2917 1981 1398 1171 903 1390 1280 781 1828 1631 1063 186 2275 1342 1070 950 1121 1305 1586 548 1225 1419 880 124 2044 1143 897 1264 1326 1529 1373 587 1137 1426 1016 176 2614
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.241318956657905
beta0
gamma0.491116881078373


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1331923211.64289529915-19.6428952991455
1419341932.208782043411.79121795659466
1520752062.5721266354312.4278733645729
1617001733.71063114617-33.7106311461653
1711981297.17337321995-99.1733732199496
1815821680.13038134319-98.1303813431896
1917051579.7557498446125.244250155402
20911783.452318029758127.547681970242
2118171762.7464146438754.2535853561258
2211682304.85325633389-1136.85325633389
239201332.35677105251-412.356771052509
2484-341.596644965116425.596644965116
2522542807.88668600327-553.886686003271
2614851407.5157920589877.4842079410155
2718861560.10851918255325.891480817446
2813581289.7004783494468.2995216505603
291167853.388716470799313.611283529201
3017811336.34710717206444.652892827941
3112181450.18599529009-232.18599529009
32779568.486130720039210.513869279961
3314181540.4920824362-122.492082436203
3416411596.139162975344.8608370247025
3511961178.7608537604817.2391462395196
36132-79.3005861876447211.300586187645
3729262653.51250850884272.487491491158
3817771687.810838109889.1891618901986
3920941935.78500761612158.214992383879
4016481528.93441251148119.065587488523
4116461196.27688907951449.723110920492
4215371760.90788749864-223.907887498643
4319171461.2194932455455.780506754497
44977910.48942939135466.5105706086464
4514751723.66628214382-248.666282143823
4621241811.22101293278312.778987067223
4712091448.20456067661-239.204560676608
48135200.565892665725-65.5658926657254
4929172889.3641637995327.6358362004694
5019811796.2779940856184.722005914396
5113982093.02514798195-695.025147981953
5211711465.68442236021-294.684422360208
539031156.38452452118-253.384524521181
5413901300.3466926639689.6533073360408
5512801329.57918022557-49.5791802255671
56781511.853850125609269.146149874391
5718281256.49527758593571.504722414073
5816311751.16792626116-120.16792626116
5910631078.00351732836-15.0035173283613
60186-50.8332357183974236.833235718397
6122752745.66674126203-470.666741262032
6213421590.86118801742-248.86118801742
6310701455.18176904721-385.181769047214
649501051.77950618361-101.779506183611
651121804.419607482853316.580392517147
6613051213.7413771619691.258622838041
6715861191.48308425614394.516915743859
68548599.683959002229-51.6839590022289
6912251379.56212629246-154.562126292462
7014191441.30311315137-22.3031131513717
71880830.93970986829849.0602901317023
72124-188.602588921406312.602588921406
7320442362.56672247207-318.56672247207
7411431327.11077303898-184.110773038982
758971156.26366260798-259.263662607975
761264888.843811557384375.156188442616
771326912.458882032014413.541117967986
7815291261.22398084633267.776019153669
7913731394.55704558892-21.5570455889231
80587536.09646373699150.9035362630091
8111371302.39842337136-165.39842337136
8214261410.8042558396915.1957441603083
831016836.08011793973179.919882060269
84176-53.6871387335377229.687138733538
8526142242.2987433802371.701256619805


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
861423.51597279861849.4235501646851997.60839543254
871269.09623512974678.5242490256531859.66822123382
881300.62713453557694.023118874481907.23115019666
891248.01217075773625.7890653836241870.23527613183
901442.6697269915805.2101173638632080.12933661914
911403.57755331851751.2372165679272055.91789006908
92577.317985383771-89.57111783886431244.20708860641
931250.74161564305569.614434389561931.86879689654
941466.35080272204771.2771389372161.42446650708
95949.336033359659240.5902685520011658.08179816732
9634.694031440516-687.465037032646756.853099913678
972328.166664835831592.838927549083063.49440212259
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/1vq6o1305056197.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/1vq6o1305056197.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/2u5gp1305056197.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/2u5gp1305056197.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/310r81305056197.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t13050559735ztx5f7z43bvgz8/310r81305056197.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