Dear R users, Any idea of how to calculate an area of an overlap between two functions? The only R build in function that I found is I Similarity Statistic for Quantifying Niche Overlap and I am really not sure if this function is producing exactly what I am interested in since I was plotting functions and often got confused results (for example: got high value for the overlap of one pair and low for the other pair, while from the plot it looked like the first pair was overlapping better.) Can anyone please explain what's the reason behind such a behaviour? And does anyone has a suggestion of what function could be used for a calculation of an overlap area? The problem with 'Istat' function is also that it requires both data sets to have the same length, while I would be more interested in a function that enables overlap calculation even if data sets have different length. Looking forward to hearing from you! Have a good day. Ana library(SDMTools) a <- matrix(runif(30)) b <- matrix(runif(30)) Istat(a,b) [[alternative HTML version deleted]]
On Jul 18, 2011, at 9:40 AM, Ana Kolar wrote:> Dear R users, > > Any idea of how to calculate an area of an overlap between two > functions? The only R build in function that I found is I Similarity > Statistic for Quantifying Niche Overlap and I am really not sure if > this function is producing exactly what I am interested in since I > was plotting functions and often got confused results (for example: > got high value for the overlap of one pair and low for the other > pair, while from the plot it looked like the first pair was > overlapping better.) Can anyone please explain what's the reason > behind such a behaviour? And does anyone has a suggestion of what > function could be used for a calculation of an overlap area? The > problem with 'Istat' function is also that it requires both data > sets to have the same length, while I would be more interested in a > function that enables overlap calculation even if data sets have > different length. Looking forward to hearing from you! Have a good > day. AnaShouldn't you be integrating their difference (or the absolute value of their differences depending on your definition of "overlap"). I fail in understanding your example. Where is/are the function(s)?> > library(SDMTools) > a <- matrix(runif(30)) > b <- matrix(runif(30)) > Istat(a,b) > [[alternative HTML version deleted]]-- David Winsemius, MD West Hartford, CT
Reasonably Related Threads
- how to extract data from a function printout - example provided
- Calculating interval for conditional/unconditional correlation matrix
- sample function with different proportions
- Runtime Error! Keep on happening while using amap, anacor and ca pckg
- Three dimensional view of the profiles using 'rgl' package (example of 3 dimensional graphics using rgl package).