Home » date » 2010 » Dec » 09 »

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: Thu, 09 Dec 2010 16:04:29 +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/09/t1291911809qbprww5ngdqst1y.htm/, Retrieved Thu, 09 Dec 2010 17:23:38 +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/09/t1291911809qbprww5ngdqst1y.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 «
31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730 14538
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
13151433892.05458947727051.6120055999622084.33340492292378.05458947716
22707127271.10922510344596.0758829565822274.8148919400200.109225103370
32946228213.73430293618244.9693181067122465.2963789572-1248.26569706394
42610524514.74023984745038.8744571506122656.3853030020-1590.25976015262
52239721246.7432437567699.78252919651622847.4742270468-1150.25675624333
62384322739.17143633861915.0933285501523031.7352351112-1103.82856366137
72170523833.8864347545-3639.8826779300823215.99624317562128.88643475445
81808917879.0296113569-5119.8561487628223418.8265374060-209.970388643131
92076420903.0319316246-2996.6887632609023621.6568316363139.031931624613
102531627104.7562712346-360.26384615682223887.50757492221788.75627123464
111770416187.7645891195-4933.1229073275524153.3583182081-1516.23541088052
121554817386.466335471-10496.592788089424206.12645261841838.46633547100
132802924747.49340737147051.6120055999624258.8945870287-3281.50659262862
142938330024.38203599864596.0758829565824145.5420810448641.38203599861
153643840598.84110683238244.9693181067124032.18957506104160.84110683233
163203435091.59383289545038.8744571506123937.53170995403057.59383289536
172267920815.3436259564699.78252919651623842.8738448471-1863.65637404363
182431922985.65728748521915.0933285501523737.2493839647-1333.34271251482
191800416016.2577548479-3639.8826779300823631.6249230822-1987.74224515213
201753716797.4442660239-5119.8561487628223396.4118827390-739.555733976144
212036620567.4899208652-2996.6887632609023161.1988423957201.489920865180
222278222996.5775136367-360.26384615682222927.6863325201214.577513636737
231916920576.9490846831-4933.1229073275522694.17382264441407.94908468311
241380715452.1636354638-10496.592788089422658.42915262561645.16363546379
252974329811.70351179337051.6120055999622622.684482606768.7035117933301
262559123982.03829290444596.0758829565822603.8858241390-1608.96170709555
272909627361.94351622218244.9693181067122585.0871656712-1734.05648377794
282648225430.17687032895038.8744571506122494.9486725205-1051.82312967115
292240521705.4072914336699.78252919651622404.8101793699-699.592708566368
302704429771.12700531321915.0933285501522401.77966613672727.12700531315
311797017181.1335250265-3639.8826779300822398.7491529035-788.866474973456
321873019989.8262777164-5119.8561487628222590.02987104641259.82627771639
331968419583.3781740716-2996.6887632609022781.3105891893-100.621825928429
341978516943.1827675403-360.26384615682222987.0810786165-2841.81723245971
351847918698.2713392838-4933.1229073275523192.8515680437219.271339283823
36106988636.25838791448-10496.592788089423256.3344001749-2061.74161208552
373195633540.5707620947051.6120055999623319.81723230611584.57076209398
382950631115.89915906084596.0758829565823300.02495798261609.89915906081
393450637486.79799823418244.9693181067123280.23268365922980.79799823413
402716526088.41276321265038.8744571506123202.7127796368-1076.58723678744
412673629647.0245951890699.78252919651623125.19287561452911.02459518897
422369122507.82480585721915.0933285501522959.0818655927-1183.17519414282
431815717160.9118223593-3639.8826779300822792.9708555708-996.088177640744
441732817201.1533049517-5119.8561487628222574.7028438111-126.846695048280
451820517050.2539312095-2996.6887632609022356.4348320514-1154.74606879049
462099520114.5307747300-360.26384615682222235.7330714268-880.46922526996
471738217582.0915965254-4933.1229073275522115.0313108022200.091596525377
4893677051.91086060371-10496.592788089422178.6819274857-2315.08913939629
493112432954.05545023097051.6120055999622242.33254416911830.05545023089
502655126070.41169174484596.0758829565822435.5124252987-480.588308255239
513065130428.33837546518244.9693181067122628.6923064282-222.661624534881
522585923814.68278768585038.8744571506122864.4427551636-2044.31721231417
532510026400.0242669045699.78252919651623100.19320389901300.02426690453
542577826321.11883118761915.0933285501523319.7878402622543.118831187599
552041820936.5002013045-3639.8826779300823539.3824766255518.500201304541
561868818778.6006166378-5119.8561487628223717.25553212590.6006166378138
572042419949.5601756364-2996.6887632609023895.1285876245-474.43982436358
582477625853.8935171027-360.26384615682224058.37032905411077.89351710275
591981420339.5108368439-4933.1229073275524221.6120704837525.510836843885
601273811667.8020744968-10496.592788089424304.7907135926-1070.19792550319
613156631692.41863769867051.6120055999624387.9693567014126.418637698596
623011131253.8208219064596.0758829565824372.10329513741142.82082190602
633001927436.79344831998244.9693181067124356.2372335734-2582.20655168008
643193434617.27228576525038.8744571506124211.85325708422683.27228576522
652582626884.7481902085699.78252919651624067.4692805951058.74819020849
662683527979.91974805821915.0933285501523774.98692339171144.91974805818
672020520567.3781117417-3639.8826779300823482.5045661883362.378111741749
681778917634.3384376205-5119.8561487628223063.5177111423-154.661562379515
692052021392.1579071646-2996.6887632609022644.5308560963872.157907164554
702251823191.6709827781-360.26384615682222204.5928633787673.670982778083
711557214312.4680366664-4933.1229073275521764.6548706611-1259.53196333358
721150912069.3315259217-10496.592788089421445.2612621677560.331525921694
732544722716.52034072587051.6120055999621125.8676536742-2730.47965927418
742409022561.45320544684596.0758829565821022.4709115966-1528.54679455321
752778626407.95651237438244.9693181067120919.0741695190-1378.04348762575
762619526173.89901616515038.8744571506121177.2265266843-21.1009838349019
772051618896.8385869539699.78252919651621435.3788838496-1619.16141304607
782275921867.91091377671915.0933285501521734.9957576732-891.08908622331
791902819661.2700464333-3639.8826779300822034.6126314968633.270046433325
801697116693.6809168466-5119.8561487628222368.1752319163-277.319083153445
812003620366.9509309251-2996.6887632609022701.7378323358330.950930925112
822248522263.0283723961-360.26384615682223067.2354737607-221.971627603878
831873018960.3897921419-4933.1229073275523432.7331151856230.389792141941
841453815752.8598954979-10496.592788089423819.73289259151214.85989549786
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/1kalh1291910664.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/1kalh1291910664.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/2kalh1291910664.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/2kalh1291910664.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/3cj221291910664.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291911809qbprww5ngdqst1y/3cj221291910664.ps (open in new window)


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