Home » date » 2009 » Dec » 04 »

WS9

*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 13:13:58 -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/t1259957728qjpjtnvw1vmjp2x.htm/, Retrieved Fri, 04 Dec 2009 21:15:34 +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/t1259957728qjpjtnvw1vmjp2x.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 «
14,3 14,2 15,9 15,3 15,5 15,1 15 12,1 15,8 16,9 15,1 13,7 14,8 14,7 16 15,4 15 15,5 15,1 11,7 16,3 16,7 15 14,9 14,6 15,3 17,9 16,4 15,4 17,9 15,9 13,9 17,8 17,9 17,4 16,7 16 16,6 19,1 17,8 17,2 18,6 16,3 15,1 19,2 17,7 19,1 18 17,5 17,8 21,1 17,2 19,4 19,8 17,6 16,2 19,5 19,9 20 17,3
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
114.314.5055286346968-0.76991969768246314.86439106298570.205528634696785
214.214.0742534074969-0.55465121408090214.8803978065840-0.125746592503061
315.915.24297850705131.6606169427664614.8964045501822-0.657021492948704
415.315.65911526402350.030687605994215014.91019712998230.359115264023481
515.516.01525357634580.060756713871835714.92398970978240.515253576345803
615.114.37003840244090.89308776421425714.9368738333448-0.729961597559077
71515.6048244048515-0.55458236175882914.94975795690730.604824404851549
812.112.0238279496140-2.7879719411572514.9641439915433-0.076172050386024
915.815.54283116762231.0786388061984814.9785300261793-0.257168832377735
1016.917.69909322749961.1138416652262414.98706510727420.799093227499586
1115.114.65535450316690.54904530846403214.9956001883691-0.444645496833129
1213.713.1263659992336-0.7195495014919214.9931835022583-0.573634000766360
1314.815.379152881535-0.76991969768246314.99076681614750.579152881535
1414.714.9618341393319-0.55465121408090214.99281707474900.261834139331885
151615.34451572388301.6606169427664614.9948673333506-0.655484276117027
1615.415.76481843299940.030687605994215015.00449396100640.364818432999428
171514.92512269746600.060756713871835715.0141205886621-0.074877302533979
1815.515.06481527386070.89308776421425715.0420969619251-0.435184726139331
1915.115.6845090265708-0.55458236175882915.0700733351880.584509026570819
2011.711.057059163064-2.7879719411572515.1309127780932-0.64294083693599
2116.316.32960897280311.0786388061984815.19175222099850.0296089728030591
2216.716.99856943825631.1138416652262415.28758889651750.298569438256269
231514.06752911949940.54904530846403215.3834255720365-0.932470880500558
2414.915.0158368808434-0.7195495014919215.50371262064850.115836880843409
2514.614.3459200284220-0.76991969768246315.6239996692605-0.254079971578037
2615.315.3914385685573-0.55465121408090215.76321264552360.09143856855726
2717.918.23695743544681.6606169427664615.90242562178680.336957435446752
2816.416.7186471745430.030687605994215016.05066521946280.318647174542992
2915.414.54033846898940.060756713871835716.1989048171388-0.859661531010632
3017.918.57000789001270.89308776421425716.33690434577310.670007890012666
3115.915.8796784873515-0.55458236175882916.4749038744074-0.0203215126485254
3213.913.9948576595404-2.7879719411572516.59311428161690.0948576595403772
3317.817.81003650497511.0786388061984816.71132468882640.0100365049751403
3417.917.86691805790481.1138416652262416.8192402768690-0.0330819420951904
3517.417.32379882662440.54904530846403216.9271558649115-0.0762011733755585
3616.717.1024268257636-0.7195495014919217.01712267572830.402426825763591
371615.6628302111373-0.76991969768246317.1070894865451-0.337169788862663
3816.616.5738896773568-0.55465121408090217.1807615367241-0.0261103226432411
3919.119.28494947033041.6606169427664617.25443358690320.184949470330380
4017.818.23840530525120.030687605994215017.33090708875460.438405305251163
4117.216.93186269552210.060756713871835717.4073805906061-0.268137304477925
4218.618.80351402351610.89308776421425717.50339821226960.203514023516099
4316.315.5551665278256-0.55458236175882917.5994158339332-0.744833472174367
4415.115.2799706817059-2.7879719411572517.70800125945140.179970681705861
4519.219.50477450883191.0786388061984817.81658668496960.304774508831944
4617.716.36369738451361.1138416652262417.9224609502602-1.33630261548641
4719.119.62261947598520.54904530846403218.02833521555080.522619475985195
481818.5820931040295-0.7195495014919218.13745639746240.582093104029497
4917.517.5233421183084-0.76991969768246318.24657757937410.0233421183083991
5017.817.8122028066369-0.55465121408090218.34244840744410.0122028066368500
5121.122.10106382171951.6606169427664618.43831923551401.00106382171951
5217.215.87893580594940.030687605994215018.4903765880564-1.32106419405059
5319.420.19680934552950.060756713871835718.54243394059870.796809345529454
5419.820.12522355404610.89308776421425718.58168868173970.325223554046065
5517.617.1336389388782-0.55458236175882918.6209434228806-0.466361061121816
5616.216.5329445808413-2.7879719411572518.65502736031590.332944580841321
5719.519.23224989605031.0786388061984818.6891112977512-0.267750103949677
5819.919.96640748080111.1138416652262418.71975085397260.066407480801125
592020.70056428134190.54904530846403218.75039041019410.700564281341894
6017.316.5407693465616-0.7195495014919218.7787801549303-0.759230653438419
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259957728qjpjtnvw1vmjp2x/1l8bf1259957636.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259957728qjpjtnvw1vmjp2x/1l8bf1259957636.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259957728qjpjtnvw1vmjp2x/4f43k1259957636.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259957728qjpjtnvw1vmjp2x/4f43k1259957636.ps (open in new window)


 
Parameters (Session):
par1 = 0.2 ; par2 = 1 ; par3 = 1 ; par4 = 12 ;
 
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