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 14:17: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/t1259702330mz0vzk54k47i28x.htm/, Retrieved Tue, 01 Dec 2009 22:18:55 +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/t1259702330mz0vzk54k47i28x.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 «
111.4 87.4 96.8 114.1 110.3 103.9 101.6 94.6 95.9 104.7 102.8 98.1 113.9 80.9 95.7 113.2 105.9 108.8 102.3 99 100.7 115.5 100.7 109.9 114.6 85.4 100.5 114.8 116.5 112.9 102 106 105.3 118.8 106.1 109.3 117.2 92.5 104.2 112.5 122.4 113.3 100 110.7 112.8 109.8 117.3 109.1 115.9 96 99.8 116.8 115.7 99.4 94.3 91 93.2 103.1 94.1 91.8 102.7
 
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
1111.4109.9633460453789.16838097747883103.668272977143-1.43665395462226
287.488.6036736845629-17.1719323623381103.3682586777751.20367368456289
396.896.5973291255034-6.06557350391051103.068244378407-0.202670874496548
4114.1116.4575175488468.9572235623914102.7852588887632.35751754884552
5110.3109.1177022396168.98002436126518102.502273399119-1.18229776038429
6103.9102.9531947416602.60386789529949102.242937363040-0.94680525833968
7101.6106.108694559546-4.89229588650733101.9836013269614.50869455954602
894.691.9733611951045-4.50979903122016101.736437836116-2.62663880489546
995.993.3380328820775-3.0273072273474101.48927434527-2.56196711792253
10104.7102.089402209816.01711529445967101.293482495730-2.61059779019
11102.8104.4207730678990.0815362859103597101.0976906461911.62077306789890
1298.195.1446975631707-0.141240972135107101.196543408964-2.9553024368293
13113.9117.3362228507839.16838097747883101.2953961717383.43622285078314
1480.977.3261746459533-17.1719323623381101.645757716385-3.57382535404668
1595.795.469454242879-6.06557350391051101.996119261032-0.230545757121092
16113.2114.9669397869458.9572235623914102.4758366506641.76693978694486
17105.999.8644215984398.98002436126518102.955554040296-6.03557840156105
18108.8111.5945477593812.60386789529949103.4015843453202.79454775938096
19102.3105.644681236164-4.89229588650733103.8476146503433.34468123616413
209998.2724303495114-4.50979903122016104.237368681709-0.727569650488562
21100.799.8001845142732-3.0273072273474104.627122713074-0.899815485726847
22115.5120.0011044517386.01711529445967104.9817802538024.50110445173834
23100.795.982025919560.0815362859103597105.336437794530-4.71797408044007
24109.9114.270358847045-0.141240972135107105.6708821250914.3703588470446
25114.6114.0262925668709.16838097747883106.005326455651-0.573707433130139
2685.481.6242328066046-17.1719323623381106.347699555734-3.77576719339542
27100.5100.375500848095-6.06557350391051106.690072655816-0.124499151905312
28114.8113.5938241765998.9572235623914107.04895226101-1.20617582340141
29116.5116.6121437725318.98002436126518107.4078318662040.112143772530601
30112.9115.4659500293362.60386789529949107.7301820753642.56595002933602
31102100.839763601983-4.89229588650733108.052532284525-1.16023639801746
32106108.184936219764-4.50979903122016108.3248628114562.18493621976414
33105.3105.030113888960-3.0273072273474108.597193338387-0.269886111039852
34118.8122.821978267456.01711529445967108.7609064380914.02197826744982
35106.1103.1938441762960.0815362859103597108.924619537794-2.90615582370411
36109.3109.743296250230-0.141240972135107108.9979447219050.443296250230148
37117.2116.1603491165059.16838097747883109.071269906016-1.03965088349501
3892.592.9536029288053-17.1719323623381109.2183294335330.453602928805338
39104.2105.100184542861-6.06557350391051109.3653889610490.900184542861098
40112.5106.4690248961608.9572235623914109.573751541448-6.03097510383954
41122.4126.0378615168888.98002436126518109.7821141218473.63786151688795
42113.3114.0179730675062.60386789529949109.9781590371950.717973067505511
4310094.7180919339642-4.89229588650733110.174203952543-5.28190806603577
44110.7115.669011815345-4.50979903122016110.2407872158754.96901181534471
45112.8118.319936748140-3.0273072273474110.3073704792085.5199367481396
46109.8103.4658325358626.01711529445967110.117052169678-6.33416746413765
47117.3124.5917298539410.0815362859103597109.9267338601487.29172985394149
48109.1109.138300545420-0.141240972135107109.2029404267150.038300545420384
49115.9114.1524720292409.16838097747883108.479146993281-1.74752797076010
5096101.895817470474-17.1719323623381107.2761148918645.89581747047399
5199.899.5924907134635-6.06557350391051106.073082790447-0.207509286536492
52116.8120.0371531638228.9572235623914104.6056232737873.23715316382173
53115.7119.2818118816088.98002436126518103.1381637571273.58181188160809
5499.494.53970197321922.60386789529949101.656430131481-4.86029802678078
5594.393.3175993806715-4.89229588650733100.174696505836-0.982400619328544
569187.8460931492642-4.5097990312201698.663705881956-3.15390685073575
5793.292.2745919692715-3.027307227347497.152715258076-0.925408030728548
58103.1104.5508303251126.0171152944596795.63205438042881.45083032511151
5994.194.0070702113080.081536285910359794.1113935027817-0.0929297886920466
6091.891.1365193366132-0.14124097213510792.6047216355219-0.663480663386778
61102.7105.1335692542599.1683809774788391.09804976826212.43356925425908
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/140ek1259702273.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/140ek1259702273.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/242ru1259702273.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/242ru1259702273.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/3ta6t1259702273.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259702330mz0vzk54k47i28x/3ta6t1259702273.ps (open in new window)


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