Home » date » 2010 » Dec » 28 »

*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, 28 Dec 2010 19:54:27 +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/28/t1293566371bpjr3qxlg8kevqa.htm/, Retrieved Tue, 28 Dec 2010 20:59:32 +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/28/t1293566371bpjr3qxlg8kevqa.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 «
548604 563668 586111 604378 600991 544686 537034 551531 563250 574761 580112 575093 557560 564478 580523 596594 586570 536214 523597 536535 536322 532638 528222 516141 501866 506174 517945 533590 528379 477580 469357 490243 492622 507561 516922 514258 509846 527070 541657 564591 555362 498662 511038 525919 531673 548854 560576 557274 565742
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1548604540405.175168581-8479.35623599274565282.181067412-8198.82483141904
2563668561780.592983302-350.596751246076565906.003767944-1887.40701669769
3586111589391.58109924916300.5924322754566529.8264684763280.58109924907
4604378606904.66415142434774.4977981194567076.8380504572526.66415142361
5600991606301.74564701628056.4047205452567623.8496324385310.74564701645
6544686546736.511180055-25471.2896134083568106.7784333532050.51118005486
7537034534966.285195172-29487.9924294406568589.707234268-2067.71480482782
8551531547941.027065715-13825.0194635688568945.992397854-3589.97293428483
9563250566250.523414435-9052.80097587383569302.2775614393000.52341443498
10574761579695.364101374861.385670162411568965.2502284634934.36410137417
11580112585302.4535847176293.32351979507568628.2228954885190.45358471689
12575093582173.634867109380.849288509993567631.5158443817080.63486710924
13557560556964.547442719-8479.35623599274566634.808793274-595.452557280776
14564478564428.097363433-350.596751246076564878.499387813-49.902636566665
15580523581623.21758537316300.5924322754563122.1899823521100.21758537274
16596594598438.59595698634774.4977981194559974.9062448941844.5959569863
17586570588255.97277201828056.4047205452556827.6225074371685.97277201817
18536214545449.983014616-25471.2896134083552449.3065987929235.98301461595
19523597528611.001739293-29487.9924294406548070.9906901485014.00173929264
20536535543934.98388828-13825.0194635688542960.0355752897399.98388828023
21536322543847.720515445-9052.80097587383537849.0804604297525.72051544464
22532638531965.050910947861.385670162411532449.56341889-672.949089052738
23528222523100.6301028536293.32351979507527050.046377352-5121.36989714659
24516141509870.371601631380.849288509993522030.779109859-6270.62839836924
25501866495199.844393626-8479.35623599274517011.511842367-6666.15560637426
26506174499546.432784956-350.596751246076513152.16396629-6627.56721504376
27517945510296.59147751216300.5924322754509292.816090213-7648.40852248808
28533590525175.51599035734774.4977981194507229.986211523-8414.4840096428
29528379523534.43894662128056.4047205452505167.156332834-4844.56105337938
30477580475581.981612692-25471.2896134083505049.308000717-1998.0183873084
31469357463270.532760841-29487.9924294406504931.459668599-6086.46723915852
32490243487930.015538967-13825.0194635688506381.003924602-2312.9844610329
33492622486466.25279527-9052.80097587383507830.548180604-6155.7472047304
34507561504113.894892413861.385670162411510146.719437425-3447.10510758712
35516922515087.785785966293.32351979507512462.890694245-1834.21421404032
36514258512970.896911376380.849288509993515164.253800114-1287.10308862355
37509846510305.739330011-8479.35623599274517865.616905982459.739330010896
38527070533575.088263791-350.596751246076520915.5084874556505.08826379129
39541657543048.00749879716300.5924322754523965.4000689281391.00749879691
40564591567018.06785547334774.4977981194527389.4343464082427.06785547268
41555362551854.12665556728056.4047205452530813.468623888-3507.87334443314
42498662488102.897210842-25471.2896134083534692.392402566-10559.1027891579
43511038512992.676248196-29487.9924294406538571.3161812441954.67624819628
44525919523166.76122008-13825.0194635688542496.258243489-2752.23877992027
45531673525977.60067014-9052.80097587383546421.200305734-5695.39932985988
46548854546454.825435802861.385670162411550391.788894036-2399.17456419836
47560576560496.2989978676293.32351979507554362.377482338-79.7010021333117
48557274555738.415481802380.849288509993558428.735229688-1535.58451819781
49565742577468.263258955-8479.35623599274562495.09297703711726.2632589553
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/1qmcz1293566062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/1qmcz1293566062.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/2jvbk1293566062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/2jvbk1293566062.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/3jvbk1293566062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293566371bpjr3qxlg8kevqa/3jvbk1293566062.ps (open in new window)


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