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 10:24:30 -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/t12599475028e5tknb53cixtp3.htm/, Retrieved Fri, 04 Dec 2009 18:25:07 +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/t12599475028e5tknb53cixtp3.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 «
3.2 1.9 0 0.6 0.2 0.9 2.4 4.7 9.4 12.5 15.8 18.2 16.8 17.3 19.3 17.9 20.2 18.7 20.1 18.2 18.4 18.2 18.9 19.9 21.3 20 19.5 19.6 20.9 21 19.9 19.6 20.9 21.7 22.9 21.5 21.3 23.5 21.6 24.5 22.2 23.5 20.9 20.7 18.1 17.1 14.8 13.8 15.2 16 17.6 15 15 16.3 19.4 21.3 20.5 21.1 21.6 22.6
 
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'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
13.27.60840165608070.956435326458233-2.164836982538934.40840165608070
21.93.977969621047760.611960317885162-0.7899299389329222.07796962104776
30-0.532462231003066-0.05251487367001930.584977104673086-0.532462231003066
40.6-0.25950548872391-0.5492460488251752.00875153754909-0.85950548872391
50.2-2.2465484458311-0.7859775245939843.43252597042509-2.4465484458311
60.9-2.38689985563016-0.6774848998159584.86438475544612-3.28689985563016
72.4-1.00725014139458-0.4889933990725766.29624354046716-3.40725014139458
84.72.05827709532959-0.3752889000767757.71701180474719-2.64172290467041
99.49.72380387459762-0.06158394362483359.137780069027220.323803874597619
1012.514.01455213267780.25270214382441210.73274572349781.51455213267781
1115.818.68530036461760.5869882574140712.32771137796832.88530036461760
1218.221.99271713451370.58300384871185713.82427901677443.7927171345137
1316.817.32271801796120.95643532645823315.32084665558050.522718017961219
1417.317.61770524028350.61196031788516216.37033444183130.31770524028353
1519.321.2326926455880-0.052514873670019317.41982222808211.93269264558795
1617.918.4116668251766-0.54924604882517517.93757922364860.51166682517659
1720.222.7306413053789-0.78597752459398418.45533621921512.53064130537889
1818.719.3854733698770-0.67748489981595818.69201152993890.685473369877034
1920.121.7603065584098-0.48899339907257618.92868684066281.66030655840982
2018.217.7126145814614-0.37528890007677519.0626743186153-0.487385418538562
2118.417.6649221470569-0.061583943624833519.1966617965679-0.735077852943082
2218.216.86604918097670.25270214382441219.2812486751989-1.33395081902333
2318.917.8471761887560.5869882574140719.3658355538299-1.05282381124399
2419.919.73374004474570.58300384871185719.4832561065424-0.166259955254286
2521.322.04288801428680.95643532645823319.60067665925490.74288801428683
262019.60425238239450.61196031788516219.7837872997203-0.39574761760548
2719.519.0856169334843-0.052514873670019319.9668979401857-0.414383066515679
2819.619.5582304872347-0.54924604882517520.1910155615905-0.0417695127653062
2920.922.1708443415987-0.78597752459398420.41513318299531.27084434159872
302122.0773335307296-0.67748489981595820.60015136908641.07733353072960
3119.919.5038238438951-0.48899339907257620.7851695551774-0.396176156104865
3219.618.6189112959071-0.37528890007677520.9563776041697-0.98108870409289
3320.920.7339982904629-0.061583943624833521.1275856531619-0.166001709537067
3421.721.80779383467250.25270214382441221.33950402150310.107793834672481
3522.923.66158935274160.5869882574140721.55142238984430.761589352741613
3621.520.67376504681020.58300384871185721.7432311044779-0.826234953189765
3721.319.70852485443030.95643532645823321.9350398191115-1.59147514556973
3823.524.42901649334150.61196031788516221.95902318877330.929016493341521
3921.621.2695083152349-0.052514873670019321.9830065584351-0.330491684765104
4024.527.8798187467971-0.54924604882517521.66942730202813.37981874679709
4122.223.8301294789729-0.78597752459398421.35584804562101.63012947897294
4223.526.9210871757855-0.67748489981595820.75639772403053.4210871757855
4320.922.1320459966327-0.48899339907257620.15694740243991.23204599663270
4420.722.3170465835931-0.37528890007677519.45824231648371.61704658359312
4518.117.5020467130974-0.061583943624833518.7595372305274-0.597953286902609
4617.115.87129128932640.25270214382441218.0760065668492-1.22870871067365
4714.811.62053583941490.5869882574140717.3924759031710-3.1794641605851
4813.810.05183362190260.58300384871185716.9651625293855-3.7481663780974
4915.212.90571551794170.95643532645823316.5378491556001-2.29428448205830
501614.80844327111640.61196031788516216.5795964109984-1.19155672888355
5117.618.6311712072733-0.052514873670019316.62134366639671.0311712072733
521513.358999009526-0.54924604882517517.1902470392992-1.64100099047401
531513.0268271123923-0.78597752459398417.7591504122016-1.97317288760765
5416.314.9430435719134-0.67748489981595818.3344413279025-1.35695642808658
5519.420.3792611554691-0.48899339907257618.90973224360340.979261155469128
5621.323.4554012939674-0.37528890007677519.51988760610942.15540129396743
5720.520.9315409750096-0.061583943624833520.13004296861530.431540975009579
5821.121.17896369330230.25270214382441220.76833416287330.0789636933023097
5921.621.20638638545460.5869882574140721.4066253571313-0.393613614545377
6022.622.56029458834970.58300384871185722.0567015629385-0.039705411650349
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599475028e5tknb53cixtp3/1d6di1259947468.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599475028e5tknb53cixtp3/1d6di1259947468.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599475028e5tknb53cixtp3/4n7kn1259947468.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599475028e5tknb53cixtp3/4n7kn1259947468.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