Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 13:08:59 -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/03/t12598710231dd15nirs8wepwn.htm/, Retrieved Thu, 03 Dec 2009 21:10:28 +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/03/t12598710231dd15nirs8wepwn.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 «
1915 1843 1761 2858 3968 5061 4661 4269 3857 3568 3274 2987 1683 1381 1071 2772 4485 6181 5479 4782 4067 3489 2903 2330 1736 1483 1242 2334 3423 4523 3986 3462 2908 2575 2237 1904 1610 1251 941 2450 3946 5409 4741 4069 3539 3189 2960 2704 1697 1598 1456 2316 3083 4158 3469 2892 2578 2233 1947 2049
 
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
119151851.17829054527-1350.683531208533329.50524066326-63.8217094547267
218431909.20899242879-1547.310742757253324.1017503284666.2089924287925
317611947.23967196232-1743.937931955983318.69825999366186.239671962323
428582879.0193344964-476.1482200833753313.1288855869721.0193344964009
539683853.59897703312774.8415117865923307.55951118029-114.401022966880
650614748.48441496812073.641456660203299.87412837169-312.515585031897
746614541.970021377491487.841233059413292.1887455631-119.029978622510
842694324.72909429795932.3464032350273280.9245024670255.7290942979507
938574000.08822237454444.2515182545173269.66025937095143.088222374538
1035683774.6955515712892.92975574163543268.37469268709206.695551571277
1132743506.90288142153-225.9920074247623267.08912600323232.902881421531
1229873130.13085887445-461.7796013931123305.64874251866143.130858874453
1316831372.47517217445-1350.683531208533344.20835903409-310.524827825554
141381922.95540744311-1547.310742757253386.35533531414-458.044592556889
151071457.435620361788-1743.937931955983428.50231159420-613.564379638212
1627722576.1574147591-476.1482200833753443.99080532427-195.842585240900
1744854735.67918915905774.8415117865923459.47929905435250.679189159055
1861816831.586162559062073.641456660203456.77238078074650.586162559058
1954796016.093304433471487.841233059413454.06546250712537.093304433466
2047825193.54921327172932.3464032350273438.10438349325411.549213271725
2140674267.60517726611444.2515182545173422.14330447937200.605177266109
2234893524.5223806774392.92975574163543360.5478635809335.5223806774311
2329032733.03958474227-225.9920074247623298.95242268249-169.960415257731
2423301931.4863353627-461.7796013931123190.29326603041-398.513664637299
2517361741.04942183020-1350.683531208533081.634109378335.04942183020239
2614831536.87306627477-1547.310742757252976.4376764824853.8730662747671
2712421356.69668836934-1743.937931955982871.24124358664114.696688369344
2823342347.64347308338-476.1482200833752796.5047469999913.6434730833803
2934233349.39023780006774.8415117865922721.76825041335-73.6097621999411
3045234294.908072386482073.641456660202677.45047095332-228.091927613523
3139863851.02607544731487.841233059412633.13269149329-134.973924552701
3234623377.56210468257932.3464032350272614.0914920824-84.4378953174287
3329082776.69818907397444.2515182545172595.05029267151-131.301810926030
3425752444.458363592492.92975574163542612.61188066596-130.541636407600
3522372069.81853876435-225.9920074247622630.17346866041-167.181461235653
3619041585.91707864178-461.7796013931122683.86252275133-318.082921358223
3716101833.13195436628-1350.683531208532737.55157684226223.131954366277
3812511246.73154924542-1547.310742757252802.57919351183-4.26845075458232
39941758.33112177457-1743.937931955982867.60681018141-182.66887822543
4024502448.96298072975-476.1482200833752927.18523935362-1.03701927024758
4139464130.39481968758774.8415117865922986.76366852583184.394819687576
4254095712.408136630222073.641456660203031.95040670957303.408136630222
4347414917.021622047271487.841233059413077.13714489332176.021622047272
4440694105.3738703115932.3464032350273100.2797264534836.3738703114973
4535393510.32617373185444.2515182545173123.42230801364-28.673826268152
4631893180.6662006455692.92975574163543104.4040436128-8.333799354436
4729603060.60622821280-225.9920074247623085.38577921197100.606228212796
4827042858.53507166367-461.7796013931123011.24452972944154.535071663669
4916971807.58025096161-1350.683531208532937.10328024692110.580250961611
5015981905.13734235451-1547.310742757252838.17340040274307.137342354511
5114561916.69441139742-1743.937931955982739.24352055856460.694411397424
5223162459.37748636043-476.1482200833752648.77073372295143.377486360426
5330832832.86054132607774.8415117865922558.29794688734-250.139458673930
5441583766.687410400712073.641456660202475.67113293909-391.312589599294
5534693057.114447949751487.841233059412393.04431899084-411.885552050254
5628922543.88744444452932.3464032350272307.76615232045-348.112555555482
5725782489.26049609542444.2515182545172222.48798565007-88.7395039045837
5822332234.0350844072392.92975574163542139.035159851141.03508440722590
5919472064.40967337255-225.9920074247622055.58233405221117.409673372552
6020492583.41338589509-461.7796013931121976.36621549802534.413385895094
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/1c4qm1259870937.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/1c4qm1259870937.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/23aum1259870937.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/23aum1259870937.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/3i3rd1259870937.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/3i3rd1259870937.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/4j2c31259870937.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598710231dd15nirs8wepwn/4j2c31259870937.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.5 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ; par9 = 1 ;
 
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