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 09:23:59 -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/t1259943863bsq8c88jqs0bfdf.htm/, Retrieved Fri, 04 Dec 2009 17:24:28 +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/t1259943863bsq8c88jqs0bfdf.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 «
12,6 15,7 13,2 20,3 12,8 8 0,9 3,6 14,1 21,7 24,5 18,9 13,9 11 5,8 15,5 22,4 31,7 30,3 31,4 20,2 19,7 10,8 13,2 15,1 15,6 15,5 12,7 10,9 10 9,1 10,3 16,9 22 27,6 28,9 31 32,9 38,1 28,8 29 21,8 28,8 25,6 28,2 20,2 17,9 16,3 13,2 8,1 4,5 -0,1 0 2,3 2,8 2,9 0,1 3,5 8,6 13,8
 
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
112.611.24153636549280.40185208207890513.5566115524283-1.35846363450716
215.717.89296395917650.015188882640247613.49184715818332.19296395917649
313.214.0843905072467-1.1114732711850013.42708276393830.884390507246726
420.328.2379608497765-1.0641457784081513.42618492863167.93796084977653
512.813.6315274673084-1.4568145606333613.42528709332500.831527467308387
684.138463782767-1.5931824596614513.4547186768945-3.861536217233
70.9-9.83460143098397-1.8495488294799613.4841502604639-10.7346014309840
83.6-4.96471194576904-1.2629723421403913.4276842879094-8.56471194576904
914.114.74517825830410.08360342634092813.37121831535490.645178258304128
1021.727.95026372098781.9124348967428113.53730138226946.25026372098778
1124.532.61534859551362.6812669553025313.70338444918398.11534859551358
1218.919.53943081947713.2437914849046315.01677769561820.639430819477145
1313.911.06797697586850.40185208207890516.3301709420526-2.83202302413147
14114.192276266094960.015188882640247617.7925348512648-6.80772373390504
155.8-6.54342548929202-1.1114732711850019.2548987604770-12.3434254892920
1615.512.3349236161878-1.0641457784081519.7292221622204-3.16507638381225
1722.426.0532689966696-1.4568145606333620.20354556396383.65326899666957
1831.744.816974690969-1.5931824596614520.176207768692413.1169746909690
1930.342.3006788560589-1.8495488294799620.148869973421112.0006788560589
2031.444.0008302123807-1.2629723421403920.062142129759712.6008302123807
2120.220.34098228756070.08360342634092819.97541428609840.140982287560696
2219.718.2073162907981.9124348967428119.2802488124592-1.49268370920200
2310.80.3336497058774552.6812669553025318.58508333882-10.4663502941225
2413.25.95165089858733.2437914849046317.2045576165081-7.2483491014127
2515.113.97411602372500.40185208207890515.8240318941961-1.12588397627504
2615.616.3293210843090.015188882640247614.85549003305080.729321084308992
2715.518.2245250992796-1.1114732711850013.88694817190542.72452509927961
2812.712.3758452953743-1.0641457784081514.0883004830339-0.324154704625734
2910.98.96716176647097-1.4568145606333614.2896527941624-1.93283823352903
30106.24682117529538-1.5931824596614515.3463612843661-3.75317882470462
319.13.64647905491021-1.8495488294799616.4030697745697-5.45352094508979
3210.33.92398103521132-1.2629723421403917.9389913069291-6.37601896478868
3316.914.24148373437070.08360342634092819.4749128392884-2.65851626562933
342220.85822139258981.9124348967428121.2293437106674-1.14177860741024
3527.629.5349584626512.6812669553025322.98377458204651.93495846265101
3628.929.97801920711623.2437914849046324.57818930797911.07801920711624
373135.42554388400930.40185208207890526.17260403391184.42554388400929
3832.938.5728949329460.015188882640247627.21191618441385.67289493294599
3938.149.0602449362693-1.1114732711850028.251228334915710.9602449362693
4028.830.4392238024025-1.0641457784081528.22492197600561.63922380240252
412931.2581989435378-1.4568145606333628.19861561709552.25819894353782
4221.818.1918441393956-1.5931824596614527.0013383202659-3.60815586060442
4328.833.6454878060437-1.8495488294799625.80406102343624.84548780604374
4425.628.7152896275461-1.2629723421403923.74768271459433.11528962754606
4528.234.62509216790660.08360342634092821.69130440575246.42509216790662
4620.219.19769493175681.9124348967428119.2898701715004-1.00230506824323
4717.916.23029710744912.6812669553025316.8884359372484-1.66970289255094
4816.314.75099398603523.2437914849046314.6052145290602-1.54900601396478
4913.213.67615479704920.40185208207890512.32199312087190.476154797049196
508.15.876314564243340.015188882640247610.3084965531164-2.22368543575666
514.51.81647328582408-1.111473271185008.29499998536092-2.68352671417592
52-0.1-6.53298960627676-1.064145778408157.39713538468491-6.43298960627676
530-5.04245622337555-1.456814560633366.4992707840089-5.04245622337555
542.30.381727004391410-1.593182459661455.81145545527004-1.91827299560859
552.82.32590870294878-1.849548829479965.12364012653118-0.474091297051217
562.92.52529647743295-1.262972342140394.53767586470745-0.374703522567055
570.1-3.835315029224650.0836034263409283.95171160288372-3.93531502922465
583.51.610872682582751.912434896742813.47669242067444-1.88912731741725
598.611.51705980623232.681266955302533.001673238465162.91705980623231
6013.821.73296828783513.243791484904632.623240227260317.93296828783506
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943863bsq8c88jqs0bfdf/1qrrg1259943837.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943863bsq8c88jqs0bfdf/1qrrg1259943837.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943863bsq8c88jqs0bfdf/4p8c11259943837.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943863bsq8c88jqs0bfdf/4p8c11259943837.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.005 ;
 
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