Home » date » 2009 » Dec » 04 »

WS9 Populaire technieken

*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, 04 Dec 2009 07:14:20 -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/04/t1259936098ezr7tksugeey0l5.htm/, Retrieved Fri, 04 Dec 2009 15:15:03 +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/04/t1259936098ezr7tksugeey0l5.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 «
7.1 6.9 6.8 7.5 7.6 7.8 8.0 8.1 8.2 8.3 8.2 8.0 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.0 8.2 8.1 8.1 8.0 7.9 7.9 8.0 8.0 7.9 8.0 7.7 7.2 7.5 7.3 7.0 7.0 7.0 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.0 8.0 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
17.17.1406906362288-0.2027192572466487.262028621017850.0406906362287929
26.96.93227750320111-0.4762538898337597.343976386632650.0322775032011071
36.86.71136459466571-0.5372887469131587.42592415224745-0.0886354053342933
47.57.308770605368370.1873655081063667.50386388652527-0.191229394631632
57.67.331176590656690.2870197885402297.58180362080308-0.268823409343312
67.87.748410808948440.1966647368377897.65492445421377-0.0515891910515576
788.248119103471190.02383560890435647.728045287624450.248119103471189
88.18.51047646020337-0.1110716715221547.800595211318780.410476460203373
98.28.501405249656230.02544961533065817.87314513501310.301405249656235
108.38.387704117665040.2726931341234267.939602748211530.0877041176650426
118.28.131145755682220.2627938829078168.00606036140996-0.0688542443177758
1287.882480252285540.07151133983581748.04600840787865-0.117519747714462
137.97.91676280289932-0.2027192572466488.085956454347330.0167628028993185
147.67.5567065643309-0.4762538898337598.11954732550286-0.043293435669101
157.67.58415055025477-0.5372887469131588.15313819665839-0.0158494497452342
168.38.217047243564750.1873655081063668.19558724832889-0.0829527564352528
178.48.274943911460380.2870197885402298.23803629999939-0.125056088539615
188.48.341777891122120.1966647368377898.26155737204009-0.058222108877878
198.48.491085947014850.02383560890435648.28507844408080.091085947014852
208.48.63049885261309-0.1110716715221548.280572818909060.23049885261309
218.68.8984831909320.02544961533065818.276067193737340.298483190932005
228.99.239421686089290.2726931341234268.287885179787290.339421686089286
238.89.037502951254940.2627938829078168.299703165837240.237502951254944
248.38.198573595815380.07151133983581748.3299150643488-0.101426404184622
257.56.84259229438628-0.2027192572466488.36012696286037-0.657407705613722
267.26.50484271577571-0.4762538898337598.37141117405805-0.695157284224289
277.46.95459336165743-0.5372887469131588.38269538525573-0.445406638342568
288.89.027655994289720.1873655081063668.384978497603920.227655994289719
299.39.925718601507670.2870197885402298.38726160995210.625718601507666
309.39.992214547224140.1966647368377898.411120715938080.692214547224134
318.78.94118456917160.02383560890435648.434979821924050.241184569171594
328.28.05082570065131-0.1110716715221548.46024597087084-0.149174299348687
338.38.089038264851710.02544961533065818.48551211981763-0.210961735148286
348.58.2532096044930.2726931341234268.47409726138358-0.246790395507006
358.68.474523714142650.2627938829078168.46268240294953-0.125476285857347
368.58.486410253255510.07151133983581748.44207840690867-0.0135897467444881
378.28.18124484637883-0.2027192572466488.42147441086781-0.0187551536211643
388.18.25040438057273-0.4762538898337598.425849509261030.150404380572731
397.97.90706413925891-0.5372887469131588.430224607654250.00706413925890992
408.68.569946825692460.1873655081063668.44268766620118-0.0300531743075432
418.78.657829486711660.2870197885402298.4551507247481-0.042170513288335
428.78.736950091489590.1966647368377898.466385171672620.0369500914895919
438.58.498544772498510.02383560890435648.47761961859713-0.00145522750148785
448.48.42406351517681-0.1110716715221548.487008156345340.0240635151768114
458.58.478153690575790.02544961533065818.49639669409355-0.0218463094242107
468.78.644979281224970.2726931341234268.48232758465161-0.0550207187750331
478.78.668947641882520.2627938829078168.46825847520966-0.0310523581174795
488.68.700729773149560.07151133983581748.427758887014620.100729773149558
498.58.81545995842706-0.2027192572466488.387259298819590.315459958427061
508.38.74180483074841-0.4762538898337598.334449059085350.441804830748413
5188.25564992756205-0.5372887469131588.281638819351110.255649927562047
528.27.993591783751180.1873655081063668.21904270814245-0.206408216248819
538.17.756533614525980.2870197885402298.15644659693379-0.343466385474024
548.17.909102837862850.1966647368377898.09423242529936-0.190897162137153
5587.944146137430710.02383560890435648.03201825366493-0.0558538625692879
567.97.92780588605632-0.1110716715221547.983265785465840.0278058860563188
577.97.84003706740260.02544961533065817.93451331726674-0.059962932597399
5887.84283143499390.2726931341234267.88447543088267-0.157168565006095
5987.902768572593590.2627938829078167.8344375444986-0.0972314274064114
607.97.965622029595830.07151133983581747.762866630568350.0656220295958292
6188.51142354060853-0.2027192572466487.691295716638110.511423540608535
627.78.26560484848164-0.4762538898337597.610649041352120.565604848481636
637.27.40728638084702-0.5372887469131587.530002366066140.207286380847021
647.57.366121682892850.1873655081063667.44651280900078-0.133878317107149
657.36.949956959524340.2870197885402297.36302325193543-0.35004304047566
6676.540797399001950.1966647368377897.26253786416026-0.459202600998051
6776.814111914710550.02383560890435647.1620524763851-0.185888085289450
6877.03353250426728-0.1110716715221547.077539167254870.0335325042672849
697.27.38152452654470.02544961533065816.993025858124640.181524526544697
707.37.349277352130050.2726931341234266.978029513746530.0492773521300478
717.16.974172947723780.2627938829078166.96303316936841-0.125827052276223
726.86.548027308290040.07151133983581746.98046135187414-0.251972691709958
736.46.00482972286678-0.2027192572466486.99788953437987-0.395170277133225
746.15.67191387957526-0.4762538898337597.0043400102585-0.428086120424736
756.56.52649826077604-0.5372887469131587.010790486137120.02649826077604
767.78.170379660342220.1873655081063667.042254831551410.470379660342224
777.98.439261034494070.2870197885402297.07371917696570.539261034494066
787.57.653753923444920.1966647368377897.14958133971730.153753923444918
796.96.550720888626760.02383560890435647.22544350246888-0.349279111373237
806.66.00546426594354-0.1110716715221547.30560740557861-0.59453573405646
816.96.388779075980990.02544961533065817.38577130868835-0.511220924019007
827.77.664415592307860.2726931341234267.46289127356871-0.035584407692137
8388.197194878643110.2627938829078167.540011238449070.197194878643112
8488.308914688821690.07151133983581747.61957397134250.308914688821687
857.77.90358255301073-0.2027192572466487.699136704235920.203582553010731
867.37.29280609047642-0.4762538898337597.78344779935734-0.00719390952358268
877.47.46952985243439-0.5372887469131587.867758894478770.0695298524343899
888.18.058808829541490.1873655081063667.95382566235215-0.0411911704585144
898.38.273087781234240.2870197885402298.03989243022553-0.0269122187657569
908.28.077582911210780.1966647368377898.12575235195143-0.122417088789218
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/11ocv1259936054.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/11ocv1259936054.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/2agz91259936054.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/2agz91259936054.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/3r11o1259936054.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/3r11o1259936054.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/41v901259936054.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936098ezr7tksugeey0l5/41v901259936054.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.005 ;
 
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