Home » date » 2009 » Dec » 04 »

*The author of this computation has been verified*
R Software Module: /rwasp_decomposeloess.wasp (opens new window with default values)
Title produced by software: Decomposition by Loess
Date of computation: Fri, 04 Dec 2009 05:23:04 -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/Dec/04/t1259929445yy6i6rekldfmtdb.htm/, Retrieved Fri, 04 Dec 2009 13:24:10 +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/Dec/04/t1259929445yy6i6rekldfmtdb.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 «
1,4816 1,4562 1,4268 1,4088 1,4016 1,3650 1,3190 1,3050 1,2785 1,3239 1,3449 1,2732 1,3322 1,4369 1,4975 1,5770 1,5553 1,5557 1,5750 1,5527 1,4748 1,4718 1,4570 1,4684 1,4227 1,3896 1,3622 1,3716 1,3419 1,3511 1,3516 1,3242 1,3074 1,2999 1,3213 1,2881 1,2611 1,2727 1,2811 1,2684 1,2650 1,2770 1,2271 1,2020 1,1938 1,2103 1,1856 1,1786 1,2015 1,2256 1,2292 1,2037 1,2165 1,2694 1,2938 1,3201 1,3014 1,3119 1,3408 1,2991
 
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'Gwilym Jenkins' @ 72.249.127.135


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
11.48161.54981263254267-0.008776037051270881.422163404508610.0682126325426657
21.45621.490549995694590.00971117285409481.412138831451320.0343499956945852
31.42681.436507357134310.01497838447165641.402114258394030.00970735713430892
41.40881.40177623164380.02194206162896511.39388170672724-0.00702376835620178
51.40161.405025141220550.01252570371901041.385649155060440.00342514122055104
61.3651.330184772545080.02074728569179861.37906794176312-0.0348152274549154
71.3191.254464401856810.01104886967739441.37248672846580-0.0645355981431894
81.3051.242508447383030.000326034311499971.36716551830547-0.06249155261697
91.27851.22267248016583-0.02751678831097581.36184430814515-0.0558275198341696
101.32391.29463909677622-0.01367876241267131.36683966563645-0.0292609032237827
111.34491.32382571119081-0.00586073431857171.37183502312776-0.0210742888091910
121.27321.19144662426480-0.03544713329960051.39040050903480-0.0817533757352034
131.33221.26421004210943-0.008776037051270881.40896599494185-0.0679899578905743
141.43691.434502968479960.00971117285409481.42958585866595-0.002397031520045
151.49751.529815893138290.01497838447165641.450205722390060.0323158931382883
161.5771.665228452219530.02194206162896511.466829486151510.0882284522195294
171.55531.614621046368030.01252570371901041.483453249912960.0593210463680338
181.55571.598131083789500.02074728569179861.492521630518700.0424310837894981
191.5751.637361119198150.01104886967739441.501590011124450.0623611191981548
201.55271.607020135774330.000326034311499971.498053829914170.0543201357743293
211.47481.48259913960709-0.02751678831097581.494517648703890.00779913960708511
221.47181.47785951150484-0.01367876241267131.479419250907830.00605951150483675
231.4571.45553988120679-0.00586073431857171.46432085311178-0.00146011879320684
241.46841.52691783140285-0.03544713329960051.445329301896750.0585178314028547
251.42271.42783828636956-0.008776037051270881.426337750681710.00513828636955815
261.38961.360986383376850.00971117285409481.40850244376905-0.0286136166231452
271.36221.318754478671960.01497838447165641.39066713685639-0.0434455213280445
281.37161.34527660369850.02194206162896511.37598133467253-0.0263233963014997
291.34191.309978763792310.01252570371901041.36129553248868-0.0319212362076911
301.35111.331985667652450.02074728569179861.34946704665575-0.0191143323475509
311.35161.354512569499780.01104886967739441.337638560822820.00291256949978203
321.32421.319496869993880.000326034311499971.32857709569462-0.00470313000611622
331.30741.32280115774457-0.02751678831097581.319515630566410.0154011577445667
341.29991.30168061507310-0.01367876241267131.311798147339570.00178061507310412
351.32131.34438007020585-0.00586073431857171.304080664112730.0230800702058462
361.28811.31599698136205-0.03544713329960051.295650151937550.0278969813620469
371.26111.24375639728889-0.008776037051270881.28721963976238-0.0173436027111109
381.27271.258080787804300.00971117285409481.27760803934160-0.0146192121956967
391.28111.279225176607520.01497838447165641.26799643892082-0.00187482339247835
401.26841.256411806148890.02194206162896511.25844613222214-0.0119881938511075
411.2651.268578470757530.01252570371901041.248895825523460.00357847075752704
421.2771.292102265236420.02074728569179861.241150449071780.015102265236423
431.22711.209746057702510.01104886967739441.23340507262009-0.0173539422974884
441.2021.175613286700430.000326034311499971.22806067898807-0.0263867132995688
451.19381.19240050295493-0.02751678831097581.22271628535604-0.0013994970450677
461.21031.21534046648201-0.01367876241267131.218938295930660.00504046648201184
471.18561.16190042781330-0.00586073431857171.21516030650528-0.0236995721867037
481.17861.17719954879610-0.03544713329960051.21544758450350-0.00140045120389720
491.20151.19604117454955-0.008776037051270881.21573486250172-0.00545882545044951
501.22561.219445452962920.00971117285409481.22204337418299-0.00615454703708052
511.22921.215069729664090.01497838447165641.22835188586425-0.0141302703359072
521.20371.1444225307450.02194206162896511.24103540762604-0.0592774692550002
531.21651.166755366893170.01252570371901041.25371892938782-0.0497446331068296
541.26941.251979813262450.02074728569179861.26607290104575-0.0174201867375514
551.29381.298124257618920.01104886967739441.278426872703690.0043242576189193
561.32011.348417209715170.000326034311499971.291456755973330.0283172097151698
571.30141.325830149068-0.02751678831097581.304486639242970.0244301490680012
581.31191.31918003540027-0.01367876241267131.318298727012400.00728003540026934
591.34081.35534991953674-0.00586073431857171.332110814781830.014549919536742
601.29911.28729027040019-0.03544713329960051.34635686289941-0.0118097295998076
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/13bgj1259929381.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/13bgj1259929381.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/2h87u1259929381.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/2h87u1259929381.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/3ov841259929381.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/3ov841259929381.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/49mfm1259929381.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929445yy6i6rekldfmtdb/49mfm1259929381.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1) #seasonal period
if (par2 != 'periodic') par2 <- as.numeric(par2) #s.window
par3 <- as.numeric(par3) #s.degree
if (par4 == '') par4 <- NULL else par4 <- as.numeric(par4)#t.window
par5 <- as.numeric(par5)#t.degree
if (par6 != '') par6 <- as.numeric(par6)#l.window
par7 <- as.numeric(par7)#l.degree
if (par8 == 'FALSE') par8 <- FALSE else par9 <- TRUE #robust
nx <- length(x)
x <- ts(x,frequency=par1)
if (par6 != '') {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.window=par6, l.degree=par7, robust=par8)
} else {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.degree=par7, robust=par8)
}
m$time.series
m$win
m$deg
m$jump
m$inner
m$outer
bitmap(file='test1.png')
plot(m,main=main)
dev.off()
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$time.series[,'trend']),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$time.series[,'seasonal']),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$time.series[,'remainder']),na.action=na.pass,lag.max = mylagmax,main='Remainder')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Parameters',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Component',header=TRUE)
a<-table.element(a,'Window',header=TRUE)
a<-table.element(a,'Degree',header=TRUE)
a<-table.element(a,'Jump',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,m$win['s'])
a<-table.element(a,m$deg['s'])
a<-table.element(a,m$jump['s'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,m$win['t'])
a<-table.element(a,m$deg['t'])
a<-table.element(a,m$jump['t'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Low-pass',header=TRUE)
a<-table.element(a,m$win['l'])
a<-table.element(a,m$deg['l'])
a<-table.element(a,m$jump['l'])
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,'Seasonal Decomposition by Loess - Time Series Components',6,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,'Seasonal',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Remainder',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]+m$time.series[i,'remainder'])
a<-table.element(a,m$time.series[i,'seasonal'])
a<-table.element(a,m$time.series[i,'trend'])
a<-table.element(a,m$time.series[i,'remainder'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.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