Home » date » 2010 » Dec » 15 »

*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, 15 Dec 2010 19:50:19 +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/Dec/15/t1292442530oimkma2t63at4g8.htm/, Retrieved Wed, 15 Dec 2010 20:48:51 +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/Dec/15/t1292442530oimkma2t63at4g8.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 «
130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135 124 118 121 121
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1130130.455583135465-1.71859579449626131.2630126590310.455583135465417
2127127.207931983921-4.75282134024763131.5448893563270.207931983921014
3122121.481308751741-9.30807480536325131.826766053622-0.51869124825916
4117113.791359410134-11.8255274359753132.034168025841-3.20864058986558
5112109.701410192947-17.9429801910065132.241569998059-2.29858980705282
6113110.022332580982-16.3666045412696132.344271960288-2.97766741901796
7149150.54325434692115.0097717305631132.4469739225161.543254346921
8157160.45055946202321.0642682709185132.4851722670593.45055946202285
9157162.7578653236418.7187640647589132.5233706116015.75786532363963
10147153.4353814633828.16734138096977132.3972771556496.43538146338162
11137141.5128978519620.215918448342066132.2711836996964.51289785196212
12132133.472817989754-1.26146526594889131.7886472761951.47281798975408
13125120.412484941802-1.71859579449626131.306110852694-4.58751505819757
14123120.14143108144-4.75282134024763130.611390258808-2.85856891856014
15117113.391405140442-9.30807480536325129.916669664922-3.60859485955848
16114110.728877819492-11.8255274359753129.096649616483-3.27112218050787
17111111.666350622962-17.9429801910065128.2766295680450.666350622961858
18112112.939281019387-16.3666045412696127.4273235218820.939281019387408
19144146.41221079371715.0097717305631126.578017475722.41221079371708
20150153.31548160302321.0642682709185125.6202501260593.31548160302272
21149154.61875315884318.7187640647589124.6624827763985.61875315884329
22134136.4294432266278.16734138096977123.4032153924032.42944322662744
23123123.640133543250.215918448342066122.1439480084080.640133543250172
24116112.723898752784-1.26146526594889120.537566513165-3.27610124721592
25117116.787410776574-1.71859579449626118.931185017922-0.212589223425596
26111109.572911562269-4.75282134024763117.179909777979-1.42708843773119
27105103.879440267327-9.30807480536325115.428634538036-1.12055973267253
28102101.954502622735-11.8255274359753113.87102481324-0.0454973772647662
299595.6295651025621-17.9429801910065112.3134150884440.62956510256214
309391.2140185736409-16.3666045412696111.152585967629-1.78598142635911
31124122.99847142262415.0097717305631109.991756846813-1.00152857737621
32130129.8408810821221.0642682709185109.094850646962-0.15911891788015
33124121.08329148813118.7187640647589108.19794444711-2.91670851186916
34115114.3798620190618.16734138096977107.452796599969-0.620137980938708
35106105.076432798830.215918448342066106.707648752828-0.92356720116966
36105105.202627667826-1.26146526594889106.0588375981230.202627667825681
37105106.308569351077-1.71859579449626105.4100264434191.30856935107744
38101101.969147799563-4.75282134024763104.7836735406850.969147799562904
399595.1507541674126-9.30807480536325104.1573206379510.1507541674126
409394.1342902180115-11.8255274359753103.6912372179641.13429021801149
418482.7178263930295-17.9429801910065103.225153797977-1.2821736069705
428787.1658375068187-16.3666045412696103.2007670344510.165837506818733
43116113.81384799851215.0097717305631103.176380270925-2.18615200148788
44120115.13899624557521.0642682709185103.796735483507-4.86100375442511
45117110.86414523915318.7187640647589104.417090696088-6.1358547608474
46109104.2108273325858.16734138096977105.621831286446-4.7891726674154
47105102.9575096748550.215918448342066106.826571876803-2.04249032514484
48107106.912988559839-1.26146526594889108.34847670611-0.087011440160694
49109109.84821425908-1.71859579449626109.8703815354160.848214259079867
50109111.372368466614-4.75282134024763111.3804528736342.37236846661385
51108112.417550593512-9.30807480536325112.8905242118514.41755059351206
52107111.885128465311-11.8255274359753113.9403989706644.88512846531108
5399100.952706461529-17.9429801910065114.9902737294771.95270646152923
54103106.516949982605-16.3666045412696115.8496545586643.51694998260525
55131130.28119288158515.0097717305631116.709035387851-0.71880711841456
56137135.42029789130721.0642682709185117.515433837775-1.57970210869345
57135132.95940364754318.7187640647589118.321832287698-2.0405963524574
58124120.7821040761838.16734138096977119.050554542848-3.21789592381735
59118116.0048047536610.215918448342066119.779276797997-1.99519524633874
60121122.797409171399-1.26146526594889120.4640560945491.79740917139945
61121122.569760403394-1.71859579449626121.1488353911021.56976040339406
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/1u1kf1292442612.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/1u1kf1292442612.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/2u1kf1292442612.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/2u1kf1292442612.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/3u1kf1292442612.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/3u1kf1292442612.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/44tk01292442612.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292442530oimkma2t63at4g8/44tk01292442612.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