Home » date » 2009 » Dec » 01 »

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 13:14:03 -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/t125969849905k7a2aq4vwsliz.htm/, Retrieved Tue, 01 Dec 2009 21:15:04 +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/t125969849905k7a2aq4vwsliz.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 «
105.7 105.7 111.1 82.4 60 107.3 99.3 113.5 108.9 100.2 103.9 138.7 120.2 100.2 143.2 70.9 85.2 133 136.6 117.9 106.3 122.3 125.5 148.4 126.3 99.6 140.4 80.3 92.6 138.5 110.9 119.6 105 109 129.4 148.6 101.4 134.8 143.7 81.6 90.3 141.5 140.7 140.2 100.2 125.7 119.6 134.7 109 116.3 146.9 97.4 89.4 132.1 139.8 129 112.5 121.9 121.7 123.1
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1105.7113.438502657381-1.6547508828906999.61624822550977.73850265738102
2105.7114.539396380605-3.33546746797459100.1960710873708.83939638060477
3111.199.50027492935621.923831121414100.77589394923-11.5997250706440
482.496.1831124324614-32.8580649204433101.47495248798213.7831124324614
56049.9459229325979-32.1199339593318102.174011026734-10.0540770674021
6107.396.911565491651714.7768550793945102.911579428954-10.3884345083483
799.385.27721623263469.67363593619163103.649147831174-14.0227837673654
8113.5114.4832427163948.14175906753394104.3749982160720.983242716394017
9108.9122.129273121205-9.4301217221754105.10084860097013.2292731212050
10100.294.4827473511068-0.450283493536637106.367536142430-5.71725264889322
11103.996.6762238290733.48955248703777107.634223683889-7.2237761709271
12138.7146.27330189447021.8429880104924109.2837100950377.57330189447029
13120.2131.121554376705-1.65475088289069110.93319650618510.9215543767054
14100.291.5100880688712-3.33546746797459112.225379399103-8.68991193112879
15143.2150.95860658656521.923831121414113.5175622920217.75860658656454
1670.960.1294039101292-32.8580649204433114.528661010314-10.7705960898708
1785.286.980174230725-32.1199339593318115.5397597286071.78017423072492
18133134.75393306007014.7768550793945116.4692118605361.75393306006974
19136.6146.1277000713449.67363593619163117.3986639924659.52770007134363
20117.9109.7812234256028.14175906753394117.877017506865-8.11877657439848
21106.3103.674750700911-9.4301217221754118.355371021264-2.62524929908895
22122.3126.446253685369-0.450283493536637118.6040298081684.14625368536892
23125.5128.6577589178913.48955248703777118.8526885950713.15775891789116
24148.4156.24773332276321.8429880104924118.7092786667447.84773332276347
25126.3135.688882144473-1.65475088289069118.5658687384179.38888214447344
2699.684.5048637114989-3.33546746797459118.030603756476-15.0951362885011
27140.4141.38083010405221.923831121414117.4953387745340.980830104051861
2880.376.522063369575-32.8580649204433116.936001550868-3.77793663042502
2992.6100.943269632129-32.1199339593318116.3766643272038.34326963212922
30138.5146.04276264849714.7768550793945116.1803822721097.54276264849668
31110.996.14226384679329.67363593619163115.984100217015-14.7577361532068
32119.6114.6754302332678.14175906753394116.382810699199-4.92456976673306
33105102.648600540792-9.4301217221754116.781521181383-2.35139945920767
34109101.129997978085-0.450283493536637117.320285515452-7.87000202191547
35129.4137.4513976634413.48955248703777117.8590498495218.0513976634411
36148.6156.57243503098221.8429880104924118.7845769585267.97243503098191
37101.484.7446468153604-1.65475088289069119.710104067530-16.6553531846396
38134.8152.143786920774-3.33546746797459120.79168054720117.3437869207736
39143.7143.60291185171421.923831121414121.873257026872-0.097088148285792
4081.673.813929741468-32.8580649204433122.244135178975-7.78607025853192
4190.390.104920628253-32.1199339593318122.615013331079-0.195079371746985
42141.5145.98882743331214.7768550793945122.2343174872944.48882743331151
43140.7149.8727424202999.67363593619163121.8536216435099.17274242029909
44140.2150.7630881765848.14175906753394121.49515275588210.5630881765843
45100.288.6934378539211-9.4301217221754121.136683868254-11.5065621460789
46125.7130.861258975473-0.450283493536637120.9890245180635.16125897547327
47119.6114.8690823450903.48955248703777120.841365167872-4.73091765491023
48134.7126.84297003471221.8429880104924120.714041954795-7.85702996528761
4910999.0680321411727-1.65475088289069120.586718741718-9.93196785882732
50116.3115.322767719634-3.33546746797459120.61269974834-0.977232280365527
51146.9151.23748812362421.923831121414120.6386807549624.33748812362379
5297.4107.133541442349-32.8580649204433120.5245234780949.7335414423494
5389.490.509567758106-32.1199339593318120.4103662012261.10956775810608
54132.1129.41192184833014.7768550793945120.011223072275-2.68807815166954
55139.8150.3142841204849.67363593619163119.61207994332410.5142841204839
56129130.6997201591238.14175906753394119.1585207733431.69972015912262
57112.5115.725160118813-9.4301217221754118.7049616033623.22516011881294
58121.9126.089445527798-0.450283493536637118.1608379657394.18944552779811
59121.7122.2937331848483.48955248703777117.6167143281150.593733184847636
60123.1107.39218042456521.8429880104924116.964831564943-15.707819575435
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969849905k7a2aq4vwsliz/13dld1259698441.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969849905k7a2aq4vwsliz/13dld1259698441.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/01/t125969849905k7a2aq4vwsliz/3njpe1259698441.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969849905k7a2aq4vwsliz/3njpe1259698441.ps (open in new window)


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