Home » date » 2009 » Dec » 01 »

*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, 01 Dec 2009 05:54:55 -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/01/t1259672142fh1rfk484g5okb0.htm/, Retrieved Tue, 01 Dec 2009 13:56: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/01/t1259672142fh1rfk484g5okb0.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 «
149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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
1149152.66698385047310.4079879535491134.9250281959773.66698385047349
2139141.4560561650291.87369782539419134.6702460095762.45605616502942
3135136.445128871691-0.860592694866098134.4154638231751.44512887169071
4130128.172847633061-2.39899809971772134.226150466657-1.82715236693949
5127125.100568093553-5.13740520369228134.036837110139-1.89943190644675
6122119.797154735546-9.6655992205894133.868444485043-2.2028452644538
7117112.493739678417-12.1937915383646133.700051859947-4.50626032158277
8112108.889935926928-18.3969436656226133.507007738695-3.11006407307224
9113109.486133482456-16.800097099898133.313963617442-3.51386651754441
10149150.33438281475214.4758323022542133.1897848829941.33438281475173
11157160.38263227775020.5517615737048133.0656061485463.38263227774956
12157163.04705185160718.1441468119898132.8088013364036.04705185160685
13147151.04001552219010.4079879535491132.5519965242614.04001552218975
14137139.9582261706661.87369782539419132.1680760039392.95822617066636
15132133.076437211248-0.860592694866098131.7841554836181.07643721124836
16125121.17619147034-2.39899809971772131.222806629378-3.82380852965987
17123120.475947428555-5.13740520369228130.661457775137-2.52405257144520
18117113.738034174900-9.6655992205894129.927565045689-3.26196582509965
19114111.000119222124-12.1937915383646129.193672316241-2.99988077787606
20111112.052856798165-18.3969436656226128.3440868674571.05285679816532
21112113.305595681224-16.800097099898127.4945014186741.30559568122401
22144146.95018216859914.4758323022542126.5739855291462.95018216859950
23150153.79476878667720.5517615737048125.6534696396193.79476878667666
24149155.31306540113818.1441468119898124.5427877868726.31306540113827
25134134.15990611232610.4079879535491123.4321059341250.159906112325501
26123122.1358602288911.87369782539419121.990441945715-0.864139771109308
27116112.311814737561-0.860592694866098120.548777957305-3.68818526243872
28117117.534273936463-2.39899809971772118.8647241632550.534273936462782
29111109.956734834487-5.13740520369228117.180670369205-1.04326516551279
30105104.146515549411-9.6655992205894115.519083671178-0.853484450588894
31102102.336294565213-12.1937915383646113.8574969731520.336294565213038
329595.9051772984638-18.3969436656226112.4917663671590.90517729846377
339391.6740613387318-16.800097099898111.126035761166-1.32593866126821
34124123.44718032711814.4758323022542110.076987370627-0.552819672881512
35130130.42029944620720.5517615737048109.0279389800880.420299446206826
36124121.66247028189218.1441468119898108.193382906118-2.33752971810809
37115112.23318521430310.4079879535491107.358826832148-2.76681478569735
38106103.4548800025031.87369782539419106.671422172103-2.54511999749731
39105104.876575182808-0.860592694866098105.984017512058-0.123424817191861
40105107.015925412413-2.39899809971772105.3830726873052.0159254124129
41101102.355277341141-5.13740520369228104.7821278625521.35527734114058
429595.429348627287-9.6655992205894104.2362505933020.429348627287084
439394.5034182143116-12.1937915383646103.6903733240531.50341821431162
448482.9916256151363-18.3969436656226103.405318050486-1.00837438486366
458787.6798343229784-16.800097099898103.1202627769200.679834322978365
46116114.16055400894514.4758323022542103.363613688800-1.83944599105466
47120115.84127382561420.5517615737048103.606964600681-4.15872617438606
48117111.33216331678818.1441468119898104.523689871222-5.66783668321197
49109102.15159690468810.4079879535491105.440415141763-6.84840309531225
50105101.2816900230031.87369782539419106.844612151602-3.71830997699662
51107106.611783533424-0.860592694866098108.248809161442-0.388216466575614
52109110.657618866613-2.39899809971772109.7413792331051.65761886661276
53109111.903455898924-5.13740520369228111.2339493047682.90345589892405
54108112.985201664979-9.6655992205894112.6803975556104.98520166497903
55107112.066945731912-12.1937915383646114.1268458064535.06694573191206
5699100.809162659482-18.3969436656226115.5877810061411.80916265948156
57103105.751380894068-16.800097099898117.0487162058302.75138089406836
58131129.06442584918914.4758323022542118.459741848557-1.93557415081143
59137133.57747093501020.5517615737048119.870767491285-3.42252906498960
60135130.64194529874718.1441468119898121.213907889264-4.35805470125329
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/1u7nj1259672093.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/1u7nj1259672093.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/2fb2f1259672093.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/2fb2f1259672093.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/35qnk1259672093.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672142fh1rfk484g5okb0/35qnk1259672093.ps (open in new window)


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