Home » date » 2010 » Nov » 27 »

*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: Sat, 27 Nov 2010 15:02:51 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h.htm/, Retrieved Sat, 27 Nov 2010 16:01:06 +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/2010/Nov/27/t1290870062yu7xxi21b3tq55h.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
47.54 45.31 46.9 47.16 48.24 52.7 51.72 51.5 52.45 53 48.36 46.63 45.92 45.53 42.17 43.66 45.32 47.43 47.76 49.49 50.69 49.8 52.13 53.94 60.75 59.19 57.58 59.16 64.74 67.04 75.53 78.91 78.4 70.07 66.8 61.02 52.38 42.37 39.83 38.79 37.33 39.4 39.45 43.24 42.33 45.5 43.44 43.88 45.61 45.12 47.56 47.04 51.07 54.72 55.37 55.39 53.13 53.71 54.59 54.61
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'George Udny Yule' @ 72.249.76.132


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal601061
Trend911
Low-pass511


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
147.5448.59541996724630.84188993057170745.6426901021821.05541996724627
245.3144.6477451014591-0.48984137189984646.4620962704408-0.66225489854093
346.947.0108061846925-0.54546306702434747.33465688233180.110806184692528
447.1646.0919354796006-0.019036120926989448.2471006413264-1.06806452039938
548.2447.03106375748540.21245172453613849.2364845179784-1.20893624251458
652.754.22394969049170.84188993057170750.33416037893661.52394969049165
751.7252.5790665767733-0.48984137189984651.35077479512650.859066576773337
851.551.6550969755593-0.54546306702434751.89036609146510.155096975559260
952.4553.473355951565-0.019036120926989451.4456801693621.02335595156497
105355.3645567646220.21245172453613850.42299151084182.36455676462206
1148.3646.68709379050230.84188993057170749.191016278926-1.67290620949768
1246.6346.0826488177616-0.48984137189984647.6671925541382-0.547351182238394
1345.9246.3619263553652-0.54546306702434746.02353671165920.44192635536519
1445.5346.155363226299-0.019036120926989444.9236728946280.625363226299015
1542.1739.57880657879860.21245172453613844.5487416966653-2.59119342120144
1643.6641.7219998545090.84188993057170744.7561102149193-1.93800014549100
1745.3245.6285583294586-0.48984137189984645.50128304244120.308558329458613
1847.4348.6463889367983-0.54546306702434746.75907413022601.21638893679831
1947.7647.498841397682-0.019036120926989448.040194723245-0.261158602318048
2049.4949.72581136179240.21245172453613849.04173691367150.235811361792351
2150.6950.51356566483930.84188993057170750.024544404589-0.176434335160707
2249.848.6931656998555-0.48984137189984651.3966756720443-1.10683430014449
2352.1351.534139004978-0.54546306702434753.2713240620464-0.595860995022001
2453.9452.7460349371657-0.019036120926989455.1530011837613-1.19396506283432
2560.7564.51011765551730.21245172453613856.77743061994653.76011765551735
2659.1959.20410961599550.84188993057170758.33400045343270.0141096159955438
2757.5855.6685030319902-0.48984137189984659.9813383399096-1.9114969680098
2859.1656.9636350905304-0.54546306702434761.901827976494-2.19636490946961
2964.7464.5428958556559-0.019036120926989464.9561402652711-0.197104144344109
3067.0464.91974623911310.21245172453613868.9478020363508-2.12025376088692
3175.5377.81459650313340.84188993057170772.40351356629492.2845965031334
3278.9184.2816685069265-0.48984137189984674.02817286497335.37166850692654
3378.483.8193080350264-0.54546306702434773.5261550319985.41930803502635
3470.0769.5807338267056-0.019036120926989470.5783022942214-0.489266173294411
3566.868.04797179861220.21245172453613865.33957647685171.24797179861216
3661.0262.33294578630150.84188993057170758.86516428312681.31294578630153
3752.3852.7018766629827-0.48984137189984652.54796470891720.321876662982675
3842.3738.3646534788144-0.54546306702434746.92080958821-4.00534652118564
3939.8337.2146667650579-0.019036120926989442.4643693558691-2.61533323494209
4038.7937.48645897012860.21245172453613839.8810893053352-1.30354102987138
4137.3334.65645101591560.84188993057170739.1616590535127-2.67354898408436
4239.439.6899168061706-0.48984137189984639.59992456572920.289916806170595
4339.4538.8649402368858-0.54546306702434740.5805228301385-0.585059763114167
4443.2444.6859014775645-0.019036120926989441.81313464336251.44590147756448
4542.3341.61353535480040.21245172453613842.8340129206635-0.7164646451996
4645.546.56267633548880.84188993057170743.59543373393951.06267633548878
4743.4443.1916297828686-0.48984137189984644.1782115890313-0.248370217131445
4843.8843.6315869329212-0.54546306702434744.6738761341032-0.248413067078829
4945.6146.0556801685494-0.019036120926989445.18335595237760.445680168549394
5045.1244.05047063526860.21245172453613845.9770776401952-1.06952936473137
5147.5646.97619251362350.84188993057170747.3019175558048-0.5838074863765
5247.0445.4641991397398-0.48984137189984649.10564223216-1.57580086026018
5351.0751.6213713270782-0.54546306702434751.06409173994610.551371327078229
5454.7256.7277336498371-0.019036120926989452.73130247108992.00773364983706
5555.3756.67162932833820.21245172453613853.85591894712571.30162932833816
5655.3955.59007559768910.84188993057170754.34803447173920.200075597689121
5753.1352.3771931685601-0.48984137189984654.3726482033398-0.752806831439912
5853.7153.6040935293887-0.54546306702434754.3613695376356-0.105906470611281
5954.5954.8537728929012-0.019036120926989454.34526322802580.263772892901208
6054.6154.66621752854160.21245172453613854.34133074692230.0562175285415805
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/1cq7g1290870165.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/1cq7g1290870165.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/2cq7g1290870165.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/2cq7g1290870165.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/3cq7g1290870165.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/3cq7g1290870165.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/45h611290870165.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290870062yu7xxi21b3tq55h/45h611290870165.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 5 ; 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