0
$\begingroup$

I am currently into a situation that i don't really know how to solve by myself.

I need to calculate the AUC of each peak and then compare these areas in relation to each other. The problem is that the peaks are not completely separated and the only information i got is the mean and the SD of each peak.

Does anyone know how to do this? Any hint or guess would already be really cool.

Thanks.

$\endgroup$
4
  • 1
    $\begingroup$ Could you explain what a 'peak' stand for in the context of your data? $\endgroup$ – chl Sep 1 '10 at 10:03
  • 1
    $\begingroup$ Also do you have access to the underlying data? How are the curves drawn? $\endgroup$ – csgillespie Sep 1 '10 at 10:09
  • 1
    $\begingroup$ Maybe change your title because AUC is definitively misleading there... $\endgroup$ – chl Sep 1 '10 at 14:10
  • $\begingroup$ The title should say "peak height" rather than "peak mean". $\endgroup$ – Harvey Motulsky Sep 1 '10 at 20:46
3
$\begingroup$

That really depends on the form and the height of the curve. If you assume the curves are all gaussian and you know the heights, then you can calculate the area under the curve by using the normal density function. In R this would become:

heights <- 1
avg <- 3
sdev <- 2

AUC <- heights/dnorm(avg,avg,sd) # the density function at the mean

As the value of the density function at the mean is only determined by the sd, this information suffices for calculation of the AUC, given the assumptions are correct. If all heights are the same, the AUC is proportional to the sd only.

Without information about the shape of the curve and the heights, you simply cannot calculate the AUC as far as I know.

$\endgroup$
10
  • $\begingroup$ Hello Joris. Thanks for the input. All the peaks are gaussians - having a nice bell shape. The only thing that varies is the amplitude (height) and the SD (width). I actually don't really know about this density function. COuld you explain it more or give me link towards it? Thanks. $\endgroup$ – Cadu Sep 1 '10 at 13:48
  • $\begingroup$ @chl: 'peak' is simply any area above my baseline. All peaks have gaussian distributions. @csgillespie: I have access to the original data that plotted the histogram and the curves are drawn in GraphPad Prism using a 'Sum of three gaussians' fit. $\endgroup$ – Cadu Sep 1 '10 at 13:52
  • $\begingroup$ This is how the whole graph looks like: imgur.com/ipBiL.png $\endgroup$ – Cadu Sep 1 '10 at 13:53
  • $\begingroup$ @Cadu Ok, so this does not resemble what is commonly refered to as AUC, since this term is more often used in reliability studies or when assessing performance of classifier, i.e. when you plot sensibility against (1-specificity). $\endgroup$ – chl Sep 1 '10 at 13:58
  • $\begingroup$ In full, the probability density function or pdf : en.wikipedia.org/wiki/Probability_density_function . The one for the normal distribution, which I use, is thoroughly described. Google will give you tons of hits on that. As you used the sum of gaussians, the approach I gave you should work. Mind you, it gives you the total area for each gaussian curve. So if you add the AUC's for the three curves, you end up with a higher area than under the combined curve. $\endgroup$ – Joris Meys Sep 1 '10 at 14:03
1
$\begingroup$

Given how your plot looks like, I would suggest rather to fit a mixture of gaussians and get their respective densities. Look at the mclust package; basically this is refered to model-based clustering (you are seeking groups of points belonging to a given distribution, that is to be estimated, whose location parameter -- but also shape -- varies along a common dimension). A full explanation of MClust is available here.

It seems the delt package offers an alternative way to fit 1D data with a mixture of gaussians, but I didn't get into details.

Anyway, I think this is the best way to get automatic estimates and avoid cutting your x-scale at arbitrary locations.

$\endgroup$
1
  • $\begingroup$ Hey Chl. I will try this mclust package and see what it can do. Thanks for the hint :) $\endgroup$ – Cadu Sep 1 '10 at 14:32
1
$\begingroup$

It is critical to know how the peak heights and sds were calculated. (I take "mean" in the question to be a mistaken way of referring to a height. Without the heights, the problem is hopeless; it would be like requesting a formula for the area of a rectangle given only its width and location.)

One would expect, as Joris Meys' answer and its commentary suggest, that the area could be estimated as a sum of Gaussians. Actually, we don't need to assume a Gaussian shape; almost any standard (preferably unimodal, continuous) shape will do, because the area will be proportional to the peak height (a y-scale factor) and the sd (an x-scale factor), whence the total estimated area ought to be a constant times the sum of height*SD and the relative contribution of each peak will equal its height*SD divided by this sum. But this all assumes the heights and sds were fit to the curve with such an application in mind.

I realize there are many problems with such a formula, but let's not get carried away by all the detail in the example graph: the problem as posed says that the "means" and SDs are the only information available.

$\endgroup$
4
  • $\begingroup$ Hmm, you got a point there, whuber. In the graph that i posted i got the mean, which indeed it nothing more than the position in the X axis of the peak. The SD deviation should be half of the width of the peak. And i also got the amplitude of these peaks which is the height. If i got it right, your suggestion is that i could calculate the area of the peaks simply by multiplying the height (amplitude) by the width (2*SD). And due to the fact that i am only interested in the ratios between the peaks, this should be enough. Did i get you right? $\endgroup$ – Cadu Sep 1 '10 at 15:51
  • $\begingroup$ Yes, you are correct. You don't need to worry about the factor of 2, either--it's meaningless--because you just want ratios. The problem with this approach is that when the peaks are close together, the tails of a peak's neighbors contribute somewhat to the peak's own height. Thus, it's best to use a peak-estimation procedure that compensates for this. That's what chl, for example, was referring to by a "mixture of gaussians." $\endgroup$ – whuber Sep 1 '10 at 16:06
  • $\begingroup$ Okay then :) Actually i was trying to use chl's approach but nothing so far. On the other hand, i used Jori's approach to calculate the area and then i calculated the ratios between them. Afterward i did the same thing with this easy procedure of yours - and i must say that although the areas were different, the ratio was pretty much similar. I guess this solves my issues. Thanks everybody for the help :) $\endgroup$ – Cadu Sep 1 '10 at 16:18
  • $\begingroup$ @Cadu: the ratios shouldn't be "pretty much similar"; they should be identical (to within floating point error). $\endgroup$ – whuber Sep 1 '10 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.