Home » date » 2009 » Dec » 10 »

verbetering

*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, 10 Dec 2009 10:07:42 -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/10/t12604648980gp7tdl2axw63rx.htm/, Retrieved Thu, 10 Dec 2009 18:08:23 +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/10/t12604648980gp7tdl2axw63rx.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 «
102.86 102.55 102.28 102.26 102.57 103.08 102.76 102.51 102.87 103.14 103.12 103.16 102.48 102.57 102.88 102.63 102.38 101.69 101.96 102.19 101.87 101.6 101.63 101.22 101.21 101.49 101.64 101.66 101.77 101.82 101.78 101.28 101.29 101.37 101.12 101.51 102.24 102.94 103.09 103.46 103.64 104.39 104.15 105.21 105.8 105.91 105.39 105.46 104.72 103.14 102.63 102.32 101.93 100.62 100.6 99.63 98.9 98.32 99.22 98.81
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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
1102.86103.085471459670.0731892146297798102.5613393257000.225471459669947
2102.55102.551112589115-0.04377717818096102.5926645890660.00111258911509537
3102.28101.966754085832-0.0307439382634395102.623989852431-0.313245914167993
4102.26101.889815981638-0.0209319035555342102.651115921917-0.37018401836157
5102.57102.4428779441030.0188800644945374102.678241991403-0.127122055897331
6103.08103.528165216000-0.0689499181799595102.7007847021800.448165215999566
7102.76102.885452635589-0.0887800485473834102.7233274129580.125452635589411
8102.51102.374200378563-0.0999361373969808102.745735758834-0.135799621436931
9102.87103.014948343729-0.0430924484393207102.7681441047100.144948343729482
10103.14103.517590574046-0.0138632058109881102.7762726317650.377590574046323
11103.12103.3342332448280.121365596352626102.7844011588200.214233244827867
12103.16103.3878064420800.196640115483002102.7355534424370.227806442080208
13102.48102.2001050593160.0731892146297798102.686705726054-0.279894940683832
14102.57102.576139417176-0.04377717818096102.6076377610050.00613941717639932
15102.88103.262174142308-0.0307439382634395102.5285697959550.382174142308372
16102.63102.859174479712-0.0209319035555342102.4217574238430.229174479712071
17102.38102.4261748837740.0188800644945374102.3149450517320.0461748837736025
18101.69101.260580368539-0.0689499181799595102.188369549641-0.429419631461244
19101.96101.946986000997-0.0887800485473834102.061794047551-0.0130139990031637
20102.19102.531792863875-0.0999361373969808101.9481432735220.341792863874502
21101.87101.948599948945-0.0430924484393207101.8344924994940.0785999489448983
22101.6101.455850286774-0.0138632058109881101.758012919037-0.144149713226426
23101.63101.4571010650670.121365596352626101.681533338580-0.172898934933031
24101.22100.5966199511570.196640115483002101.64673993336-0.623380048843075
25101.21100.7348642572300.0731892146297798101.611946528140-0.475135742769538
26101.49101.435740464715-0.04377717818096101.588036713466-0.0542595352851691
27101.64101.746617039471-0.0307439382634395101.5641268987920.106617039470947
28101.66101.791104664448-0.0209319035555342101.5498272391070.131104664448500
29101.77101.9855923560840.0188800644945374101.5355275794220.215592356083889
30101.82102.155838830403-0.0689499181799595101.5531110877770.33583883040302
31101.78102.078085452415-0.0887800485473834101.5706945961320.29808545241508
32101.28101.015917993642-0.0999361373969808101.644018143755-0.264082006357768
33101.29100.905750757062-0.0430924484393207101.717341691377-0.384249242937884
34101.37100.899097992791-0.0138632058109881101.854765213020-0.470902007208849
35101.12100.1264456689850.121365596352626101.992188734662-0.993554331015119
36101.51100.6148404424130.196640115483002102.208519442104-0.895159557587135
37102.24101.9819606358240.0731892146297798102.424850149546-0.258039364175559
38102.94103.181383832347-0.04377717818096102.7423933458340.241383832347367
39103.09103.150807396142-0.0307439382634395103.0599365421210.0608073961420388
40103.46103.510837120658-0.0209319035555342103.4300947828980.0508371206579739
41103.64103.4608669118320.0188800644945374103.800253023674-0.179133088168257
42104.39104.753929478628-0.0689499181799595104.0950204395520.363929478627526
43104.15103.998992193116-0.0887800485473834104.389787855431-0.151007806883740
44105.21106.025943876246-0.0999361373969808104.4939922611510.815943876245598
45105.8107.044895781568-0.0430924484393207104.5981966668721.24489578156769
46105.91107.331425829351-0.0138632058109881104.5024373764601.42142582935124
47105.39106.2519563175990.121365596352626104.4066780860480.861956317599493
48105.46106.608561788640.196640115483002104.1147980958771.14856178864007
49104.72105.5438926796640.0731892146297798103.8229181057060.82389267966424
50103.14102.978936228574-0.04377717818096103.344840949607-0.161063771426356
51102.63102.423980144755-0.0307439382634395102.866763793509-0.206019855245202
52102.32102.362638044278-0.0209319035555342102.2982938592780.0426380442775667
53101.93102.1112960104580.0188800644945374101.7298239250470.181296010458183
54100.62100.129552701452-0.0689499181799595101.179397216728-0.490447298548105
55100.6100.659809540139-0.0887800485473834100.6289705084090.0598095401385308
5699.6399.2821965412-0.0999361373969808100.077739596197-0.347803458799959
5798.998.3165837644543-0.043092448439320799.526508683985-0.583416235545698
5898.3297.676922855797-0.013863205810988198.976940350014-0.643077144202948
5999.2299.89126238760450.12136559635262698.42737201604290.671262387604514
6098.8199.54025298315720.19664011548300297.88310690135980.730252983157214
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/1uznt1260464859.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/1uznt1260464859.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/2dz3a1260464859.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/2dz3a1260464859.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/359pj1260464859.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t12604648980gp7tdl2axw63rx/359pj1260464859.ps (open in new window)


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