Home » date » 2010 » Jun » 06 »

opgave 10

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 11:46:50 +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/Jun/06/t1275824823gil0gazcezj36go.htm/, Retrieved Sun, 06 Jun 2010 13:47:04 +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/Jun/06/t1275824823gil0gazcezj36go.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
103,6 104,7 105,5 106,6 107,2 107,5 108,3 108,7 108,8 109,8 109,5 109,2 110,6 110,1 109,9 109,7 109,4 109,4 109,4 109,5 109,5 109,9 110 110,8 112,4 112,8 113,7 114,5 114,8 115,6 115,8 115,8 116,3 116,3 116,8 116,7 116,8 117 117,2 117,1 117,3 117,4 117,7 117,9 118,8 119,9 122,4 123,5 125,6 127,4 128,9 129,5 130,8 132,7 134 132,9 133,1 131,7 128,8 125,1 123,9 121,8 119,2 118,9 119,6 120,2 119,6 121 120,4 120,4 121,4 121,7
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.696623499130001
beta1
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3105.5105.8-0.300000000000011
4106.6106.4820259005220.117974099477991
5107.2107.537405910753-0.337405910753148
6107.5108.040512618647-0.540512618647227
7108.3108.0255966292650.274403370734589
8108.7108.769526104198-0.0695261041979336
9108.8109.225432706862-0.42543270686177
10109.8109.1370399857160.66296001428394
11109.5110.268680735336-0.768680735336247
12109.2109.867525832895-0.667525832895151
13110.6109.0718236310761.52817636892435
14110.1110.870262749543-0.770262749542965
15109.9110.53097203493-0.630972034930153
16109.7109.849164558501-0.149164558501042
17109.4109.399083955520.000916044480220535
18109.4109.054191165450.345808834549956
19109.4109.1904573579780.209542642022356
20109.5109.3777696471560.122230352843872
21109.5109.589406680028-0.08940668002802
22109.9109.5913295882280.308670411771516
23110110.085589415368-0.0855894153680197
24110.8110.2455749841370.554425015862932
25112.4111.237635140041.16236485996045
26112.8113.462931153409-0.662931153409204
27113.7113.954869651227-0.254869651227025
28114.5114.553525192295-0.053525192295453
29114.8115.255155108127-0.45515510812676
30115.6115.3599284425660.240071557433794
31115.8116.116252497838-0.316252497838036
32115.8116.264719221424-0.464719221423692
33116.3115.986026206380.31397379362042
34116.3116.468510566971-0.168510566970568
35116.8116.4974965632080.302503436792264
36116.7117.065332985522-0.365332985522471
37116.8116.913439319756-0.113439319755599
38117116.8579962049770.142003795023157
39117.2117.0794239472230.120576052777309
40117.1117.369920732484-0.269920732483826
41117.3117.2003551556470.0996448443532927
42117.4117.3576525842480.0423474157524879
43117.7117.5045354825860.195464517414123
44117.9117.8942485281370.00575147186279423
45118.8118.155809618520.644190381479817
46119.9119.3108804137540.589119586246341
47122.4120.8379821464891.56201785351134
48123.5124.13096601728-0.630966017279945
49125.6125.4567200356750.143279964324734
50127.4127.421644189066-0.0216441890664925
51128.9129.256600450908-0.356600450907933
52129.5130.609802055667-1.1098020556671
53130.8130.6651915316080.134808468391924
54132.7131.6815166928371.01848330716336
55134134.022929917585-0.0229299175849178
56132.9135.622896698246-2.72289669824602
57133.1133.445169346927-0.345169346926582
58131.7132.683369664812-0.983369664811988
59128.8130.791946227267-1.99194622726651
60125.1126.810288104726-1.71028810472632
61123.9121.8334127650342.06658723496645
62121.8120.9272307711350.872769228864883
63119.2119.797398654647-0.597398654646639
64118.9117.2272511016621.67274889833769
65119.6117.4038178713052.19618212869477
66120.2119.4749326086590.725067391341497
67119.6121.026333233316-1.42633323331643
68121120.0854003788760.914599621123628
69120.4121.412347949095-1.01234794909483
70120.4120.691713189672-0.291713189672151
71121.4120.2698752750211.1301247249786
72121.7121.6257945040380.0742054959616922


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73122.29782887719120.639835353955123.955822400425
74122.918169958091120.074753507716125.761586408466
75123.538511038991119.056191892455128.020830185528
76124.158852119892117.721812172827130.595892066956
77124.779193200792116.131306207431133.427080194153
78125.399534281693114.317538940848136.481529622538
79126.019875362593112.302093675039139.737657050148
80126.640216443494110.100726493009143.179706393979
81127.260557524394107.725710757335146.795404291453
82127.880898605295105.187020512473150.574776698116
83128.501239686195102.493003314733154.509476057657
84129.12158076709699.650797874676158.592363659515
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/16ntr1275824806.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/16ntr1275824806.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/2yxau1275824806.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/2yxau1275824806.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/3yxau1275824806.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275824823gil0gazcezj36go/3yxau1275824806.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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