Home » date » 2009 » Dec » 11 »

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: Fri, 11 Dec 2009 08:57:17 -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/11/t12605470928jk1aqiorx36sp1.htm/, Retrieved Fri, 11 Dec 2009 16:58:17 +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/11/t12605470928jk1aqiorx36sp1.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.3 8.2 8 7.9 7.6 7.6 8.3 8.4 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
 
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
18.38.381696159902560.2776392937925197.940664546304920.081696159902564
28.28.185030743005070.2341555537745267.9808137032204-0.0149692569949327
387.955032029664480.02400511019962538.0209628601359-0.0449679703355192
47.97.97169041532253-0.2328412752169278.06115085989440.0716904153225286
57.67.57168208161353-0.4730209412664348.1013388596529-0.0283179183864704
67.67.58760053614236-0.5277917622653718.14019122612301-0.0123994638576423
78.38.186852318734550.2341040886723308.17904359259312-0.113147681265453
88.48.238628361463450.3468069198157668.21456471872079-0.161371638536552
98.48.307070918027860.2428432371236938.25008584484845-0.0929290819721427
108.48.527591940148470.006036022671697228.266372037179830.127591940148468
118.48.66477968163613-0.1474379111473428.282658229511220.264779681636126
128.68.901613910239050.01550156252106388.282884527239880.301613910239054
138.99.239249881238930.2776392937925198.283110824968550.339249881238933
148.89.057557996656980.2341555537745268.30828644956850.257557996656976
158.38.242532815631930.02400511019962538.33346207416845-0.0574671843680754
167.56.87741119703519-0.2328412752169278.35543007818174-0.622588802964814
177.26.49562285907141-0.4730209412664348.37739808219503-0.704377140928594
187.46.94945509767655-0.5277917622653718.37833666458882-0.450544902323447
198.88.986620664345060.2341040886723308.37927524698260.186620664345062
209.39.862435752444550.3468069198157668.390757327739680.562435752444554
219.39.954917354379550.2428432371236938.402239408496760.654917354379553
228.78.959519582512910.006036022671697228.434444394815390.259519582512914
238.28.08078853001332-0.1474379111473428.46664938113402-0.119211469986679
248.38.107984061892460.01550156252106388.47651437558648-0.192015938107545
258.58.235981336168540.2776392937925198.48637937003894-0.264018663831461
268.68.502494172264130.2341555537745268.46335027396135-0.0975058277358727
278.58.535673711916620.02400511019962538.440321177883750.0356737119166244
288.28.2028342323488-0.2328412752169278.430007042868120.00283423234880686
298.18.25332803341394-0.4730209412664348.419692907852490.153328033413944
307.97.89764343790296-0.5277917622653718.43014832436242-0.00235656209704516
318.68.525292170455320.2341040886723308.44060374087235-0.0747078295446766
328.78.601408423510390.3468069198157668.45178465667384-0.0985915764896106
338.78.694191190400970.2428432371236938.46296557247534-0.00580880959903318
348.58.51751666494280.006036022671697228.47644731238550.0175166649427965
358.48.45750885885167-0.1474379111473428.489929052295670.0575088588516692
368.58.492778644975270.01550156252106388.49171979250366-0.00722135502472732
378.78.628850173495830.2776392937925198.49351053271165-0.0711498265041737
388.78.701498450274730.2341555537745268.464345995950740.00149845027472928
398.68.740813430610540.02400511019962538.435181459189830.140813430610542
408.58.84718098574828-0.2328412752169278.385660289468650.347180985748281
418.38.73688182151897-0.4730209412664348.336139119747460.436881821518973
4288.25047209161098-0.5277917622653718.27731967065440.250472091610977
438.27.947395689766340.2341040886723308.21850022156133-0.252604310233659
448.17.699631129893410.3468069198157668.15356195029082-0.400368870106585
458.17.8685330838560.2428432371236938.08862367902031-0.231466916144003
4687.959416410540350.006036022671697228.03454756678795-0.0405835894596454
477.97.96696645659176-0.1474379111473427.980471454555580.066966456591758
487.97.848360330738570.01550156252106387.93613810674036-0.0516396692614256
4987.830555947282340.2776392937925197.89180475892514-0.169444052717657
5087.93444332022930.2341555537745267.83140112599617-0.0655566797706921
517.98.004997396733180.02400511019962537.77099749306720.104997396733181
5288.54246374306716-0.2328412752169277.690377532149760.542463743067163
537.78.2632633700341-0.4730209412664347.609757571232330.563263370034102
547.27.39969993335546-0.5277917622653717.528091828909920.199699933355455
557.57.319469824740170.2341040886723307.4464260865875-0.180530175259831
567.36.898173540989950.3468069198157667.35501953919429-0.401826459010055
5776.493543771075230.2428432371236937.26361299180108-0.506456228924768
5876.830006510495360.006036022671697227.16395746683294-0.169993489504642
5977.08313596928253-0.1474379111473427.064301941864810.0831359692825284
607.27.370167624692710.01550156252106387.014330812786230.170167624692708
617.37.358001022499840.2776392937925196.964359683707640.0580010224998393
627.16.991620722239120.2341555537745266.97422372398636-0.108379277760884
636.86.59190712553530.02400511019962536.98408776426507-0.208092874464698
646.46.03966181499422-0.2328412752169276.9931794602227-0.360338185005777
656.15.6707497850861-0.4730209412664347.00227115618033-0.429250214913901
666.56.52451746952528-0.5277917622653717.003274292740090.0245174695252803
677.78.161618482027820.2341040886723307.004277429299850.461618482027822
687.98.443593141178380.3468069198157667.009599939005860.543593141178374
697.57.742234314164440.2428432371236937.014922448711870.242234314164437
706.96.771702834023140.006036022671697227.02226114330516-0.128297165976859
716.66.31783807324889-0.1474379111473427.02959983789845-0.282161926751111
726.96.748637850937740.01550156252106387.0358605865412-0.151362149062257
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/1t6ei1260547035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/1t6ei1260547035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/2cdba1260547035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/2cdba1260547035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/3ouc21260547035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605470928jk1aqiorx36sp1/3ouc21260547035.ps (open in new window)


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