Home » date » 2010 » Dec » 07 »

*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, 07 Dec 2010 19:11:46 +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/07/t129174908336797vh1wwwgygy.htm/, Retrieved Tue, 07 Dec 2010 20:11:28 +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/07/t129174908336797vh1wwwgygy.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 «
13328 12873 14000 13477 14237 13674 13529 14058 12975 14326 14008 16193 14483 14011 15057 14884 15414 14440 14900 15074 14442 15307 14938 17193 15528 14765 15838 15723 16150 15486 15986 15983 15692 16490 15686 18897 16316 15636 17163 16534 16518 16375 16290 16352 15943 16362 16393 19051 16747 16320 17910 16961 17480 17049 16879 17473 16998 17307 17418 20169 17871 17226 19062 17804 19100 18522 18060 18869 18127 18871 18890 21263 19547 18450 20254 19240 20216 19420 19415 20018 18652 19978 19509 21971
 
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'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
11332813297.5417578351-99.338419767827713457.7966619327-30.4582421649211
21287313037.9615016470-831.413411644813539.4519099978164.961501646962
31400013864.9527773806513.94006455648313621.1071580629-135.047222619414
41347713469.1750386704-219.38921865726113704.2141799869-7.8249613295975
51423714331.8262731201354.8525249690713787.321201910894.8262731201448
61367413773.1214053284-297.52500849044813872.403603162099.1214053284093
71352913444.4166159159-343.90262032918813957.4860044133-84.5833840841042
81405814082.2291402892-10.340121363425814044.110981074324.2291402891624
91297512605.4696270984-786.20558483368614130.7359577352-369.530372901550
101432614459.5271309366-30.857341806204814223.3302108696133.527130936556
111400814062.8698206893-362.79428469337114315.924464004154.8698206893114
121619315858.44580779382112.9734253049814414.5807669012-334.554192206217
131448314552.1013499694-99.338419767827714513.237069798469.1013499694054
141401114240.1497023153-831.413411644814613.2637093295229.149702315292
151505714886.7695865829513.94006455648314713.2903488606-170.230413417081
161488415181.6258322494-219.38921865726114805.7633864079297.625832249396
171541415574.9110510758354.8525249690714898.2364239551160.911051075796
181444014199.9446586459-297.52500849044814977.5803498446-240.055341354111
191490015086.9783445952-343.90262032918815056.9242757340186.978344595203
201507415033.2860161002-10.340121363425815125.0541052632-40.7139838997773
211444214477.0216500413-786.20558483368615193.183934792435.0216500412625
221530715383.9444934667-30.857341806204815260.912848339576.9444934667226
231493814910.1525228068-362.79428469337115328.6417618865-27.8474771931706
241719316867.86695350642112.9734253049815405.1596211886-325.133046493625
251552815673.6609392771-99.338419767827715481.6774804908145.660939277068
261476514790.9584499268-831.413411644815570.454961718025.9584499267839
271583815502.8274924982513.94006455648315659.2324429453-335.172507501758
281572315909.8864779058-219.38921865726115755.5027407515186.886477905786
291615016093.3744364733354.8525249690715851.7730385577-56.6255635267462
301548615320.9548660353-297.52500849044815948.5701424551-165.045133964682
311598616270.5353739766-343.90262032918816045.3672463526284.535373976601
321598315843.5566348689-10.340121363425816132.7834864945-139.443365131079
331569215950.0058581973-786.20558483368616220.1997266364258.005858197261
341649016720.8064867039-30.857341806204816290.0508551023230.806486703939
351568615374.8923011253-362.79428469337116359.9019835681-311.107698874735
361889719274.88337886652112.9734253049816406.1431958285377.883378866507
371631616278.9540116789-99.338419767827716452.3844080889-37.0459883210970
381563615625.0619623243-831.413411644816478.3514493205-10.9380376757217
391716317307.7414448914513.94006455648316504.3184905521144.741444891399
401653416764.6848783891-219.38921865726116522.7043402681230.684878389122
411651816140.0572850468354.8525249690716541.0901899842-377.942714953226
421637516480.1826059896-297.52500849044816567.3424025009105.182605989568
431629016330.3080053116-343.90262032918816593.594615017640.3080053115882
441635216076.1325082310-10.340121363425816638.2076131324-275.867491768980
451594315989.3849735865-786.20558483368616682.820611247246.3849735864715
461636216012.0022674927-30.857341806204816742.8550743135-349.997732507338
471639316345.9047473135-362.79428469337116802.8895373799-47.095252686504
481905119116.53297400062112.9734253049816872.493600694565.5329740005509
491674716651.2407557588-99.338419767827716942.0976640091-95.759244241246
501632016451.7913674718-831.413411644817019.6220441730131.791367471847
511791018208.9135111067513.94006455648317097.1464243368298.91351110669
521696116962.0829361777-219.38921865726117179.30628247961.08293617769232
531748017343.6813344086354.8525249690717261.4661406223-136.318665591374
541704917051.6974904720-297.52500849044817343.82751801842.69749047203368
551687916675.7137249147-343.90262032918817426.1888954145-203.286275085331
561747317442.9587924026-10.340121363425817513.3813289608-30.0412075973836
571699817181.6318223266-786.20558483368617600.5737625071183.631822326588
581730716943.1362633167-30.857341806204817701.7210784895-363.863736683266
591741817395.9258902215-362.79428469337117802.8683944718-22.0741097784776
602016920308.72664558732112.9734253049817916.2999291077139.726645587296
611787117811.6069560242-99.338419767827718029.7314637436-59.3930439757823
621722617139.9312064186-831.413411644818143.4822052262-86.0687935813585
631906219352.8269887348513.94006455648318257.2329467087290.826988734807
641780417457.3930290327-219.38921865726118369.9961896245-346.606970967274
651910019362.3880424906354.8525249690718482.7594325404262.388042490576
661852218745.7423966514-297.52500849044818595.7826118390223.742396651411
671806017755.0968291915-343.90262032918818708.8057911377-304.903170808531
681886918929.3683938180-10.340121363425818818.971727545560.3683938179638
691812718111.0679208805-786.20558483368618929.1376639532-15.9320791195169
701887118739.2445928084-30.857341806204819033.6127489978-131.755407191635
711889019004.7064506509-362.79428469337119138.0878340425114.706450650890
722126321177.21056916422112.9734253049819235.8160055308-85.7894308357936
731954719859.7942427487-99.338419767827719333.5441770192312.794242748671
741845018311.6609510351-831.413411644819419.7524606097-138.339048964899
752025420488.0991912433513.94006455648319505.9607442002234.09919124328
761924019138.0601589227-219.38921865726119561.3290597346-101.939841077310
772021620460.4500997620354.8525249690719616.6973752689244.450099762034
781942019467.8895376259-297.52500849044819669.635470864647.8895376258733
791941519451.3290538689-343.90262032918819722.573566460236.3290538689398
802001820273.1542946653-10.340121363425819773.1858266981255.15429466531
811865218266.4074978977-786.20558483368619823.798086936-385.592502102299
821997820115.5306104799-30.857341806204819871.3267313263137.530610479935
831950919461.9389089768-362.79428469337119918.8553757166-47.0610910231808
842197121864.83169447292112.9734253049819964.1948802221-106.168305527102
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/156sz1291749103.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/156sz1291749103.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/256sz1291749103.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/256sz1291749103.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/356sz1291749103.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/356sz1291749103.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/43izr1291749103.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t129174908336797vh1wwwgygy/43izr1291749103.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