Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 11:58:36 -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/04/t1259953146jwe1f4f5aesfpss.htm/, Retrieved Fri, 04 Dec 2009 19:59:11 +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/04/t1259953146jwe1f4f5aesfpss.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 «
14.9 18.6 19.1 18.8 18.2 18 19 20.7 21.2 20.7 19.6 18.6 18.7 23.8 24.9 24.8 23.8 22.3 21.7 20.7 19.7 18.4 17.4 17 18 23.8 25.5 25.6 23.7 22 21.3 20.7 20.4 20.3 20.4 19.8 19.5 23.1 23.5 23.5 22.9 21.9 21.5 20.5 20.2 19.4 19.2 18.8 18.8 22.6 23.3 23 21.4 19.9 18.8 18.6 18.4 18.6 19.9 19.2 18.4
 
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
114.916.0833782199729-2.1791726087724615.89579438879951.18337821997295
218.618.69242487301882.0694673176828716.43810780929830.0924248730187855
319.118.36921125229542.8503675179074316.9804212297972-0.730788747704608
418.817.44497306885592.6500956044044117.5049313267396-1.35502693114406
518.216.94073517158051.429823404737418.0294414236821-1.25926482841951
61817.29480137462410.17908527007964518.5261133552962-0.705198625375889
71919.228867540342-0.25165282725236219.02278528691040.228867540341984
820.722.4145922042113-0.52814025645747719.51354805224621.71459220421128
921.223.2403164077300-0.84462722531205420.0043108175822.04031640773005
1020.722.3216134160153-1.4086953782675420.48708196225221.62161341601533
1119.619.8829103869749-1.6527634938973320.96985310692240.282910386974915
1218.618.2619966420433-2.3137873459356421.2517907038923-0.338003357956698
1318.718.0454443079102-2.1791726087724621.5337283008623-0.654555692089804
1423.823.94227977293932.0694673176828721.58825290937780.142279772939286
1524.925.30685496419912.8503675179074321.64277751789340.406854964199145
1624.825.40817818031782.6500956044044121.54172621527780.608178180317768
1723.824.72950168260041.429823404737421.44067491266220.929501682600382
1822.323.11723458409910.17908527007964521.30368014582130.817234584099086
1921.722.4849674482720-0.25165282725236221.16668537898030.784967448272038
2020.720.846102110684-0.52814025645747721.08203814577350.146102110684016
2119.719.2472363127455-0.84462722531205420.9973909125666-0.452763687254539
2218.417.2203463982370-1.4086953782675420.9883489800306-1.17965360176305
2317.415.4734564464028-1.6527634938973320.9793070474946-1.92654355359725
241715.2953876028983-2.3137873459356421.0183997430374-1.70461239710173
251817.1216801701923-2.1791726087724621.0574924385802-0.878319829807705
2623.824.38212779281272.0694673176828721.14840488950440.58212779281271
2725.526.91031514166392.8503675179074321.23931734042871.41031514166389
2825.627.15637570337932.6500956044044121.39352869221631.55637570337933
2923.724.42243655125881.429823404737421.54774004400380.722436551258767
302222.15431507073300.17908527007964521.66659965918740.154315070732974
3121.321.0661935528814-0.25165282725236221.7854592743709-0.233806447118567
3220.720.1708749482594-0.52814025645747721.7572653081981-0.529125051740593
3320.419.9155558832868-0.84462722531205421.7290713420252-0.484444116713156
3420.320.3756449519973-1.4086953782675421.63305042627020.0756449519973366
3520.420.9157339833821-1.6527634938973321.53702951051520.515733983382127
3619.820.4199026247389-2.3137873459356421.49388472119670.619902624738923
3719.519.7284326768942-2.1791726087724621.45073993187820.228432676894222
3823.122.70417591829312.0694673176828721.426356764024-0.395824081706881
3923.522.74765888592282.8503675179074321.4019735961698-0.752341114077218
4023.523.00504092643462.6500956044044121.3448634691610-0.49495907356539
4122.923.08242325311041.429823404737421.28775334215220.182423253110425
4221.922.39381536706040.17908527007964521.22709936286000.493815367060378
4321.522.0852074436846-0.25165282725236221.16644538356780.585207443684588
4420.520.4071914971068-0.52814025645747721.1209487593507-0.092808502893206
4520.220.1691750901785-0.84462722531205421.0754521351336-0.0308249098215363
4619.419.2127481933926-1.4086953782675420.9959471848750-0.187251806607435
4719.219.1363212592810-1.6527634938973320.9164422346164-0.0636787407190234
4818.819.1419524241542-2.3137873459356420.77183492178140.341952424154236
4918.819.151944999826-2.1791726087724620.62722760894650.351944999825999
5022.622.66215730763422.0694673176828720.46837537468290.0621573076341981
5123.323.44010934167322.8503675179074320.30952314041940.140109341673163
522323.10047974910532.6500956044044120.24942464649030.100479749105283
5321.421.18085044270141.429823404737420.1893261525612-0.219149557298604
5419.919.41206711096670.17908527007964520.2088476189537-0.487932889033345
5518.817.6232837419062-0.25165282725236220.2283690853462-1.17671625809383
5618.617.4843739654162-0.52814025645747720.2437662910413-1.11562603458380
5718.417.3854637285757-0.84462722531205420.2591634967364-1.01453627142433
5818.618.3235520859379-1.4086953782675420.2851432923296-0.276447914062082
5919.921.1416404059745-1.6527634938973320.31112308792291.24164040597446
6019.220.3543946168567-2.3137873459356420.35939272907891.15439461685671
6118.418.5715102385375-2.1791726087724620.4076623702350.171510238537454
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/14mww1259953114.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/14mww1259953114.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/22r2m1259953114.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/22r2m1259953114.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/3nseo1259953114.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/3nseo1259953114.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/4kbws1259953114.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259953146jwe1f4f5aesfpss/4kbws1259953114.ps (open in new window)


 
Parameters (Session):
par1 = 36 ; par2 = -1.8 ; par3 = 2 ; par4 = 1 ; par5 = 12 ; par6 = MA ; par7 = 0.95 ;
 
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