Home » date » 2009 » Dec » 18 »

*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, 18 Dec 2009 02:45:11 -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/18/t1261129538a8os1i9yq81odtu.htm/, Retrieved Fri, 18 Dec 2009 10:45:43 +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/18/t1261129538a8os1i9yq81odtu.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 «
20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971
 
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
12036620310.7182265013-3160.0623218910923581.3440953898-55.2817734987475
22278222919.3072431086-774.9306774205323419.6234343119137.307243108586
31916919889.2954207419-4809.1981939759323257.9027732340720.295420741888
41380715748.1001516722-11251.010136822523116.90998515031941.10015167219
52974329400.10019184927109.982611084222975.9171970666-342.899808150847
62559123990.50551884594341.5806497342322849.9138314199-1600.49448115409
72909627855.71074925367612.3787849733322723.9104657731-1240.28925074642
82648225588.21325391144784.8148111181722590.9719349704-893.786746088583
92240520920.51339848821431.4531973440322458.0334041677-1484.48660151178
102704429058.50852019182621.4837908390822408.00768896912014.50852019184
111797016941.1013977475-3359.0833715179222357.9819737704-1028.89860225249
121873019445.3156580625-4547.408711449122562.0930533866715.315658062533
131968419761.8581888884-3160.0623218910922766.204133002777.858188888371
141978517351.0010142016-774.9306774205322993.9296632189-2433.99898579836
151847918545.5430005409-4809.1981939759323221.655193435166.5430005408634
16106989353.40375696946-11251.010136822523293.6063798531-1344.59624303054
173195633436.45982264477109.982611084223365.55756627111480.45982264473
182950631342.70240543564341.5806497342323327.71694483011836.70240543563
193450638109.74489163747612.3787849733323289.87632338923603.74489163745
202716526351.62780863294784.8148111181723193.5573802489-813.37219136711
212673628943.30836554731431.4531973440323097.23843710872207.30836554730
222369121835.79515484992621.4837908390822924.7210543110-1855.20484515012
231815716920.8797000045-3359.0833715179222752.2036715134-1236.12029999548
241732816656.6426895392-4547.408711449122546.7660219099-671.357310460804
251820517228.7339495847-3160.0623218910922341.3283723064-976.266050415314
262099520522.3490206071-774.9306774205322242.5816568134-472.650979392904
271738217429.3632526555-4809.1981939759322143.834941320547.3632526554757
2893677769.0562190461-11251.010136822522215.9539177764-1597.9437809539
293112432849.94449468347109.982611084222288.07289423241725.94449468339
302655126297.21491821424341.5806497342322463.2044320516-253.785081785798
313065131051.28524515597612.3787849733322638.3359698707400.28524515593
322585924077.89782452364784.8148111181722855.2873643582-1781.10217547641
332510025696.30804381021431.4531973440323072.2387588458596.308043810212
342577825649.08919326862621.4837908390823285.4270158923-128.910806731423
352041820696.468098579-3359.0833715179223498.6152729389278.468098579
361868818234.0900174134-4547.408711449123689.3186940357-453.909982586636
372042420128.0402067585-3160.0623218910923880.0221151325-295.959793241451
382477626261.7117690936-774.9306774205324065.21890832691485.71176909362
391981420186.7824924547-4809.1981939759324250.4157015213372.782492454662
401273812384.9474255085-11251.010136822524342.062711314-353.052574491470
413156631588.30766780917109.982611084224433.709721106722.3076678090656
423011131480.62402956794341.5806497342324399.79532069791369.62402956789
433001928059.74029473767612.3787849733324365.8809202890-1959.25970526237
443193434880.48731429364784.8148111181724202.69787458822946.48731429361
452582626181.03197376861431.4531973440324039.5148288874355.031973768560
462683527307.89012351592621.4837908390823740.626085645472.890123515892
472020520327.3460291153-3359.0833715179223441.7373424026122.346029115281
481778917089.8278556267-4547.408711449123035.5808558224-699.172144373311
492052021570.6379526489-3160.0623218910922629.42436924221050.63795264891
502251823599.4892436202-774.9306774205322211.44143380031081.48924362024
511557214159.7396956175-4809.1981939759321793.4584983584-1412.26030438247
521150912694.1366357147-11251.010136822521574.87350110781185.13663571471
532544722427.72888505867109.982611084221356.2885038572-3019.27111494145
542409022666.55039358654341.5806497342321171.8689566793-1423.44960641351
552778626972.17180552537612.3787849733320987.4494095013-813.828194474656
562619526789.26770515884784.8148111181720815.917483723594.267705158822
572051618956.16124471131431.4531973440320644.3855579447-1559.83875528874
582275922398.13684567822621.4837908390820498.3793634828-360.863154321836
591902821062.7102024971-3359.0833715179220352.37316902082034.71020249712
601697118257.0035512726-4547.408711449120232.40516017651286.00355127260
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/1dmoo1261129509.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/1dmoo1261129509.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/2i1h21261129509.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/2i1h21261129509.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/36ytq1261129509.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/36ytq1261129509.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/4nlfy1261129509.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/18/t1261129538a8os1i9yq81odtu/4nlfy1261129509.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.5 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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