Home » date » 2009 » Dec » 04 »

*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 10:56:14 -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/t1259949450hojgk83xb67zebe.htm/, Retrieved Fri, 04 Dec 2009 18:57:37 +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/t1259949450hojgk83xb67zebe.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 «
1,4 1,2 1 1,7 2,4 2 2,1 2 1,8 2,7 2,3 1,9 2 2,3 2,8 2,4 2,3 2,7 2,7 2,9 3 2,2 2,3 2,8 2,8 2,8 2,2 2,6 2,8 2,5 2,4 2,3 1,9 1,7 2 2,1 1,7 1,8 1,8 1,8 1,3 1,3 1,3 1,2 1,4 2,2 2,9 3,1 3,5 3,6 4,4 4,1 5,1 5,8 5,9 5,4 5,5 4,8 3,2 2,7
 
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
11.41.55942714091676-0.06739587499823211.307968734081470.159427140916763
21.21.07214259857022-0.0791886552620311.40704605669181-0.127857401429783
310.544858382977984-0.0509817622801421.50612337930216-0.455141617022016
41.71.794838453131630.002528346427352501.602633200441020.094838453131626
52.42.86481894153070.2360380368894181.699143021579880.464818941530697
621.921691878993110.2845100825386191.79379803846828-0.0783081210068943
72.12.038564790315130.2729821543282081.88845305535667-0.0614352096848729
821.914608275835920.1034803554676371.98191136869645-0.0853917241640829
91.81.510651944339130.01397837362464662.07536968203623-0.289348055660873
102.73.29694815484466-0.04877085422393552.151822699379280.596948154844659
112.32.66324355499968-0.2915192717220102.228275716722330.363243554999683
121.91.8984351834742-0.3756615086458462.27722632517164-0.00156481652579910
1321.74121894137727-0.06739587499823212.32617693362096-0.258781058622731
142.32.30858918526339-0.0791886552620312.370599469998640.00858918526339503
152.83.23595975590383-0.0509817622801422.415022006376310.435959755903832
162.42.351219726892920.002528346427352502.44625192667973-0.0487802731070777
172.31.886480116127440.2360380368894182.47748184698314-0.413519883872559
182.72.60187103310390.2845100825386192.51361888435748-0.0981289668960978
192.72.577261923939970.2729821543282082.54975592173182-0.122738076060025
202.93.113814354688950.1034803554676372.582705289843410.213814354688954
2133.370366968420350.01397837362464662.6156546579550.370366968420353
222.21.81804414794094-0.04877085422393552.63072670628299-0.381955852059055
232.32.24572051711103-0.2915192717220102.64579875461098-0.0542794828889712
242.83.33978214790561-0.3756615086458462.635879360740240.539782147905606
252.83.04143590812873-0.06739587499823212.62595996686950.241435908128734
262.83.09971230658275-0.0791886552620312.579476348679280.299712306582753
272.21.91798903179108-0.0509817622801422.53299273048906-0.282010968208917
282.62.727772748794060.002528346427352502.469698904778590.127772748794059
292.82.957556884042460.2360380368894182.406405079068120.157556884042462
302.52.375285737076520.2845100825386192.34020418038486-0.124714262923477
312.42.253014563970200.2729821543282082.27400328170160-0.146985436029804
322.32.287005394546110.1034803554676372.20951424998626-0.0129946054538932
331.91.640996408104440.01397837362464662.14502521827092-0.259003591895563
341.71.37472913902518-0.04877085422393552.07404171519875-0.325270860974817
3522.28846105959542-0.2915192717220102.003058212126590.288461059595422
362.12.66006748507802-0.3756615086458461.915594023567830.560067485078018
371.71.63926603998916-0.06739587499823211.82812983500907-0.0607339600108354
381.81.92752791689678-0.0791886552620311.751660738365250.127527916896779
391.81.97579012055871-0.0509817622801421.675191641721440.175790120558706
401.81.933282491974980.002528346427352501.664189161597670.133282491974976
411.30.7107752816366750.2360380368894181.65318668147391-0.589224718363325
421.30.579737853632040.2845100825386191.73575206382934-0.72026214636796
431.30.5087003994870170.2729821543282081.81831744618478-0.791299600512984
441.20.2976753433485120.1034803554676371.99884430118385-0.902324656651488
451.40.6066504701924260.01397837362464662.17937115618293-0.793349529807573
462.21.99737987651396-0.04877085422393552.45139097770997-0.202620123486039
472.93.36810847248499-0.2915192717220102.723410799237020.468108472484989
483.13.50068909310929-0.3756615086458463.074972415536560.400689093109287
493.53.64086184316214-0.06739587499823213.426534031836100.140861843162136
503.63.51293357089518-0.0791886552620313.76625508436685-0.0870664291048167
514.44.74500562538254-0.0509817622801424.10597613689760.345005625382543
524.13.97283148898170.002528346427352504.22464016459094-0.127168511018297
535.15.620657770826290.2360380368894184.343304192284290.520657770826293
545.86.900235876393140.2845100825386194.415254041068241.10023587639314
555.97.03981395581960.2729821543282084.48720388985221.13981395581960
565.46.147023623985030.1034803554676374.549496020547330.747023623985033
575.56.374233475132890.01397837362464664.611788151242470.874233475132887
584.84.99364770504374-0.04877085422393554.655123149180190.193647705043742
593.21.99306112460409-0.2915192717220104.69845814711792-1.20693887539591
602.71.05531374047529-0.3756615086458464.72034776817055-1.64468625952471
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259949450hojgk83xb67zebe/1m2uc1259949372.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259949450hojgk83xb67zebe/1m2uc1259949372.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259949450hojgk83xb67zebe/42ya61259949372.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259949450hojgk83xb67zebe/42ya61259949372.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