Home » date » 2009 » Nov » 29 »

ws 9 decom l

*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: Sun, 29 Nov 2009 06:42:55 -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/Nov/29/t1259502214di00gt9zldyotf5.htm/, Retrieved Sun, 29 Nov 2009 14:43:39 +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/Nov/29/t1259502214di00gt9zldyotf5.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 «
103,63 103,64 103,66 103,77 103,88 103,91 103,91 103,92 104,05 104,23 104,30 104,31 104,31 104,34 104,55 104,65 104,73 104,75 104,75 104,76 104,94 105,29 105,38 105,43 105,43 105,42 105,52 105,69 105,72 105,74 105,74 105,74 105,95 106,17 106,34 106,37 106,37 106,36 106,44 106,29 106,23 106,23 106,23 106,23 106,34 106,44 106,44 106,48 106,50 106,57 106,40 106,37 106,25 106,21 106,21 106,24 106,19 106,08 106,13 106,09
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1103.63103.6321602252840.0177643461137006103.6100754286030.00216022528373117
2103.64103.622559745778-0.0125354309497719103.669975685172-0.0174402542218246
3103.66103.602959142106-0.0128350838466383103.729875941741-0.0570408578939805
4103.77103.758352511154-0.00793685581647832103.789584344663-0.0116474888460516
5103.88103.945745884123-0.0350386317073986103.8492927475840.0657458841229612
6103.91103.970260843801-0.0597790060289853103.9095181622280.06026084380089
7103.91103.940775813935-0.0905193908067089103.9697435768720.0307758139349374
8103.92103.920000547305-0.111193203075876104.0311926557715.47305234022133e-07
9104.05104.033225199640-0.0258669343099870104.092641734670-0.0167748003595278
10104.23104.2132591416430.0889501808931466104.157790677464-0.0167408583574797
11104.3104.2452931568380.131767222903334104.222939620259-0.0547068431624922
12104.31104.2082125856520.117222685884742104.294564728463-0.101787414347996
13104.31104.2360458172190.0177643461137006104.366189836667-0.0739541827810513
14104.34104.249831917181-0.0125354309497719104.442703513769-0.0901680828187637
15104.55104.593617892977-0.0128350838466383104.5192171908700.0436178929769255
16104.65104.703938035553-0.00793685581647832104.6039988202630.053938035553287
17104.73104.806258182051-0.0350386317073986104.6887804496570.0762581820506938
18104.75104.780858357207-0.0597790060289853104.7789206488220.0308583572071939
19104.75104.721458542820-0.0905193908067089104.869060847987-0.0285414571801823
20104.76104.674520732285-0.111193203075876104.956672470791-0.0854792677150158
21104.94104.861582840715-0.0258669343099870105.044284093595-0.0784171592848963
22105.29105.3619121336600.0889501808931466105.1291376854470.0719121336596373
23105.38105.4142414997970.131767222903334105.2139912773000.0342414997971048
24105.43105.4440733663730.117222685884742105.2987039477420.0140733663733528
25105.43105.4588190357020.0177643461137006105.3834166181840.0288190357020426
26105.42105.387375420168-0.0125354309497719105.465160010782-0.0326245798322589
27105.52105.505931680467-0.0128350838466383105.546903403380-0.0140683195331377
28105.69105.763234957268-0.00793685581647832105.6247018985480.0732349572679851
29105.72105.772538237990-0.0350386317073986105.7025003937170.0525382379901771
30105.74105.759915786828-0.0597790060289853105.7798632192010.0199157868279656
31105.74105.713293346122-0.0905193908067089105.857226044685-0.0267066538781222
32105.74105.659661136730-0.111193203075876105.931532066346-0.080338863270427
33105.95105.920028846302-0.0258669343099870106.005838088008-0.0299711536977725
34106.17106.1842864660770.0889501808931466106.0667633530300.0142864660770101
35106.34106.4205441590450.131767222903334106.1276886180520.0805441590447487
36106.37106.4488624043440.117222685884742106.1739149097710.0788624043440649
37106.37106.5020944523960.0177643461137006106.2201412014900.132094452395833
38106.36106.478607968218-0.0125354309497719106.2539274627310.118607968218456
39106.44106.605121359874-0.0128350838466383106.2877137239720.165121359874490
40106.29106.281700611579-0.00793685581647832106.306236244238-0.00829938842142042
41106.23106.170279867204-0.0350386317073986106.324758764504-0.0597201327962722
42106.23106.186207545071-0.0597790060289853106.333571460958-0.0437924549294166
43106.23106.208135233394-0.0905193908067089106.342384157413-0.0218647666064271
44106.23106.220250756307-0.111193203075876106.350942446769-0.00974924369339192
45106.34106.346366198185-0.0258669343099870106.3595007361250.00636619818459394
46106.44106.4242231789530.0889501808931466106.366826640154-0.0157768210472824
47106.44106.3740802329140.131767222903334106.374152544183-0.0659197670862142
48106.48106.4666418913410.117222685884742106.376135422774-0.0133581086591477
49106.5106.6041173525200.0177643461137006106.3781183013660.104117352520376
50106.57106.781119110153-0.0125354309497719106.3714163207970.211119110153035
51106.4106.448120743619-0.0128350838466383106.3647143402280.0481207436191085
52106.37106.415080847972-0.00793685581647832106.3328560078450.0450808479717608
53106.25106.234040956245-0.0350386317073986106.300997675462-0.0159590437545347
54106.21106.214203450072-0.0597790060289853106.2655755559570.00420345007157152
55106.21106.280365954354-0.0905193908067089106.2301534364530.0703659543538038
56106.24106.398149351440-0.111193203075876106.1930438516360.158149351439846
57106.19106.249932667491-0.0258669343099870106.1559342668190.0599326674908411
58106.08105.9544435330580.0889501808931466106.116606286049-0.125556466942172
59106.13106.0509544718180.131767222903334106.077278305279-0.0790455281822346
60106.09106.0267791250810.117222685884742106.035998189035-0.0632208749192813
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/1t8gi1259502173.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/1t8gi1259502173.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/2dgne1259502173.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/2dgne1259502173.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/3g1js1259502173.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/3g1js1259502173.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/4lmxk1259502173.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502214di00gt9zldyotf5/4lmxk1259502173.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