Home » date » 2009 » Jan » 16 »

Opgave 10-oefening2-exponential-veerle van rompay

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 16 Jan 2009 06:48:19 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt.htm/, Retrieved Fri, 16 Jan 2009 14:49:34 +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/2009/Jan/16/t1232113770orf27siotmr02kt.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 «
113,9000 112,0000 113,8500 113,0800 111,7200 110,6900 113,5300 113,9900 112,7400 112,1500 115,8200 118,3800 118,8100 123,8500 117,9600 120,1600 118,7400 119,8400 124,8100 121,3300 120,2000 118,3200 129,5800 130,2000 127,1900 133,1000 129,1200 123,2800 123,3600 124,1300 126,9700 127,1400 123,7000 123,6700 130,1900 134,0100 124,9600 129,9600 128,3200 132,3800 126,2500 128,9100 131,4200 129,4400 126,8600 126,7100 131,6300 132,7800 126,6100 132,8400 123,1400 128,1300 125,4900 126,4800 130,8600 127,3200 126,5600 126,6400 129,2600 126,4700 135,4000 135,5000 132,2200 122,6200 125,1600 128,5000 133,8600 128,8700 125,0700 125,2500 132,1600 130,2400
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.300229450194369
beta0.106520029572451
gamma0.101170257297618


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13118.81114.9091319444443.90086805555555
14123.85121.1585427193922.69145728060776
15117.96116.3600934437411.59990655625897
16120.16119.4238442257480.736155774252396
17118.74118.3693141782340.370685821765790
18119.84119.5014973205130.338502679486993
19124.81122.0894269372.72057306299986
20121.33123.752446052297-2.42244605229679
21120.2122.117241784959-1.91724178495919
22118.32121.431150462165-3.11115046216479
23129.58124.4258666021035.15413339789714
24130.2128.8706458760251.32935412397472
25127.19130.178292838869-2.98829283886914
26133.1134.417717615868-1.31771761586847
27129.12128.3540677542330.76593224576726
28123.28131.095363119880-7.81536311987963
29123.36127.163138340085-3.8031383400846
30124.13126.622054219994-2.49205421999356
31126.97128.020401894517-1.05040189451685
32127.14127.558154410962-0.418154410962174
33123.7125.995558242714-2.29555824271407
34123.67124.534356825636-0.864356825636392
35130.19128.2836243816331.90637561836684
36134.01130.8735364604073.13646353959291
37124.96131.866835354631-6.90683535463147
38129.96134.371527956692-4.41152795669197
39128.32126.7510573792201.56894262077978
40132.38128.3761178973154.00388210268454
41126.25127.904611612568-1.65461161256836
42128.91127.7982924783151.11170752168466
43131.42130.1928031710651.22719682893498
44129.44130.344101545671-0.904101545671466
45126.86128.372139383371-1.51213938337112
46126.71127.141963020923-0.431963020923078
47131.63131.1255291146140.504470885386155
48132.78133.245124327386-0.465124327385752
49126.61132.194405981146-5.58440598114551
50132.84135.06339096987-2.22339096986991
51123.14128.383836801113-5.2438368011134
52128.13127.7785884912920.351411508707585
53125.49125.3358010815010.154198918499262
54126.48125.5521275952020.927872404798052
55130.86127.4774858390173.38251416098306
56127.32127.771778730716-0.451778730716228
57126.56125.5538281671391.00617183286083
58126.64124.8979894470361.74201055296376
59129.26129.411861148902-0.151861148902071
60126.47131.056091905674-4.58609190567375
61135.4128.0642520191387.3357479808623
62135.5135.1219251541860.378074845814041
63132.22129.164499421583.05550057841987
64122.62131.867421332597-9.24742133259656
65125.16126.642188477594-1.48218847759372
66128.5126.4830325773612.0169674226385
67133.86129.0050140160074.85498598399315
68128.87129.612890214242-0.742890214242038
69125.07127.544402925246-2.47440292524621
70125.25125.918023721728-0.668023721728304
71132.16129.5195158493842.64048415061600
72130.24131.722727875470-1.48272787546981


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73130.640437049224124.500772182621136.780101915827
74134.902336491291128.432739348052141.371933634530
75128.908070579365122.062969181734135.753171976996
76129.612045781185122.347627802425136.876463759946
77127.798046806868120.072643288183135.523450325553
78128.464153209514120.23841360357136.689892815458
79130.649537916387121.886452144992139.412623687781
80129.316268671027119.981087575066138.651449766989
81127.284764135178117.344859724704137.224668545653
82126.544819790573115.969515583432137.120123997713
83130.618126892226119.378518789680141.857734994772
84131.689262728196119.758043200548143.620482255845
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/1xsou1232113697.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/1xsou1232113697.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/2o6t81232113697.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/2o6t81232113697.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/3asbm1232113697.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232113770orf27siotmr02kt/3asbm1232113697.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