Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 09:40:10 -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/03/t1259858468q8p98lhphr19h5y.htm/, Retrieved Thu, 03 Dec 2009 17:41:13 +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/03/t1259858468q8p98lhphr19h5y.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 «
22 22 20 21 20 21 21 21 19 21 21 22 19 24 22 22 22 24 22 23 24 21 20 22 23 23 22 20 21 21 20 20 17 18 19 19 20 21 20 21 19 22 20 18 16 17 18 19 18 20 21 18 19 19 19 21 19 19 17 16 16 17 16 15 16 16 16 18 19 16 16 16
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
12223.5446215786073-0.17995846712017020.63533688851291.54462157860729
22221.97816685547501.3609835447326920.6608495997923-0.0218331445250257
32018.91171213234210.40192555658609620.6863623110718-1.08828786765789
42121.5252315700014-0.24744237627270520.72221080627130.525231570001392
52019.4720841301929-0.23014343166376920.7580593014708-0.527915869807067
62120.38157199712590.81840272870418820.8000252741699-0.6184280028741
72121.12439440950110.033614343629931620.8419912468690.124394409501079
82120.51381998633960.59339709142769220.8927829222327-0.486180013660423
91917.569912282545-0.51348688014148320.9435745975965-1.43008771745500
102121.7233092515529-0.78848674834432521.06517749679150.723309251552866
112121.7100398173959-0.89682021338238221.18678039598640.710039817395941
122222.9889640682733-0.35198466688555121.36302059861220.988964068273347
131916.6406976658822-0.17995846712017021.5392608012380-2.35930233411779
142424.91561988577811.3609835447326921.72339656948920.915619885778113
152221.69054210567350.40192555658609621.9075323377404-0.309457894326531
162222.2178781052355-0.24744237627270522.02956427103720.21787810523546
172222.0785472273297-0.23014343166376922.15159620433410.078547227329711
182424.95844131755040.81840272870418822.22315595374540.958441317550399
192221.67166995321330.033614343629931622.2947157031568-0.328330046786693
202323.09394720905660.59339709142769222.31265569951570.0939472090566191
212426.1828911842669-0.51348688014148322.33059569587462.18289118426686
222120.5507073513176-0.78848674834432522.2377793970268-0.44929264868243
232018.7518571152035-0.89682021338238222.1449630981789-1.24814288479650
242222.4024325377628-0.35198466688555121.94955212912270.402432537762838
252324.4258173070536-0.17995846712017021.75414116006651.42581730705363
262323.17271323672211.3609835447326921.46630321854520.172713236722132
272222.41960916639010.40192555658609621.17846527702380.419609166390082
282019.3773930358377-0.24744237627270520.8700493404350-0.622606964162326
292121.6685100278175-0.23014343166376920.56163340384620.668510027817526
302120.86920163408990.81840272870418820.3123956372059-0.130798365910085
312019.90322778580450.033614343629931620.0631578705655-0.0967722141954752
322019.51512039597710.59339709142769219.8914825125952-0.484879604022908
331714.7936797255166-0.51348688014148319.7198071546249-2.20632027448341
341817.1274707810189-0.78848674834432519.6610159673254-0.872529218981065
351919.2945954333565-0.89682021338238219.60222478002590.294595433356491
361918.7361712189736-0.35198466688555119.615813447912-0.263828781026426
372020.5505563513221-0.17995846712017019.62940211579810.550556351322108
382121.03598781548751.3609835447326919.60302863977980.0359878154874949
392020.02141927965230.40192555658609619.57665516376160.0214192796523349
402122.7642852271299-0.24744237627270519.48315714914281.76428522712986
411918.8404842971397-0.23014343166376919.3896591345241-0.159515702860340
422223.9184277461470.81840272870418819.26316952514881.91842774614699
432020.82970574059650.033614343629931619.13667991577350.829705740596545
441816.37530755177350.59339709142769219.0312953567988-1.62469244822650
451613.5875760823174-0.51348688014148318.9259107978241-2.41242391768261
461715.9578630157803-0.78848674834432518.8306237325640-1.04213698421970
471818.1614835460784-0.89682021338238218.73533666730400.161483546078419
481919.64484520053-0.35198466688555118.70713946635550.64484520053
491817.5010162017130-0.17995846712017018.6789422654071-0.498983798286968
502019.86203273939171.3609835447326918.7769837158756-0.137967260608271
512122.72304927706990.40192555658609618.87502516634401.72304927706988
521817.2909418732722-0.24744237627270518.9565005030005-0.709058126727808
531919.1921675920068-0.23014343166376919.0379758396570.192167592006772
541918.25092926559820.81840272870418818.9306680056976-0.74907073440178
551919.14302548463190.033614343629931618.82336017173820.143025484631885
562122.83746517232610.59339709142769218.56913773624621.83746517232615
571920.1985715793873-0.51348688014148318.31491530075411.19857157938734
581920.7907006580338-0.78848674834432517.99778609031051.79070065803379
591717.2161633335155-0.89682021338238217.68065687986690.216163333515460
601614.9862901848083-0.35198466688555117.3656944820772-1.01370981519168
611615.1292263828326-0.17995846712017017.0507320842875-0.870773617167373
621715.81790629197991.3609835447326916.8211101632874-1.18209370802010
631615.00658620112660.40192555658609616.5914882422873-0.993413798873386
641513.6364644627282-0.24744237627270516.6109779135445-1.36353553727175
651615.5996758468621-0.23014343166376916.6304675848016-0.400324153137852
661614.54357220579100.81840272870418816.6380250655048-1.45642779420898
671615.32080311016210.033614343629931616.6455825462080-0.67919688983789
681818.72478380691520.59339709142769216.68181910165710.72478380691522
691921.7954312230353-0.51348688014148316.71805565710622.79543122303526
701616.0019013722465-0.78848674834432516.78658537609780.00190137224649334
711616.0417051182929-0.89682021338238216.85511509508940.041705118292942
721615.4128994880585-0.35198466688555116.939085178827-0.587100511941454
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/1epnd1259858408.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/1epnd1259858408.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/26mrq1259858408.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/26mrq1259858408.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/3pncx1259858408.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858468q8p98lhphr19h5y/3pncx1259858408.ps (open in new window)


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