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:24:05 -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/t12599294770xt9ol192poodb8.htm/, Retrieved Fri, 04 Dec 2009 13:24:43 +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/t12599294770xt9ol192poodb8.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 «
20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
12036620063.7143862608-2808.3622091489223476.6478228881-302.285613739161
22278222990.5155406420-757.58498974511423331.0694491031208.515540642027
31916919944.5576434282-4792.0487187462923185.4910753181775.557643428197
41380715783.0717318002-11227.753087233423058.68135543321976.07173180023
52974329414.78135489617139.3470095556322931.8716355482-328.218645103854
62559124015.69506044194347.982817286222818.3221222719-1575.30493955810
72909627891.40867404157595.8187169629322704.7726089956-1204.59132595850
82648225636.72346571364745.2900034483622581.986530838-845.276534286357
92240520981.83601075021368.9635365693822459.2004526804-1423.16398924980
102704429142.05171744572536.2261181671322409.72216438722098.05171744571
111797017046.8652878660-3467.1091639598722360.2438760939-923.134712134033
121873019579.0612132380-4680.7698129009022561.7085996629849.061213237965
131968419413.1888859169-2808.3622091489222763.1733232320-270.811114083062
141978517339.1060222500-757.58498974511422988.4789674952-2445.89397775005
151847918536.2641069880-4792.0487187462923213.784611758357.2641069879537
16106989335.74994076177-11227.753087233423288.0031464716-1362.25005923823
173195633410.43130925957139.3470095556323362.22168118491454.43130925947
182950631335.73932319134347.982817286223328.27785952251829.73932319132
193450638121.8472451777595.8187169629323294.33403786013615.84724517699
202716526385.06973757934745.2900034483623199.6402589724-779.930262420734
212673628998.08998334601368.9635365693823104.94648008472262.08998334595
222369121916.0678589662536.2261181671322929.7060228669-1774.93214103399
231815717026.6435983108-3467.1091639598722754.4655656491-1130.35640168919
241732816790.3882553098-4680.7698129009022546.3815575911-537.61174469017
251820516880.0646596158-2808.3622091489222338.2975495331-1324.93534038417
262099520510.4540445554-757.58498974511422237.1309451897-484.545955444617
271738217420.0843778999-4792.0487187462922135.964340846438.0843778999224
2893677751.40241540992-11227.753087233422210.3506718235-1615.59758459008
293112432823.91598764387139.3470095556322284.73700280061699.91598764381
302655126290.25183435854347.982817286222463.7653483553-260.748165641526
313065131063.3875891277595.8187169629322642.7936939101412.387589126978
322585924111.33974097024745.2900034483622861.3702555815-1747.66025902985
332510025751.08964617771368.9635365693823079.9468172529651.089646177737
342577825729.36188788292536.2261181671323290.41199395-48.6381121171362
352041820802.2319933127-3467.1091639598723500.8771706471384.231993312736
361868818367.8355848344-4680.7698129009023688.9342280665-320.1644151656
372042419779.3709236630-2808.3622091489223876.9912854859-644.629076336958
382477626249.8168045283-757.58498974511424059.76818521681473.81680452834
391981420177.5036337986-4792.0487187462924242.5450849477363.50363379862
401273812367.2936326127-11227.753087233424336.4594546206-370.706367387262
413156631562.27916615077139.3470095556324430.3738242936-3.72083384926009
423011131473.6609434614347.982817286224400.35623925281362.66094346098
433001928071.84262882507595.8187169629324370.3386542120-1947.15737117495
443193434913.92921795634745.2900034483624208.78077859532979.92921795631
452582626235.8135604521368.9635365693824047.2229029786409.813560451985
462683527388.16280825122536.2261181671323745.6110735817553.162808251192
472020520433.1099197751-3467.1091639598723443.9992441847228.109919775143
481778917223.5734239757-4680.7698129009023035.1963889252-565.426576024318
492052021221.9686754832-2808.3622091489222626.3935336657701.968675483196
502251823587.5942893000-757.58498974511422205.99070044511069.59428929997
511557214150.4608515217-4792.0487187462921785.5878672246-1421.53914847828
521150912698.8137126205-11227.753087233421546.93937461291189.81371262053
532544722446.36210844327139.3470095556321308.2908820011-3000.63789155677
542409022586.22858457254347.982817286221245.7885981413-1503.77141542755
552778626792.89496875557595.8187169629321183.2863142816-993.10503124449
562619526508.07921905314745.2900034483621136.6307774985313.079219053139
572051618573.06122271521368.9635365693821089.9752407154-1942.93877728482
582275921911.21615827442536.2261181671321070.5577235585-847.783841725599
591902820471.9689575584-3467.1091639598721051.14020640151443.96895755837
601697117552.3470150854-4680.7698129009021070.4227978155581.347015085375
612003621790.6568199194-2808.3622091489221089.70538922961754.65681991936
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599294770xt9ol192poodb8/1hcv81259929443.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599294770xt9ol192poodb8/1hcv81259929443.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599294770xt9ol192poodb8/30jd01259929443.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599294770xt9ol192poodb8/30jd01259929443.ps (open in new window)


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