Home » date » 2009 » Dec » 15 »

ws9

*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, 15 Dec 2009 13:36: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/15/t1260909488m54b0n4s6o7h8go.htm/, Retrieved Tue, 15 Dec 2009 21:38:15 +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/15/t1260909488m54b0n4s6o7h8go.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 «
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 21.1 20.5 19.1 18.1 17 17.1 17.4 16.8 15.3 14.3 13.4 15.3 22.1 23.7 22.2 19.5 16.6 17.3 19.8 21.2 21.5 20.6 19.1 19.6 23.5 24
 
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
125.626.13001171274142.4937434729235622.57624481433500.530011712741409
223.724.01660889240250.96061143131123822.42277967628630.316608892402506
32222.3832061112741-0.6525206495115422.26931453823750.383206111274074
421.321.3733041851982-0.90336058409474322.13005639889650.0733041851982321
520.720.0834025728063-0.67420083236187321.9907982595556-0.616597427193682
620.419.6078078240339-0.66992642167202121.8621185976381-0.792192175966054
720.319.9122129184194-1.0456518541421.7334389357206-0.387787081580594
820.420.3571640340534-1.1707404064737321.6135763724203-0.042835965946562
919.820.0821153457403-1.9758291548602521.493713809120.282115345740255
1019.519.2681677486169-1.7179193096824621.4497515610656-0.231832251383111
1123.122.35422000772182.4399906792670921.4057893130111-0.745779992278234
1223.522.69078208029172.9158045233145121.3934133963938-0.809217919708296
1323.523.12521904730002.4937434729235621.3810374797764-0.374780952699968
1422.923.51193412813480.96061143131123821.3274544405540.611934128134752
1521.923.1786492481799-0.6525206495115421.27387140133161.27864924817994
1621.522.6922063247483-0.90336058409474321.21115425934651.19220632474829
1720.520.5257637150006-0.67420083236187321.14843711736130.0257637150005756
1820.220.0027620245314-0.66992642167202121.0671643971407-0.197237975468632
1919.418.85976017722-1.0456518541420.98589167692-0.540239822780006
2019.218.7132965627299-1.1707404064737320.8574438437438-0.486703437270112
2118.818.8468331442926-1.9758291548602520.72899601056770.0468331442925631
2218.818.7355177593128-1.7179193096824620.5824015503697-0.0644822406872372
2322.622.32420223056122.4399906792670920.4358070901717-0.275797769438793
2423.323.35514648625892.9158045233145120.32904899042660.055146486258888
252323.28396563639492.4937434729235620.22229089068150.283965636394946
2621.421.65719305619660.96061143131123820.18219551249220.257193056196567
2719.920.3104205152087-0.6525206495115420.14210013430290.410420515208656
2818.818.4134360788157-0.90336058409474320.0899245052790-0.386563921184301
2918.617.8364519561067-0.67420083236187320.0377488762552-0.763548043893334
3018.417.5994871889904-0.66992642167202119.8704392326816-0.800512811009614
3118.618.5425222650319-1.0456518541419.7031295891081-0.0574777349680602
3219.921.5072824226119-1.1707404064737319.46345798386181.60728242261192
3319.221.1520427762447-1.9758291548602519.22378637861561.95204277624470
3418.419.5067718613888-1.7179193096824619.01114744829361.10677186138881
3521.120.96150080276122.4399906792670918.7985085179717-0.138499197238833
3620.519.53187083159412.9158045233145118.5523246450914-0.968129168405902
3719.117.40011575486542.4937434729235618.3061407722110-1.69988424513458
3818.117.26498895187470.96061143131123817.9743996168141-0.835011048125306
391717.0098621880944-0.6525206495115417.64265846141710.00986218809443073
4017.117.6466070919378-0.90336058409474317.45675349215690.546607091937815
4117.418.2033523094651-0.67420083236187317.27084852289670.803352309465126
4216.816.9142332576939-0.66992642167202117.35569316397820.114233257693865
4315.314.2051140490804-1.0456518541417.4405378050596-1.09488595091956
4414.312.1893710005571-1.1707404064737317.5813694059167-2.11062899944293
4513.411.0536281480865-1.9758291548602517.7222010067738-2.34637185191351
4615.314.4397940199456-1.7179193096824617.8781252897368-0.860205980054364
4722.123.7259597480332.4399906792670918.03404957269991.62595974803303
4823.726.11075461710132.9158045233145118.37344085958422.41075461710134
4922.223.19342438060802.4937434729235618.71283214646840.993424380608037
5019.518.88667807132290.96061143131123819.1527104973659-0.613321928677134
5116.614.2599318012482-0.6525206495115419.5925888482634-2.34006819875184
5217.315.6329940692988-0.90336058409474319.8703665147959-1.66700593070120
5319.820.1260566510334-0.67420083236187320.14814418132850.326056651033369
5421.222.6686450437361-0.66992642167202120.40128137793591.46864504373615
5521.523.3912332795968-1.0456518541420.65441857454321.89123327959677
5620.621.4548255611420-1.1707404064737320.91591484533170.854825561142029
5719.118.9984180387401-1.9758291548602521.1774111161202-0.101581961259924
5819.619.4820873072831-1.7179193096824621.4358320023993-0.117912692716878
5923.522.86575643205442.4399906792670921.6942528886785-0.634243567945592
602423.14068577480772.9158045233145121.9435097018778-0.859314225192282
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/1mb2o1260909394.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/1mb2o1260909394.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/2y2ey1260909394.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/2y2ey1260909394.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/3zhfp1260909394.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/15/t1260909488m54b0n4s6o7h8go/3zhfp1260909394.ps (open in new window)


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