Home » date » 2010 » Aug » 17 »

TIJDREEKS B - STAP 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 17 Aug 2010 19:46:19 +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/17/t1282074372axp61eec88rkzs4.htm/, Retrieved Tue, 17 Aug 2010 21:46:17 +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/17/t1282074372axp61eec88rkzs4.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:
Schrauwen Nathalie
 
Dataseries X:
» Textbox « » Textfile « » CSV «
162 161 160 158 156 155 156 158 159 159 160 162 168 177 174 169 169 160 168 172 173 175 170 177 187 201 188 179 176 170 179 183 174 177 170 166 171 178 165 162 159 149 153 156 149 150 139 131 141 150 128 124 120 113 120 121 115 119 106 98 106 116 93 94 90 93 100 99 90 91 83 83 92 104 71 69 67 75 86 81 88 87 77 70
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.807164232749437
beta0
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31601600
4158159-1
5156157.192835767251-1.19283576725056
6155155.230021400382-0.230021400381673
7156154.0443563532271.95564364677335
8158154.6228819569063.37711804309421
9159156.3487708510642.65122914893578
10159157.4887481929081.51125180709209
11160157.7085765982712.29142340172939
12162158.5581316102323.44186838976836
13168160.3362846682847.66371533171645
14177165.52216157401911.4778384259814
15174173.7866622207480.213337779252129
16169172.958860845654-3.95886084565439
17169168.763409968610.236590031390023
18160167.954376979773-7.95437697977309
19168160.5338883878957.46611161210524
20172165.5602666389016.43973336109866
21173169.7581890764233.24181092357651
22175171.3748629032713.62513709672913
23170173.300943906564-3.30094390656376
24177169.6365400508737.36345994912671
25187174.58006155109112.4199384489086
26201183.6049916417.3950083600001
27188196.645620216569-8.64562021656943
28179188.667184807819-9.66718480781915
29176179.864178999569-3.86417899956879
30170175.745151922175-5.74515192217535
31179170.1078707788848.89212922111628
32183176.2852794391556.71472056084508
33174180.705161708776-6.7051617087763
34177174.2929950026512.70700499734903
35170175.477992614385-5.47799261438507
36166170.056352908788-4.05635290878786
37171165.7822099254055.21779007459486
38178168.9938234476139.00617655238688
39165175.263287034526-10.2632870345265
40162165.979128829816-3.97912882981564
41159161.767318360886-2.76731836088632
42149158.533637959348-9.53363795934808
43153149.838426390583.16157360942003
44156151.3903355273084.60966447269163
45149154.111091814641-5.11109181464084
46150148.9856013115641.01439868843568
47139148.804387650618-9.80438765061754
48131139.890636615029-8.89063661502877
49141131.7144327330059.28556726699497
50150138.20941051171211.7905894882877
51128146.726352629690-18.7263526296896
52124130.611110577151-6.61111057715078
53120124.274858580523-4.27485858052319
54113119.824345634263-6.82434563426284
55120113.3159779263666.6840220736339
56121117.7110814751113.28891852488889
57115119.365778872828-4.36577887282846
58119114.8418783185884.15812168141183
59106117.198165415244-11.1981654152437
6098107.159406819647-9.15940681964724
6110698.76626124162677.2337387583733
62116103.60507643643912.3949235635611
6393112.609815404609-19.6098154046086
649495.7814737991896-1.78147379918960
659093.3435318669035-3.34353186690350
669389.6447525328813.35524746711897
6710091.35298828036268.6470117196374
689997.33254686061911.66745313938088
699097.6784553945131-7.67845539451314
709190.48068083730020.519319162699844
718389.8998566908129-6.89985669081285
728383.3305391588918-0.330539158891824
739282.06373977231139.93626022768875
7410489.083933635392414.9160663646076
7571100.123648898221-29.1236488982206
766975.6160811804244-6.61608118042437
776769.2758170906191-2.27581709061914
787566.43885893479158.56114106520852
798672.349105794150213.6508942058498
808182.3676193421587-1.36761934215869
818880.26372592515197.73627407484813
828785.5081696531161.49183034688397
837785.712321750451-8.71232175045097
847077.680047249282-7.68004724928198


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8570.480987803835954.449650667900786.512324939771
8669.480987803835948.87891630215190.0830593055207
8768.480987803835944.152261368712792.809714238959
8867.480987803835939.925071746669895.0369038610019
8966.480987803835936.038088967750996.9238866399208
9065.480987803835932.402117367579698.559858240092
9164.480987803835928.9612292301469100.000746377525
9263.480987803835925.6776172011016101.28435840657
9362.480987803835922.5243061507982102.437669456873
9461.480987803835919.481249846121103.480725761551
9560.480987803835916.5330689872271104.428906620445
9659.480987803835913.6676584322899105.294317175382
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/1nhd21282074376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/1nhd21282074376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/2nhd21282074376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/2nhd21282074376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/3a5ny1282074376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282074372axp61eec88rkzs4/3a5ny1282074376.ps (open in new window)


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