Home » date » 2009 » Dec » 06 »

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: Sun, 06 Dec 2009 13:04:01 -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/06/t12601298831b9f307jy0x9bfq.htm/, Retrieved Sun, 06 Dec 2009 21:04:48 +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/06/t12601298831b9f307jy0x9bfq.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 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
 
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
188.046041796686160.009275982529102097.944682220784740.0460417966861586
28.18.3462837166195-0.04024325273083257.893959536111320.246283716619509
37.77.7865253620793-0.2297622135172067.84323685143790.086525362079299
47.57.52966050022982-0.3279555717395587.798295071509740.02966050022982
57.67.55279582136275-0.1061491129443177.75335329158157-0.0472041786372532
67.87.655549465963630.2308890016575787.71356153237879-0.144450534036366
77.87.578303084424180.3479271423998117.67376977317601-0.221696915575819
87.87.693068114917740.2700216904645287.63691019461774-0.106931885082265
97.57.26783287093770.1321165130028297.60005061605946-0.232167129062294
107.57.49227645585009-0.08565656681435227.59338011096427-0.00772354414991394
117.16.89672005383268-0.2834296597017477.58670960586907-0.203279946167322
127.57.296381377329510.08296621513959487.62065240753089-0.203618622670487
137.57.336128808278180.009275982529102097.65459520919272-0.163871191721818
147.67.54134999789792-0.04024325273083257.69889325483291-0.058650002102083
157.77.8865709130441-0.2297622135172067.743191300473110.186570913044092
167.77.95319079055902-0.3279555717395587.774764781180530.253190790559023
177.98.09981085105636-0.1061491129443177.806338261887960.199810851056361
188.18.185604302176920.2308890016575787.78350669616550.0856043021769208
198.28.291397727157140.3479271423998117.760675130443050.0913977271571422
208.28.442462363984710.2700216904645287.687515945550760.242462363984712
218.28.65352672633870.1321165130028297.614356760658470.453526726338698
227.98.3560530131596-0.08565656681435227.529603553654760.456053013159597
237.37.43857931305071-0.2834296597017477.444850346651040.138579313050708
246.96.360237521294830.08296621513959487.35679626356558-0.539762478705171
256.65.921981836990780.009275982529102097.26874218048011-0.678018163009217
266.76.26380142878903-0.04024325273083257.1764418239418-0.436198571210974
276.96.94562074611371-0.2297622135172067.08414146740350.0456207461137081
2877.31252496653732-0.3279555717395587.015430605202240.31252496653732
297.17.35942936994334-0.1061491129443176.946719743000980.259429369943338
307.27.257427312540620.2308890016575786.91168368580180.057427312540618
317.16.975425228997560.3479271423998116.87664762860263-0.124574771002443
326.96.690775394048060.2700216904645286.83920291548741-0.209224605951942
3377.066125284624970.1321165130028296.80175820237220.0661252846249747
346.86.93306391289954-0.08565656681435226.752592653914810.133063912899542
356.46.38000255424432-0.2834296597017476.70342710545742-0.0199974457556777
366.76.653540494908480.08296621513959486.66349328995193-0.0464595050915211
376.66.567164543024470.009275982529102096.62355947444643-0.0328354569755298
386.46.26209448837782-0.04024325273083256.57814876435302-0.137905511622183
396.36.2970241592576-0.2297622135172066.5327380542596-0.00297584074239854
406.26.2410503096321-0.3279555717395586.486905262107450.041050309632106
416.56.66507664298901-0.1061491129443176.44107246995530.165076642989015
426.86.929396987156230.2308890016575786.439714011186190.129396987156234
436.86.813717305183110.3479271423998116.438355552417070.0137173051831150
446.46.071725951206330.2700216904645286.45825235832914-0.328274048793669
456.15.589734322755960.1321165130028296.47814916424121-0.510265677244038
465.85.20077107108401-0.08565656681435226.48488549573034-0.599228928915987
476.15.99180783248228-0.2834296597017476.49162182721947-0.108192167517722
487.27.791313407980950.08296621513959486.525720376879460.591313407980949
497.38.030905090931450.009275982529102096.559818926539440.730905090931453
506.97.18945082241255-0.04024325273083256.650792430318280.289450822412554
516.15.68799627942009-0.2297622135172066.74176593409711-0.412003720579905
525.85.06916045607112-0.3279555717395586.85879511566844-0.73083954392888
536.25.53032481570455-0.1061491129443176.97582429723976-0.669675184295448
547.16.8811127775190.2308890016575787.08799822082342-0.218887222481000
557.77.851900713193110.3479271423998117.200172144407080.151900713193110
567.98.213231936909670.2700216904645287.31674637262580.313231936909671
577.77.834562886152650.1321165130028297.433320600844520.134562886152647
587.47.329024329522-0.08565656681435227.55663223729235-0.0709756704779974
597.57.60348578596157-0.2834296597017477.679943873740180.103485785961571
6088.109234948390760.08296621513959487.807798836469640.109234948390760
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/1hei91260129838.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/1hei91260129838.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/21c341260129838.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/21c341260129838.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/3z2wu1260129838.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601298831b9f307jy0x9bfq/3z2wu1260129838.ps (open in new window)


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