veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
217 stars 69 forks source link

question about calculating evidence ratio for GARD #289

Closed jayoung closed 9 years ago

jayoung commented 9 years ago

Hi there,

Thanks very much for the hyphy package - it's very useful. I have what I hope will be a quick question for you.

I've started running some GARD analyses on our local machines using the batch templates (first NucModelCompare.bf to choose an evolutionary model, followed by GARD.bf and GARDProcessor.bf) and I wanted to make sure I'm interpreting the final output properly.

The web version of GARD gives us a very nice textual interpretation of the output (the "Topological incongruence report"), where it tells us AICc scores for the model where topologies are different between segments, and the single topology model where branch lengths can differ between segments. It then takes that delta AICc score and reports an evidence ratio - I'd love to be able to calculate that "evidence ratio" for locally-run GARD output too, to help us get some sense of what the deltaAIC scores mean.

Here's what I think I should do:

  1. take the delta AIC given in the line in the GARDProcessor.bf output that says
    "Versus the single tree/multiple partition model: Delta AIC"
  2. calculate evidence ratio using this equation:
    evidence ratio favoring multiple topologies = exp((deltaAIC)/2) The alignments I'm working with show very clear signs of recombination, so delta AIC can be e.g. >300 and therefore this evidence ratio comes out to be a huge number (>10^65). As you've done on the website, it seems like maybe it's appropriate to just state this ratio as ">100" rather than reporting the ridiculously huge number.

It's step 2 I'm not sure about - I'm quite a novice with hyphy analysis, and am by no means a statistician. I got that equation from the wikipedia page describing the AIC, so I know I need to be a bit wary about how correct it is. Is that the same calculation you're using for the website's GARD report?

thanks very much,

Janet Young


Dr. Janet Young

Malik lab http://research.fhcrc.org/malik/en.html

Fred Hutchinson Cancer Research Center 1100 Fairview Avenue N., A2-025, P.O. Box 19024, Seattle, WA 98109-1024, USA.

tel: (206) 667 4512 email: jayoung ...at... fhcrc.org


spond commented 9 years ago

Dear Janet,

Yes, indeed. For step 2, the evidence ratio is simply exp (Δ AIC / 2). I agree that reporting evidence ratios that are 1065 is about as meaningful as reporting p-values that are 10-65.

I should probably just add this calculation to the output of GARDProcessor.bf.

Sergei

jayoung commented 9 years ago

Thanks very much, Sergei - that's helpful. Yes, maybe it'd be nice to have that in the GARDProcessor output - thanks!

Janet

spond commented 9 years ago

Hi Janet,

I added the computation to `GARDProcessor' with commit 331b751eb8624c58196ee8890ffbebc3e693a21a

Sergei

jayoung commented 9 years ago

Thanks again - that's a nice addition.

Janet