Home » date » 2010 » Jun » 02 »

hoofdstuk 10 oef 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 16:04:13 +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/02/t12754948569nzoc2cvz21mhho.htm/, Retrieved Wed, 02 Jun 2010 18:07:40 +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/02/t12754948569nzoc2cvz21mhho.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 «
14861 14583,3 15305,8 17903,9 16379,4 15420,3 17870,5 15912,8 13866,5 17823,2 17872 17420,4 16704,4 15991,2 16583,6 19123,5 17838,7 17209,4 18586,5 16258,1 15141,6 19202,1 17746,5 19090,1 18040,3 17515,5 17751,8 21072,4 17170 19439,5 19795,4 17574,9 16165,4 19464,6 19932,1 19961,2 17343,4 18924,2 18574,1 21350,6 18594,6 19823,1 20844,4 19640,2 17735,4 19813,6 22160 20664,3 17877,4 20906,5 21164,1 21374,4 22952,3 21343,5 23899,3 22392,9 18274,1 22786,7 22321,5 17842,2 16373,5 16087,1 16555,9 17880,2 16764,5 16049 18288,3 17570,4 15133,4 19334,2 19291,8 20176,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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.548494920609622
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1316704.415975.8158653846728.584134615385
1415991.215712.6032081456278.596791854447
1516583.616484.878945730298.721054269834
1619123.519062.927088242060.5729117579613
1717838.717853.7095016888-15.0095016887972
1817209.417246.4186786059-37.0186786059203
1918586.519023.4684337772-436.968433777198
2016258.116785.2061130713-527.106113071311
2115141.614432.4703997837709.129600216274
2219202.118768.6495292439433.45047075607
2317746.519038.1575564771-1291.65755647713
2419090.117837.32342660341252.77657339663
2518040.317798.6693261245241.630673875545
2617515.517268.3651690963247.134830903684
2717751.818023.384180907-271.584180907012
2821072.420398.3217828492674.078217150771
291717019525.608740071-2355.608740071
3019439.517634.51112355271804.98887644726
3119795.420421.8926663952-626.492666395232
3217574.918079.6772667659-504.777266765916
3316165.415739.1888122599426.211187740086
3419464.619920.18862953-455.588629529993
3519932.119702.0632260329230.036773967062
3619961.219335.8707071283625.329292871727
3717343.418953.0649603311-1609.66496033113
3818924.217407.33455139391516.86544860614
3918574.118858.7943575569-284.694357556877
4021350.621226.5410941984124.058905801645
4118594.620052.1452529079-1457.54525290793
4219823.118653.63089748361169.46910251642
4320844.421092.4330723780-248.033072378032
4419640.218957.8008377231682.39916227687
4517735.417268.4726244146466.927375585434
4619813.621471.8050639044-1658.20506390440
472216020594.05065471131565.94934528867
4820664.320960.5993955551-296.299395555103
4917877.420072.2849944677-2194.88499446773
5020906.518205.56436936752700.93563063245
5121164.120306.4806560173857.619343982693
5221374.423300.780655696-1926.38065569601
5322952.321001.72912990711950.5708700929
5421343.521472.5491567965-129.049156796456
5523899.323199.1206621390700.179337861049
5622392.921584.5781181592808.32188184081
5718274.119964.3178769208-1690.2178769208
5822786.722984.4671023938-197.767102393806
5922321.522907.7554969548-586.255496954767
6017842.222093.8308137166-4251.63081371658
6116373.519036.03722044-2662.53722043999
6216087.116912.8117247822-825.711724782237
6316555.917079.3798502057-523.47985020568
6417880.219316.1539570140-1435.95395701402
6516764.517286.0989843835-521.59898438353
661604916400.9464032083-351.946403208338
6718288.318005.2599010760283.040098923953
6817570.416161.91860335231408.48139664768
6915133.414870.8428075410262.557192458968
7019334.218962.0792396619372.120760338057
7119291.819197.948232248493.8517677515956
7220176.718757.05892917141419.64107082863


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7318809.92915796416420.860513848721198.9978020793
7418147.091803651615422.247547067720871.9360602356
7518766.558616005915743.000536692521790.1166953194
7621290.458761693617995.154421374624585.7631020126
7720048.017240714616501.729331975523594.3051494536
7819448.959053068915668.312922046823229.6051840909
7921246.313365423217245.012026564125247.6147042823
8019247.726011110815037.317522531823458.1344996899
8117184.105323465212774.494583610421593.7160633199
8221131.330469152816531.135460961825731.5254773438
8321163.093114840416379.901570512625946.2846591682
8420670.726593861415711.286243774325630.1669439486
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/1xujy1275494650.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/1xujy1275494650.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/2xujy1275494650.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/2xujy1275494650.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/3q4ij1275494650.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754948569nzoc2cvz21mhho/3q4ij1275494650.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