Home » date » 2009 » Dec » 01 »

Seizoenale decompositie met de Loess techniek

*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: Tue, 01 Dec 2009 12:51:41 -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/01/t1259697173t95vtrqdrr5aqcr.htm/, Retrieved Tue, 01 Dec 2009 20:52: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/2009/Dec/01/t1259697173t95vtrqdrr5aqcr.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 «
8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9 7.7 8 8 7.7 7.3 7.4 8.1 8.3 8.2
 
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
Seasonal731074
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
18.48.218241825609070.2039994336533928.37775874073754-0.181758174390929
28.48.45631184937522-0.02650081854989728.370188969174680.0563118493752199
38.48.62568943959978-0.1883086372115978.362619197611820.225689439599780
48.68.87511299426585-0.03683143198546658.361718437719620.275112994265847
58.99.191203326864930.2479789953076428.360817677827430.291203326864933
68.88.964043244316520.2685491280650398.367407627618440.164043244316522
78.38.13688304038660.0891193822039468.37399757740946-0.163116959613401
87.56.8234800387219-0.2033900588438168.37991002012191-0.676519961278096
97.26.47674389085377-0.4625663536881398.38582246283437-0.723256109146228
107.46.92438481993173-0.5064558235110468.38207100357931-0.475615180068266
118.88.972025855218550.2496546004571938.378319544324260.172025855218552
129.39.843554179408680.3647518017605678.391694018830750.543554179408682
139.39.990932073009360.2039994336533928.405068493337240.690932073009364
148.78.98882426222657-0.02650081854989728.437676556323320.288824262226575
158.28.1180240179022-0.1883086372115978.4702846193094-0.0819759820978021
168.38.15801382399703-0.03683143198546658.47881760798844-0.141986176002971
178.58.264670408024880.2479789953076428.48735059666748-0.235329591975121
188.68.468815764693070.2685491280650398.4626351072419-0.131184235306932
198.58.472960999979750.0891193822039468.4379196178163-0.0270390000202543
208.28.17663117457046-0.2033900588438168.42675888427336-0.023368825429543
218.18.24696820295773-0.4625663536881398.41559815073040.146968202957732
227.97.87883272649662-0.5064558235110468.42762309701443-0.0211672735033819
238.68.510697356244360.2496546004571938.43964804329845-0.0893026437556426
248.78.582526842977070.3647518017605678.45272135526236-0.117473157022927
258.78.730205899120340.2039994336533928.465794667226270.0302058991203413
268.58.54682133700419-0.02650081854989728.47967948154570.0468213370041912
278.48.49474434134645-0.1883086372115978.493564295865140.0947443413464537
288.58.54280840639079-0.03683143198546658.494023025594680.0428084063907921
298.78.657539249368150.2479789953076428.4944817553242-0.0424607506318484
308.78.66782004881890.2685491280650398.46363082311606-0.0321799511811030
318.68.678100726888130.0891193822039468.432779890907920.0781007268881311
328.58.82097793432891-0.2033900588438168.38241212451490.320977934328912
338.38.73052199556626-0.4625663536881398.332044358121880.430521995566258
3488.23166138088492-0.5064558235110468.274794442626130.231661380884921
358.27.932800872412440.2496546004571938.21754452713037-0.267199127587563
368.17.680749543347860.3647518017605678.15449865489157-0.419250456652139
378.17.904547783693830.2039994336533928.09145278265277-0.195452216306165
3887.98872107569708-0.02650081854989728.03777974285282-0.0112789243029248
397.98.00420193415873-0.1883086372115977.984106703052870.104201934158727
407.97.89839009178393-0.03683143198546657.93844134020154-0.00160990821607143
4187.859245027342150.2479789953076427.8927759773502-0.140754972657848
4287.900764924995840.2685491280650397.83068594693912-0.0992350750041577
437.97.942284701268020.0891193822039467.768595916528030.0422847012680228
4488.51626069801739-0.2033900588438167.687129360826420.516260698017391
457.78.25690354856332-0.4625663536881397.605662805124820.556903548563321
467.27.38088922324254-0.5064558235110467.52556660026850.180889223242540
477.57.304875004130610.2496546004571937.4454703954122-0.195124995869389
487.36.879291948239390.3647518017605677.35595625000005-0.420708051760615
4976.529558461758710.2039994336533927.2664421045879-0.470441538241293
5076.85931116838803-0.02650081854989727.16718965016187-0.140688831611972
5177.12037144147576-0.1883086372115977.067937195735840.120371441475759
527.27.42019738490436-0.03683143198546657.016634047081110.220197384904356
537.37.386690106265980.2479789953076426.965330898426380.0866901062659764
547.16.957942332894030.2685491280650396.97350853904093-0.142057667105969
556.86.529194438140580.0891193822039466.98168617965548-0.270805561859424
566.46.01218898278418-0.2033900588438166.99120107605964-0.387811017215824
576.15.66185038122434-0.4625663536881397.0007159724638-0.438149618775664
586.56.49315254802738-0.5064558235110467.01330327548367-0.00684745197262338
597.78.124454821039270.2496546004571937.025890578503540.424454821039268
607.98.351017500302590.3647518017605677.084230697936840.451017500302593
617.57.653429748976460.2039994336533927.142570817370140.153429748976465
626.96.59863518183475-0.02650081854989727.22786563671515-0.301364818165252
636.66.07514818115144-0.1883086372115977.31316045606016-0.52485181884856
646.96.44807727400544-0.03683143198546657.38875415798003-0.451922725994565
657.77.687673144792450.2479789953076427.4643478598999-0.0123268552075455
6688.194417579914450.2685491280650397.537033292020510.194417579914455
6788.301161893654950.0891193822039467.609718724141110.301161893654945
687.77.91623916239845-0.2033900588438167.687150896445370.216239162398446
697.37.29798328493851-0.4625663536881397.76458306874963-0.00201671506149204
707.47.46205579550579-0.5064558235110467.844400028005250.0620557955057937
718.18.026128412281930.2496546004571937.92421698726088-0.0738715877180693
728.38.23150208856790.3647518017605678.00374610967154-0.0684979114321083
738.28.11272533426440.2039994336533928.0832752320822-0.0872746657356007
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/18wbn1259697099.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/18wbn1259697099.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/2swfo1259697099.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/2swfo1259697099.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/358ti1259697099.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697173t95vtrqdrr5aqcr/358ti1259697099.ps (open in new window)


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