Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 11:15:22 -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/03/t1259864252yzsx4097ucbgxs0.htm/, Retrieved Thu, 03 Dec 2009 19:17: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/03/t1259864252yzsx4097ucbgxs0.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 «
8.1 7.7 7.5 7.6 7.8 7.8 7.8 7.5 7.5 7.1 7.5 7.5 7.6 7.7 7.7 7.9 8.1 8.2 8.2 8.2 7.9 7.3 6.9 6.6 6.7 6.9 7 7.1 7.2 7.1 6.9 7 6.8 6.4 6.7 6.6 6.4 6.3 6.2 6.5 6.8 6.8 6.4 6.1 5.8 6.1 7.2 7.3 6.9 6.1 5.8 6.2 7.1 7.7 7.9 7.7 7.4 7.5 8 8.1 8
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
18.18.39879041351494-0.03711396359245317.838323550077510.298790413514941
27.77.82207879298828-0.2219894501135747.79991065712530.122078792988280
37.57.55617707684427-0.3176748410173477.761497764173080.0561770768442695
47.67.57245126837392-0.1018888371932827.72943756881936-0.0275487316260774
57.87.668725609206460.2338970173279047.69737737346564-0.131274390793544
67.87.581666958363360.3478610487571427.6704719928795-0.218333041636645
77.87.694608295078330.2618250926283047.64356661229337-0.105391704921669
87.57.254522172349980.1246363969116447.62084143073838-0.245477827650022
97.57.49443621136643-0.09255246054981877.59811624918339-0.00556378863357487
107.16.88858905660276-0.2961297031285727.60754064652581-0.211410943397238
117.57.302741901839070.08029305429269677.61696504386823-0.197258098160926
127.57.324083095282930.01883712284132697.65707978187575-0.175916904717073
137.67.53991944370919-0.03711396359245317.69719451988326-0.0600805562908091
147.77.88201863101455-0.2219894501135747.739970819099030.182018631014545
157.77.93492772270255-0.3176748410173477.78274711831480.234927722702549
167.98.11076165705711-0.1018888371932827.791127180136170.210761657057111
178.18.166595740714550.2338970173279047.799507241957550.0665957407145497
188.28.304609472565870.3478610487571427.747529478676980.104609472565873
198.28.442623191975270.2618250926283047.695551715396420.242623191975272
208.28.662461580067280.1246363969116447.612902023021080.462461580067277
217.98.36230012990409-0.09255246054981877.530252330645730.462300129904084
227.37.45129036062526-0.2961297031285727.444839342503310.151290360625257
236.96.360280591346410.08029305429269677.3594263543609-0.539719408653591
246.65.914353849384840.01883712284132697.26680902777384-0.685646150615162
256.76.26292226240568-0.03711396359245317.17419170118678-0.437077737594322
266.96.93239184719101-0.2219894501135747.089597602922560.0323918471910121
2777.312671336359-0.3176748410173477.005003504658350.312671336358996
287.17.34617664490531-0.1018888371932826.955712192287970.246176644905312
297.27.259682102754510.2338970173279046.906420879917590.0596821027545102
307.16.976478475723060.3478610487571426.87566047551979-0.123521524276935
316.96.69327483624970.2618250926283046.844900071122-0.206725163750303
3277.076500355783070.1246363969116446.798863247305280.0765003557830735
336.86.93972603706125-0.09255246054981876.752826423488570.139726037061252
346.46.38887781381601-0.2961297031285726.70725188931257-0.0111221861839930
356.76.658029590570740.08029305429269676.66167735513657-0.0419704094292621
366.66.559460615462320.01883712284132696.62170226169635-0.0405393845376816
376.46.25538679533631-0.03711396359245316.58172716825614-0.144613204663688
386.36.29127126110243-0.2219894501135746.53071818901114-0.00872873889756853
396.26.23796563125120-0.3176748410173476.479709209766140.037965631251204
406.56.64847237986478-0.1018888371932826.45341645732850.148472379864779
416.86.938979277781230.2338970173279046.427123704890860.138979277781233
426.86.808151779982950.3478610487571426.44398717125990.00815177998295358
436.46.077324269742750.2618250926283046.46085063762894-0.322675730257249
446.15.601449121482130.1246363969116446.47391448160622-0.498550878517865
455.85.20557413496632-0.09255246054981876.4869783255835-0.59442586503368
466.15.99688144065977-0.2961297031285726.4992482624688-0.103118559340230
477.27.80818874635320.08029305429269676.51151819935410.608188746353196
487.38.005702651558490.01883712284132696.575460225600190.705702651558486
496.97.19771171174619-0.03711396359245316.639402251846270.297711711746187
506.15.6774338568925-0.2219894501135746.74455559322107-0.422566143107498
515.85.06796590642147-0.3176748410173476.84970893459588-0.732034093578531
526.25.53849237410057-0.1018888371932826.96339646309271-0.661507625899429
537.16.889018991082550.2338970173279047.07708399158954-0.210981008917448
547.77.851573328926250.3478610487571427.200565622316610.151573328926246
557.98.214127654328020.2618250926283047.324047253043680.314127654328017
567.77.820993181219750.1246363969116447.454370421868610.120993181219746
577.47.30785886985628-0.09255246054981877.58469359069354-0.0921411301437214
587.57.57501258395088-0.2961297031285727.721117119177690.0750125839508815
5988.062166298045460.08029305429269677.857540647661840.0621662980454607
608.18.183492382730970.01883712284132697.99767049442770.0834923827309684
6187.89931362239889-0.03711396359245318.13780034119356-0.100686377601111
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/1fqfz1259864120.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/1fqfz1259864120.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/2hbdw1259864120.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/2hbdw1259864120.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/392rr1259864120.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/392rr1259864120.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/4fnq01259864120.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259864252yzsx4097ucbgxs0/4fnq01259864120.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