Home » date » 2009 » Dec » 29 »

*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, 29 Dec 2009 03:58:56 -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/29/t1262084522kubsxw35hl9pp74.htm/, Retrieved Tue, 29 Dec 2009 12:02: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/2009/Dec/29/t1262084522kubsxw35hl9pp74.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 8,1
 
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
188.027700987839040.03480090454430757.937498107616650.0277009878390393
28.18.34918123291692-0.03710175138720167.887920518470280.249181232916920
37.77.7891776745385-0.2275206038624077.838342929323910.0891776745384965
47.57.53234823600606-0.3267186704595287.794370434453470.0323482360060563
57.67.55551897166034-0.1059169112433767.75039793958303-0.0444810283396588
67.87.65930050623180.2292579845994397.71144150916877-0.140699493768207
77.87.583082015919430.3444329053260687.6724850787545-0.216917984080571
87.87.69813934599310.2655437692024117.63631688480449-0.101860654006905
97.57.27319641478670.1266548943588217.60014869085448-0.226803585213306
107.57.49768819033439-0.09112462342855777.59343643309417-0.00231180966561340
117.16.90217997832403-0.2889041536578827.58672417533386-0.197820021675974
127.57.302958840275780.07659654376576857.62044461595846-0.197041159724225
137.57.311034038872640.03480090454430757.65416505658306-0.188965961127363
147.67.53873043516155-0.03710175138720167.69837131622565-0.0612695648384447
157.77.88494302799417-0.2275206038624077.742577575868240.184943027994171
167.77.95230335896497-0.3267186704595287.774415311494550.252303358964975
177.98.0996638641225-0.1059169112433767.806253047120870.199663864122505
188.18.187014813624490.2292579845994397.783727201776070.0870148136244913
198.28.294365738242660.3444329053260687.761201356431270.0943657382426641
208.28.446376907349190.2655437692024117.68807932344840.246376907349187
218.28.658387815175640.1266548943588217.614957290465540.458387815175644
227.98.3612135200285-0.09112462342855777.529911103400050.461213520028503
237.37.44403923732331-0.2889041536578827.444864916334570.144039237323308
246.96.366814984191770.07659654376576857.35658847204247-0.533185015808234
256.65.896887067705330.03480090454430757.26831202775036-0.703112932294666
266.76.26118186641252-0.03710175138720167.17591988497468-0.438818133587477
276.96.9439928616634-0.2275206038624077.0835277421990.0439928616634067
2877.31163753562518-0.3267186704595287.015081134834350.311637535625183
297.17.35928238377368-0.1059169112433766.946634527469690.259282383773684
307.27.258837824551080.2292579845994396.911904190849480.0588378245510848
317.16.978393240444670.3444329053260686.87717385422926-0.121606759555330
326.96.694689937294740.2655437692024116.83976629350285-0.205310062705259
3377.070986372864740.1266548943588216.802358732776430.0709863728647449
346.86.93822441909437-0.09112462342855776.752900204334190.138224419094368
356.46.38546247776594-0.2889041536578826.70344167589194-0.014537522234062
366.76.660117957342160.07659654376576856.66328549889207-0.0398820426578359
376.66.54206977356350.03480090454430756.62312932189219-0.0579302264364978
386.46.25947492614454-0.03710175138720166.57762682524266-0.140525073855458
396.36.29539627526928-0.2275206038624076.53212432859313-0.0046037247307229
406.26.24016287930973-0.3267186704595286.48655579114980.0401628793097260
416.56.6649296575369-0.1059169112433766.440987253706480.164929657536899
426.86.930807499710320.2292579845994396.439934515690240.130807499710319
436.86.816685316999930.3444329053260686.438881777674010.0166853169999257
446.46.075640494371410.2655437692024116.45881573642618-0.324359505628594
456.15.594595410462820.1266548943588216.47874969517836-0.505404589537182
465.85.20593157671416-0.09112462342855776.4851930467144-0.594068423285837
476.15.99726775540745-0.2889041536578826.49163639825043-0.102732244592545
487.27.797890870178040.07659654376576856.52551258605620.597890870178035
497.38.005810321593730.03480090454430756.559388773861970.705810321593726
506.97.18683126072828-0.03710175138720166.650270490658920.286831260728281
516.15.68636839640653-0.2275206038624076.74115220745587-0.413631603593468
525.85.07078447632474-0.3267186704595286.85593419413478-0.729215523675256
536.25.53520073042968-0.1059169112433766.9707161808137-0.664799269570318
547.16.880542190822480.2292579845994397.09019982457809-0.219457809177524
557.77.845883626331460.3444329053260687.209683468342480.145883626331456
567.98.20017749921160.2655437692024117.334278731585980.300177499211608
577.77.814471110811690.1266548943588217.458873994829490.114471110811692
587.47.30046340327366-0.09112462342855777.5906612201549-0.0995365967263417
597.57.56645570817757-0.2889041536578827.722448445480310.0664557081775703
6088.063479136275770.07659654376576857.859924319958460.0634791362757712
618.18.167798901019080.03480090454430757.997400194436610.067798901019085
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/166ki1262084332.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/166ki1262084332.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/2jl901262084332.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/2jl901262084332.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/3691z1262084332.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/29/t1262084522kubsxw35hl9pp74/3691z1262084332.ps (open in new window)


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