Home » date » 2010 » Dec » 29 »

Paper: Decomposition by LOESS

*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: Wed, 29 Dec 2010 16:00:25 +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/Dec/29/t1293638335xzqvwh30r7c9w9k.htm/, Retrieved Wed, 29 Dec 2010 16:58:59 +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/2010/Dec/29/t1293638335xzqvwh30r7c9w9k.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31245 30951 30872 30752 30967 30781 30681 31356 31434 31594 31949 32396 32441 32447 32288 32418 32346 32091 31855 31683 31615 31840 31536 31383 31638 31626 31720 31472 31372 31419 31341 31171 31036 30532 30666 30571 30173 30032 29874 30018 29911 29963 30050 29901 29544 29451 29293 29334 29389 29563
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
13124531756.5620480696158.92312640357330574.5148255268511.562048069587
23095131092.6251090379119.0806115718330690.2942793902141.625109037937
33087230895.713946570342.212320176097930806.073733253623.7139465702785
43075230540.970452450235.852488092342630927.1770594575-211.029547549813
53096730848.726987783236.992626555459231048.2803856613-118.273012216774
63078130415.7807896402-24.242738432728831170.4619487925-365.219210359759
73068130151.0846399455-81.728151869175531292.6435119237-529.915360054485
83135631302.5185849713-4.3653759293527131413.846790958-53.4814150286875
93143431426.4523285206-93.502398513058831535.0500699924-7.54767147936218
103159431635.4391264096-117.95222402925131670.513097619741.4391264095902
113194932174.6759287805-82.652054027441931805.9761252469225.67592878054
123239632867.602402395411.381570483391131913.0160271213471.60240239535
133244132703.0209446008158.92312640357332020.0559289956262.020944600808
143244732707.5038814463119.0806115718332067.4155069819260.503881446282
153228832419.012594855742.212320176097932114.7750849682131.012594855747
163241832699.640712848435.852488092342632100.5067990592281.640712848428
173234632568.768860294236.992626555459232086.2385131503222.768860294233
183209132178.4865139249-24.242738432728832027.756224507887.4865139248977
193185531822.4542160038-81.728151869175531969.2739358654-32.5457839961819
203168331473.5255204979-4.3653759293527131896.8398554314-209.474479502096
213161531499.0966235155-93.502398513058831824.4057749975-115.903376484483
223184032042.3017593443-117.95222402925131755.6504646849202.301759344329
233153631467.7568996551-82.652054027441931686.8951543723-68.2431003448582
243138331123.527746149711.381570483391131631.0906833669-259.472253850272
253163831541.790661235158.92312640357331575.2862123615-96.2093387650348
263162631608.7178207848119.0806115718331524.2015676433-17.2821792151735
273172031924.670756898742.212320176097931473.1169229252204.670756898671
283147231500.849289472235.852488092342631407.298222435428.8492894722149
293137231365.527851498936.992626555459231341.4795219457-6.47214850111413
303141931613.2838648216-24.242738432728831248.9588736111194.28386482158
313134131607.2899265925-81.728151869175531156.4382252766266.289926592533
323117131316.357990812-4.3653759293527131030.0073851174145.357990811957
333103631261.9258535549-93.502398513058830903.5765449582225.925853554905
343053230419.3237506033-117.95222402925130762.6284734259-112.676249396653
353066630792.9716521338-82.652054027441930621.6804018936126.971652133794
363057130637.290007195511.381570483391130493.328422321166.2900071954718
373017329822.1004308478158.92312640357330364.9764427486-350.8995691522
383003229690.8850375507119.0806115718330254.0343508775-341.114962449297
392987429562.695420817642.212320176097930143.0922590063-311.304579182404
403001829952.445203357135.852488092342630047.7023085506-65.5547966429185
412991129832.695015349736.992626555459229952.3123580948-78.3049846503054
422996330075.9631712741-24.242738432728829874.2795671586112.963171274099
433005030385.4813756468-81.728151869175529796.2467762224335.481375646759
442990130081.3873921434-4.3653759293527129724.977983786180.387392143359
452954429527.7932071635-93.502398513058829653.7091913496-16.2067928365141
462945129437.0817290345-117.95222402925129582.8704949948-13.9182709655215
472929329156.6202553875-82.652054027441929512.03179864-136.379744612532
482933429217.380859411111.381570483391129439.2375701055-116.619140588857
492938929252.6335320255158.92312640357329366.443341571-136.366467974531
502956329714.7183407588119.0806115718329292.2010476693151.718340758838
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/1p7ft1293638423.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/1p7ft1293638423.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/2p7ft1293638423.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/2p7ft1293638423.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/3igwe1293638423.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/3igwe1293638423.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/4speh1293638423.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293638335xzqvwh30r7c9w9k/4speh1293638423.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