Home » date » 2010 » Dec » 13 »

Paper LOESS

*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: Mon, 13 Dec 2010 14:23:20 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r.htm/, Retrieved Mon, 13 Dec 2010 15:22:08 +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/2010/Dec/13/t1292250128e0s3o2mfgi9je6r.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
2 1 -8 -1 1 -1 2 2 1 -1 -2 -2 -1 -8 -4 -6 -3 -3 -7 -9 -11 -13 -11 -9 -17 -22 -25 -20 -24 -24 -22 -19 -18 -17 -11 -11 -12 -10 -15 -15 -15 -13 -8 -13 -9 -7 -4 -4 -2 0
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
121.366747483511021.641241364216070.99201115227291-0.633252516488977
211.36346410984398-0.120561177256760.7570970674127760.363464109843984
3-8-12.4364161822299-4.08576680032270.522182982552643-4.43641618222995
4-1-0.836560464970872-1.406842611235040.2434030762059130.163439535029128
513.01329503885974-0.97791820871892-0.03537683014081712.01329503885974
6-1-0.727579084000505-0.933637779386907-0.3387831366125880.272420915999495
724.03154892742390.610640515660454-0.6421894430843582.03154892742390
825.30702942532356-0.379584414195613-0.927445011127953.30702942532356
913.082512057507880.130188521663667-1.212700579171542.08251205750788
10-1-0.414441958613837-0.0565553697744122-1.529002671611750.585558041386163
11-2-4.661397468734812.50670223278676-1.84530476405196-2.66139746873481
12-2-4.749713033806133.07209461951147-2.32238158570534-2.74971303380613
13-1-0.8417829568573431.64124136421607-2.799458407358720.158217043142657
14-8-12.3998813332516-0.12056117725676-3.47955748949161-4.39988133325163
15-40.245423371947194-4.0857668003227-4.15965657162454.24542337194719
16-6-5.63062249696946-1.40684261123504-4.96253489179550.369377503030536
17-30.743331420685414-0.97791820871892-5.765413211966493.74333142068541
18-31.66949488243869-0.933637779386907-6.735857103051784.66949488243869
19-7-6.904339521523390.610640515660454-7.706300994137070.0956604784766117
20-9-8.5695525537344-0.379584414195613-9.050863032070.430447446265607
21-11-11.73476345166070.130188521663667-10.3954250700029-0.734763451660745
22-13-13.9627795082116-0.0565553697744122-11.980665122014-0.962779508211584
23-11-10.94079705876172.50670223278676-13.56590517402510.0592029412383219
24-9-6.031966344826173.07209461951147-15.04012827468532.96803365517383
25-17-19.12688998887061.64124136421607-16.5143513753455-2.12688998887056
26-22-26.3652416039847-0.12056117725676-17.5141972187586-4.36524160398466
27-25-27.4001901375057-4.0857668003227-18.5140430621716-2.40019013750566
28-20-19.6732362794577-1.40684261123504-18.91992110930730.326763720542331
29-24-27.6962826348381-0.97791820871892-19.3257991564429-3.69628263483815
30-24-27.9266314822545-0.933637779386907-19.1397307383586-3.92663148225446
31-22-25.65697819538610.610640515660454-18.9536623202743-3.65697819538612
32-19-19.3630689092717-0.379584414195613-18.2573466765327-0.363068909271661
33-18-18.56915748887250.130188521663667-17.5610310327911-0.569157488872545
34-17-17.2358633178155-0.0565553697744122-16.7075813124101-0.235863317815475
35-11-8.652570640757662.50670223278676-15.85413159202912.34742935924234
36-11-10.07469149694043.07209461951147-14.99740312257110.925308503059634
37-12-11.50056671110301.64124136421607-14.14067465311310.499433288897032
38-10-6.46913975301016-0.12056117725676-13.41029906973313.53086024698984
39-15-13.2343097133243-4.0857668003227-12.67992348635311.76569028667575
40-15-16.5446022708124-1.40684261123504-12.0485551179525-1.54460227081243
41-15-17.6048950417291-0.97791820871892-11.417186749552-2.60489504172907
42-13-14.4448585954551-0.933637779386907-10.6215036251579-1.44485859545514
43-8-6.784820014896570.610640515660454-9.825820500763881.21517998510343
44-13-16.6636305966229-0.379584414195613-8.95678498918153-3.66363059662285
45-9-10.04243904406450.130188521663667-8.08774947759918-1.04243904406448
46-7-6.75252689785174-0.0565553697744122-7.190917732373840.247473102148256
47-4-4.212616245638262.50670223278676-6.2940859871485-0.212616245638260
48-4-5.713167886709923.07209461951147-5.35892673280155-1.71316788670992
49-2-1.217473885761471.64124136421607-4.42376747845460.782526114238531
5003.57351527138781-0.12056117725676-3.452954094131053.57351527138781
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/18yuo1292250196.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/18yuo1292250196.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/2j7tr1292250196.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/2j7tr1292250196.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/3j7tr1292250196.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/3j7tr1292250196.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/4bybu1292250196.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292250128e0s3o2mfgi9je6r/4bybu1292250196.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