Home » date » 2009 » Dec » 02 »

*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: Wed, 02 Dec 2009 13:48:25 -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/02/t1259787060lz9umf1etf0c475.htm/, Retrieved Wed, 02 Dec 2009 21:51:05 +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/02/t1259787060lz9umf1etf0c475.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 «
519 517 510 509 501 507 569 580 578 565 547 555 562 561 555 544 537 543 594 611 613 611 594 595 591 589 584 573 567 569 621 629 628 612 595 597 593 590 580 574 573 573 620 626 620 588 566 557 561 549 532 526 511 499 555 565 542 527 510 514 517 508 493 490 469 478 528 534 518 506 502 516
 
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
Seasonal721073
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1519518.9749695639890.314464928651801518.710565507359-0.0250304360106384
2517516.162224935515-4.45397109740664522.291746161892-0.837775064485072
3510508.516146710205-14.3890735266299525.872926816425-1.48385328979487
4509509.251832366483-20.6640124551759529.4121800886930.251832366482972
5501499.320842924032-30.2722762849933532.951433360961-1.67915707596785
6507505.902159719753-28.3537571098513536.451597390098-1.09784028024683
7569573.31680900560324.7314295751616539.9517614192354.31680900560309
8580581.89655465006534.6530481982540543.4503971516811.89655465006501
9578581.80963136174127.2413357541321546.9490328841273.80963136174114
10565567.05825176703612.6755663724671550.2661818604972.05825176703604
11547543.14020529486-2.72353613172679553.583330836867-3.85979470514019
12555552.4274444068321.24078015551372556.331775437654-2.57255559316809
13562564.6053150329060.314464928651801559.0802200384422.60531503290645
14561564.672456404605-4.45397109740664561.7815146928023.6724564046051
15555559.906264179469-14.3890735266299564.4828093471614.90626417946851
16544540.974827192054-20.6640124551759567.689185263122-3.02517280794643
17537533.37671510591-30.2722762849933570.895561179083-3.62328489409003
18543540.237328313584-28.3537571098513574.116428796267-2.76267168641562
19594585.93127401138824.7314295751616577.33729641345-8.06872598861219
20611607.20617690229834.6530481982540580.140774899448-3.79382309770233
21613615.81441086042227.2413357541321582.9442533854462.81441086042150
22611623.81791852703812.6755663724671585.50651510049412.8179185270384
23594602.654759316184-2.72353613172679588.0687768155438.65475931618414
24595598.551776799411.24078015551372590.2074430450763.55177679941050
25591589.3394257967390.314464928651801592.346109274609-1.66057420326081
26589588.810676632366-4.45397109740664593.643294465041-0.189323367634302
27584587.448593871157-14.3890735266299594.9404796554733.44859387115696
28573571.18827203693-20.6640124551759595.475740418246-1.81172796306987
29567568.261275103975-30.2722762849933596.0110011810191.26127510397475
30569570.125884019164-28.3537571098513596.2278730906881.12588401916378
31621620.82382542448224.7314295751616596.444745000357-0.176174575518189
32629626.86856552808934.6530481982540596.478386273657-2.13143447191112
33628632.2466366989127.2413357541321596.5120275469584.24663669891004
34612614.79018747129312.6755663724671596.5342461562392.79018747129339
35595596.167071366206-2.72353613172679596.5564647655211.16707136620573
36597596.1293376530481.24078015551372596.629882191439-0.870662346952258
37593588.9822354539920.314464928651801596.703299617356-4.01776454600792
38590588.082511206351-4.45397109740664596.371459891055-1.91748879364866
39580578.349453361875-14.3890735266299596.039620164754-1.65054663812452
40574574.016831134119-20.6640124551759594.6471813210570.0168311341190019
41573583.017533807634-30.2722762849933593.2547424773610.0175338076338
42573583.68993420594-28.3537571098513590.66382290391110.6899342059405
43620627.19566709437624.7314295751616588.0729033304627.19566709437618
44626632.98669105203734.6530481982540584.360260749716.98669105203669
45620632.11104607691127.2413357541321580.64761816895612.1110460769114
46588587.450195033612.6755663724671575.874238593933-0.549804966400075
47566563.622677112817-2.72353613172679571.100859018909-2.37732288718269
48557547.1839955639591.24078015551372565.575224280528-9.81600443604145
49561561.6359455292020.314464928651801560.0495895421460.635945529202104
50549547.935464815355-4.45397109740664554.518506282051-1.06453518464480
51532529.401650504673-14.3890735266299548.987423021957-2.59834949532683
52526528.705219066406-20.6640124551759543.958793388772.70521906640647
53511513.342112529411-30.2722762849933538.9301637555822.34211252941100
54499491.620819596945-28.3537571098513534.732937512906-7.37918040305499
55555554.73285915460824.7314295751616530.53571127023-0.267140845391964
56565568.3594693983634.6530481982540526.9874824033863.35946939836037
57542533.31941070932727.2413357541321523.439253536541-8.6805892906732
58527520.87435844719412.6755663724671520.450075180338-6.12564155280563
59510505.262639307591-2.72353613172679517.460896824136-4.73736069240908
60514511.7115236690961.24078015551372515.047696175391-2.28847633090447
61517521.0510395447020.314464928651801512.6344955266464.05103954470246
62508509.854763536245-4.45397109740664510.5992075611621.85476353624506
63493491.825153930952-14.3890735266299508.563919595678-1.17484606904765
64490493.410837978845-20.6640124551759507.2531744763313.41083797884488
65469462.329846928009-30.2722762849933505.942429356984-6.67015307199108
66478479.350716068118-28.3537571098513505.0030410417331.35071606811829
67528527.20491769835724.7314295751616504.063652726482-0.79508230164339
68534530.20504617737334.6530481982540503.141905624373-3.79495382262689
69518506.53850572360427.2413357541321502.220158522264-11.4614942763963
70506498.00522269704412.6755663724671501.319210930489-7.99477730295621
71502506.305272793013-2.72353613172679500.4182633387144.30527279301282
72516531.169801251051.24078015551372499.58941859343615.1698012510503
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/1spio1259786903.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/1spio1259786903.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/2jb8h1259786903.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/2jb8h1259786903.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/3grs81259786903.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259787060lz9umf1etf0c475/3grs81259786903.ps (open in new window)


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