Home » date » 2009 » Dec » 16 »

*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, 16 Dec 2009 10:53:53 -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/16/t1260986153ok37gjt95ropcav.htm/, Retrieved Wed, 16 Dec 2009 18:55:58 +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/16/t1260986153ok37gjt95ropcav.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 «
16,2 16,7 18,4 16 16,5 18,2 16,8 17,3 18 19,6 23,3 23,7 20,3 22,8 24,3 21,5 23,5 22,2 20,9 22,2 19,5 21,1 22 19,2 17,8 19,2 19,9 19,6 18,1 20,4 18,1 18,6 17,6 19,4 19,3 18,6 16,9 16,4 19 18,7 17,1 21,5 17,8 18,1 19 18,9 16,8 18,1 15,7 15,1 18,3 16,5 16,9 18,4 16,4 15,7 16,9 16,6 16,7 16,6
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
116.217.7529106330725-1.2407906009621215.88787996788961.55291063307252
216.717.7338339430023-0.64562869385841216.31179475085611.03383394300231
318.418.83475846845811.2295319977193416.73570953382260.43475846845806
41615.1430664977010-0.32972618854979817.1866596908488-0.856933502299022
516.515.7713757163297-0.40898556420470117.6376098478750-0.728624283670342
618.216.98206730045991.3180134444101318.0999192551300-1.21793269954011
716.815.8527594204671-0.81498808285205418.5622286623849-0.94724057953286
817.315.9804923499207-0.40355677869710219.0230644287764-1.31950765007928
91817.0682266648122-0.55212685998006719.4839001951678-0.931773335187778
1019.618.80572020894580.38888742152215920.0053923695320-0.794279791054205
1123.325.16321525614890.9099001999548520.52688454389621.86321525614891
1223.725.86716678733040.54947023054129520.98336298212832.16716678733043
1320.320.4009491806018-1.2407906009621221.43984142036030.100949180601813
1422.824.5372319934486-0.64562869385841221.70839670040981.73723199344863
1524.325.39351602182141.2295319977193421.97695198045931.09351602182139
1621.521.3389218422696-0.32972618854979821.9908043462802-0.161078157730358
1723.525.4043288521037-0.40898556420470122.00465671210101.90432885210365
1822.221.29649621290891.3180134444101321.7854903426809-0.903503787091076
1920.921.0486641095912-0.81498808285205421.56632397326080.148664109591206
2022.223.54268613486-0.40355677869710221.26087064383711.34268613486002
2119.518.5967095455667-0.55212685998006720.9554173144133-0.90329045443325
2221.121.16305076581020.38888742152215920.64806181266760.0630507658102388
232222.74939348912330.9099001999548520.34070631092190.74939348912326
2419.217.77585354923770.54947023054129520.074676220221-1.42414645076228
2517.817.0321444714420-1.2407906009621219.8086461295201-0.76785552855797
2619.219.4528892494031-0.64562869385841219.59273944445530.252889249403150
2719.919.19363524289021.2295319977193419.3768327593904-0.706364757109771
2819.620.307575931795-0.32972618854979819.22215025675480.707575931794977
2918.117.5415178100855-0.40898556420470119.0674677541192-0.558482189914514
3020.420.53618727649741.3180134444101318.94579927909240.136187276497431
3118.118.1908572787864-0.81498808285205418.82413080406570.0908572787863946
3218.618.8998222648226-0.40355677869710218.70373451387450.299822264822637
3317.617.1687886362968-0.55212685998006718.5833382236833-0.431211363703202
3419.419.92037160586270.38888742152215918.49074097261520.520371605862675
3519.319.29195607849810.9099001999548518.3981437215471-0.00804392150191191
3618.618.27882718903470.54947023054129518.371702580424-0.321172810965301
3716.916.6955291616612-1.2407906009621218.3452614393010-0.204470838338835
3816.415.0851952227374-0.64562869385841218.360433471121-1.31480477726258
391918.39486249933961.2295319977193418.3756055029410-0.605137500660366
4018.719.3622526741488-0.32972618854979818.36747351440100.662252674148828
4117.116.2496440383438-0.40898556420470118.3593415258609-0.850355961656213
4221.523.38439353715971.3180134444101318.29759301843021.88439353715971
4317.818.1791435718526-0.81498808285205418.23584451099940.379143571852644
4418.118.4829281561925-0.40355677869710218.12062862250460.382928156192513
451920.5467141259703-0.55212685998006718.00541273400981.5467141259703
4618.919.56301564584980.38888742152215917.84809693262810.663015645849786
4716.814.99931866879880.9099001999548517.6907811312463-1.80068133120119
4818.118.13675040792960.54947023054129517.51377936152920.0367504079295529
4915.715.3040130091502-1.2407906009621217.3367775918120-0.395986990849849
5015.113.6632164232756-0.64562869385841217.1824122705828-1.43678357672439
5118.318.34242105292701.2295319977193417.02804694935360.0424210529270255
5216.516.3949103896600-0.32972618854979816.9348157988898-0.105089610339974
5316.917.3674009157788-0.40898556420470116.84158464842590.467400915778793
5418.418.73149837705731.3180134444101316.75048817853250.331498377057336
5516.416.9555963742129-0.81498808285205416.65939170863920.55559637421289
5615.715.2285527172126-0.40355677869710216.5750040614845-0.471447282787384
5716.917.8615104456503-0.55212685998006716.49061641432980.961510445650262
5816.616.40440617075980.38888742152215916.406706407718-0.195593829240174
5916.716.16730339893890.9099001999548516.3227964011062-0.532696601061078
6016.616.41496387799180.54947023054129516.2355658914669-0.185036122008185
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/1oczm1260986031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/1oczm1260986031.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/22cn31260986031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/22cn31260986031.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/3e2c21260986031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260986153ok37gjt95ropcav/3e2c21260986031.ps (open in new window)


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