Home » date » 2010 » Aug » 10 »

Tijdreeks A - Stap 32

*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 Aug 2010 16:31:59 +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/Aug/10/t1281457904741aenpfigeuxwn.htm/, Retrieved Tue, 10 Aug 2010 18:31:48 +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/Aug/10/t1281457904741aenpfigeuxwn.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:
Platini Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
94 93 92 90 110 109 94 84 85 85 86 88 93 94 90 91 104 103 88 79 82 88 93 89 94 96 94 92 113 122 107 98 103 110 113 110 123 124 118 117 139 146 134 121 123 122 127 122 139 136 127 123 140 146 138 120 122 115 115 102 119 114 108 102 121 109 102 95 98 92 94 90 113 111 103 90 108 99 95 91 85 72 90 90 114 115 104 93 101 90 79 75 71 61 84 87 107 99 93 74 87 71 67 61 63 52 80 84 102 93 87 72 83 72 66 64 64 47 77 79
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.365777387991567
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
139394.5619658119659-1.56196581196586
149495.2432564147553-1.24325641475525
159090.9161237083847-0.916123708384688
169191.3753154155436-0.375315415543625
17104103.6156559007960.384344099204498
18103102.2171959924480.782804007551817
198891.9644837085955-3.96448370859551
207980.3086542572194-1.30865425721936
218280.66593383218531.33406616781467
228880.98986078141227.01013921858778
239384.55663357186698.4433664281331
248989.9393151340941-0.939315134094144
259493.89938990500040.100610094999595
269695.39094588674790.609054113252128
279491.94882144656892.05117855343114
289293.8363780725177-1.83637807251775
29113106.0240881170906.97591188290978
30122107.28938693928914.7106130607113
3110799.12031505605557.87968494394453
329893.48120176903774.51879823096229
3310397.64610474454885.35389525545118
34110103.0402881538366.9597118461641
35113107.4976008561625.50239914383845
36110105.8538342789324.1461657210683
37123112.33360704881010.6663929511903
38124118.0123541790975.98764582090315
39118117.4522248941070.547775105892953
40117116.3242942162780.675705783722094
41139135.0198212855083.9801787144915
42146140.0948710383335.9051289616668
43134124.3726231086939.62737689130746
44121117.2412256674233.75877433257693
45123121.6577665027231.34223349727658
46122126.603019945168-4.60301994516817
47127125.9066861462311.09331385376878
48122121.7900219642850.209978035714784
49139130.9653018287478.03469817125347
50136132.7140672905403.28593270946033
51127127.715623426682-0.715623426681802
52123126.206706662264-3.2067066622639
53140145.577906501360-5.57790650135954
54146148.377671783479-2.37767178347923
55138131.9864964365046.01350356349587
56120119.8112254052180.188774594782117
57122121.3893162207080.610683779292174
58115122.296371150803-7.29637115080284
59115124.227614083759-9.22761408375862
60102115.775556289368-13.7755562893678
61119124.797858381330-5.79785838133036
62114118.47521300308-4.47521300307987
63108108.100040147905-0.100040147904664
64102105.236388510888-3.23638851088785
65121123.092862845378-2.09286284537787
66109129.197039514833-20.1970395148332
67102111.609815529802-9.60981552980158
689590.02571282803144.9742871719686
699893.62182027923574.37817972076428
709290.89210700301221.10789299698779
719494.672601786576-0.672601786575981
729086.46536625957953.53463374042047
73113106.8789808513256.12101914867459
74111105.7548429703465.24515702965358
75103101.7099952322541.29000476774644
769097.365647542735-7.36564754273498
77108114.436982128694-6.43698212869378
7899107.47009997801-8.47009997800993
7995100.886982155598-5.88698215559765
809189.91417543068751.08582456931245
818591.709906363049-6.70990636304892
827282.8503321332926-10.8503321332926
839081.1275485113888.87245148861194
849079.080001544896610.9199984551034
85114103.83535966062810.1646403393723
86115103.63479541592511.3652045840753
8710499.32007568823464.67992431176539
889390.72607349803852.27392650196151
89101111.912326903993-10.9123269039928
9090102.019015518124-12.0190155181241
917995.776056371702-16.7760563717020
927585.2425842164814-10.2425842164814
937177.9504105386372-6.95041053863723
946166.3769136729022-5.37691367290218
958479.16481810358554.8351818964145
968776.939129796340410.0608702036596
97107100.9011730271486.0988269728521
989999.9748511803374-0.97485118033741
999386.90646217115736.09353782884267
1007477.3035896254469-3.30358962544692
1018788.0866936731075-1.08669367310749
1027181.0854898022608-10.0854898022608
1036772.5327477662147-5.53274776621473
1046170.2554994408607-9.25549944086075
1056365.4123500431171-2.41235004311707
1065256.4967203841547-4.49672038415467
1078076.08332154297553.91667845702447
1088476.8359151345727.16408486542801
10910297.22556238405584.77443761594418
1109391.32852222276891.67147777723112
1118783.71103264754853.28896735245145
1127267.12244091910984.87755908089021
1138382.30402971278860.695970287211424
1147270.2476440230511.75235597694895
1156668.912370241473-2.91237024147304
1166465.2325434717181-1.23254347171812
1176467.6640900377397-3.66409003773971
1184756.9686473910139-9.96864739101389
1197779.8897091709066-2.88970917090664
1207980.212258648891-1.21225864889095


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12196.022460526440783.440745007033108.604176045848
12286.411071750999173.014096173988399.80804732801
12379.208041863629965.04264939427993.3734343329808
12462.423941043247347.529722936530177.3181591499646
12573.169370849471457.580364395877888.758377303065
12661.528398657391645.274275752420677.7825215623626
12756.59367783718239.700605274453273.4867503999108
12855.044514368853137.535793975593672.5532347621126
12956.384755652223438.281311808328474.4881994961185
13043.031061456717524.351819817700661.7103030957343
13174.08805172930754.85023851136393.325864947251
13276.531468531468556.750850578325196.3120864846119
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/1m8kg1281457916.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/1m8kg1281457916.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/2m8kg1281457916.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/2m8kg1281457916.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/3eh111281457916.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/10/t1281457904741aenpfigeuxwn/3eh111281457916.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