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 10:38:14 -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/t1259948334ocezgodyrdio9th.htm/, Retrieved Fri, 04 Dec 2009 18:39:00 +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/t1259948334ocezgodyrdio9th.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 «
92.9 107.7 103.5 91.1 79.8 71.9 82.9 90.1 100.7 90.7 108.8 44.1 93.6 107.4 96.5 93.6 76.5 76.7 84 103.3 88.5 99 105.9 44.7 94 107.1 104.8 102.5 77.7 85.2 91.3 106.5 92.4 97.5 107 51.1 98.6 102.2 114.3 99.4 72.5 92.3 99.4 85.9 109.4 97.6 104.7 56.9 86.7 108.5 103.4 86.2 71 75.9 87.1 102 88.5 87.8 100.8 50.6 85.9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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
192.994.0890305045341.9637426051510889.7472268903151.18903050453393
2107.7110.02472646530015.822626020195189.55264751450532.32472646529963
3103.5103.87403027963513.767901581669389.35806813869550.374030279635207
491.189.126976793633.8675717250896289.2054514812804-1.97302320637003
579.885.6999329376615-15.152767761526889.05283482386535.89993293766149
671.965.0846393014848-10.202872674948788.9182333734639-6.81536069851519
782.978.629352981149-1.6129849042115588.7836319230625-4.27064701885094
890.184.4765106899577.1000553053410488.623434004702-5.62348931004306
9100.7107.4036691079575.5330948057015288.46323608634156.70366910795694
1090.788.70474257358924.2584238639133688.4368335624974-1.99525742641076
11108.8113.90582344215615.283745519190488.41043103865335.10582344215629
1244.140.2667515864325-40.628534306488188.5617827200556-3.83324841356749
1393.696.5231229933911.9637426051510888.7131344014582.92312299339093
14107.4110.12619010163815.822626020195188.85118387816642.72619010163849
1596.590.24286506345613.767901581669388.9892333548748-6.25713493654408
1693.694.31877830657573.8675717250896289.01364996833470.7187783065757
1776.579.1147011797322-15.152767761526889.03806658179462.61470117973222
1876.774.4923463332722-10.202872674948789.1105263416765-2.20765366672779
198480.4299988026531-1.6129849042115589.1829861015584-3.5700011973469
20103.3110.0950083418357.1000553053410489.4049363528246.79500834183493
2188.581.84001859020895.5330948057015289.6268866040896-6.65998140979111
2299103.6713829383264.2584238639133690.07019319776094.67138293832578
23105.9106.00275468937715.283745519190490.51349979143220.102754689377434
2444.739.0035452507058-40.628534306488191.0249890557823-5.69645474929416
259494.49977907471651.9637426051510891.53647832013250.499779074716457
26107.1106.41877913703515.822626020195191.95859484277-0.681220862965048
27104.8103.45138705292313.767901581669392.3807113654074-1.34861294707666
28102.5108.4874935388723.8675717250896292.64493473603835.98749353887213
2977.777.6436096548577-15.152767761526892.9091581066691-0.0563903451423329
3085.287.5223673240288-10.202872674948793.08050535091992.32236732402885
3191.390.961132309041-1.6129849042115593.2518525951706-0.338867690959049
32106.5112.5751061481217.1000553053410493.3248385465386.07510614812097
3392.485.86908069639315.5330948057015293.3978244979054-6.53091930360692
3497.597.34937390558584.2584238639133693.3922022305009-0.150626094414250
35107105.32967451771315.283745519190493.3865799630964-1.67032548228681
3651.149.351010761898-40.628534306488193.4775235445901-1.74898923810198
3798.6101.6677902687651.9637426051510893.56846712608393.06779026876504
38102.294.867005509550715.822626020195193.7103684702542-7.33299449044932
39114.3120.97982860390613.767901581669393.85226981442456.67982860390619
4099.4100.9207772508563.8675717250896294.01165102405471.52077725085564
4172.565.9817355278418-15.152767761526894.171032233685-6.51826447215815
4292.3100.685635374884-10.202872674948794.11723730006488.38563537488386
4399.4106.349542537767-1.6129849042115594.06344236644476.9495425377668
4485.970.99517049273447.1000553053410493.7047742019245-14.9048295072656
45109.4119.9207991568945.5330948057015293.346106037404310.5207991568942
4697.698.3029347775864.2584238639133692.63864135850060.702934777585995
47104.7102.18507780121315.283745519190491.931176679597-2.51492219878740
4856.963.229580657253-40.628534306488191.1989536492356.32958065725305
4986.780.96952677597581.9637426051510890.4667306188732-5.73047322402425
50108.5111.31413530567015.822626020195189.86323867413512.81413530566977
51103.4103.77235168893413.767901581669389.25974672939710.372351688933662
5286.279.76496648670133.8675717250896288.7674617882091-6.43503351329873
537168.8775909145056-15.152767761526888.2751768470212-2.12240908549438
5475.974.0981228611814-10.202872674948787.9047498137673-1.80187713881860
5587.188.2786621236981-1.6129849042115587.53432278051341.17866212369809
56102109.6950645075417.1000553053410487.20488018711777.6950645075413
5788.584.59146760057665.5330948057015286.8754375937219-3.90853239942339
5887.884.7638165177764.2584238639133686.5777596183106-3.03618348222399
59100.8100.03617283791015.283745519190486.2800816428994-0.763827162089825
6050.655.8214789652396-40.628534306488186.00705534124855.22147896523961
6185.984.10222835525131.9637426051510885.7340290395977-1.79777164474875
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948334ocezgodyrdio9th/1j1as1259948291.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948334ocezgodyrdio9th/1j1as1259948291.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948334ocezgodyrdio9th/2egzb1259948291.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948334ocezgodyrdio9th/2egzb1259948291.ps (open in new window)


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


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