Re: [R-sig-phylo] model averaging for discrete character evolution

2019-08-07 Thread Liam Revell
Hi Jake.

[Edit: I see just now that Brian has also responded to this inquiry. I 
have no doubt that his message is more insightful than mine - but I'll 
nonetheless send what I was writing anyway just in case it contributes 
anything useful to the discussion.]

If you're simply interested in the states at nodes, you might consider 
just multiplying the marginal reconstructions under maximum likelihood 
by the Akaike weights of each model & summing them.

The former are probabilities that the node is in each state conditioned 
on a model, and the latter are the probabilities that each of the models 
is the best of the set. If the models in the set genuinely comprise all 
possible ways in which your character could have evolved (they don't, 
but still), then the model weighted average marginal reconstructions 
should give the total probability that each node is in each state.

If you really want to do stochastic mapping, you might consider some 
kind of rjMCMC in which you sample models & transition rates from their 
joint posterior distribution and then generate stochastic character maps 
based on this sample. This is not implemented in phytools::make.simmap 
(it does MCMC, but only given a model), but is not to hard to envision 
doing, so long as you are careful about designing the rjMCMC.

Now to read Brian's answer

All the best, Liam

Liam J. Revell
Associate Professor, University of Massachusetts Boston
Profesor Asistente, Universidad Católica de la Ssma Concepción
web: http://faculty.umb.edu/liam.revell/, http://www.phytools.org

Academic Director UMass Boston Chile Abroad (starting 2019):
https://www.umb.edu/academics/caps/international/biology_chile

On 8/7/2019 11:32 AM, Jacob Berv wrote:
> Dear R-sig phylo
> 
> I’ve been running a few discrete character Mk type models using phytool's 
> SIMMAP — and I had the idea that it might be useful to try model averaging 
> across posterior probabilities for node states.
> 
> Might this make sense to do, to avoid problems associated with model ranking 
> via AIC? Ie, average the node state probabilities based on AIC weights? Is 
> there some fundamental problem with this?
> 
> I could imagine generating some code to generate all possible transition 
> models given a set of N states, and then rather than ranking with AIC, model 
> averaging for parameter estimates (though now that I think about it, not sure 
> how one might reasonably average a symmetrical rate and an asymmetrical rate).
> 
> Best,
> Jake
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylodata=02%7C01%7Cliam.revell%40umb.edu%7Ce85015cb8c314c684bdc08d71b4c8fee%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637007887976647805sdata=F8qdVoT17J%2BuC6wgvFktdI1id%2Bf37hDLe1W17z6OhTw%3Dreserved=0
> Searchable archive at 
> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2Fdata=02%7C01%7Cliam.revell%40umb.edu%7Ce85015cb8c314c684bdc08d71b4c8fee%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637007887976657803sdata=ogCaep2DN92bk6%2FZwOOcpmHaCPQwX7BzNgKo2UMcWtw%3Dreserved=0
> 
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[R-sig-phylo] model averaging for discrete character evolution

2019-08-07 Thread Jacob Berv
Dear R-sig phylo

I’ve been running a few discrete character Mk type models using phytool's 
SIMMAP — and I had the idea that it might be useful to try model averaging 
across posterior probabilities for node states.

Might this make sense to do, to avoid problems associated with model ranking 
via AIC? Ie, average the node state probabilities based on AIC weights? Is 
there some fundamental problem with this?

I could imagine generating some code to generate all possible transition models 
given a set of N states, and then rather than ranking with AIC, model averaging 
for parameter estimates (though now that I think about it, not sure how one 
might reasonably average a symmetrical rate and an asymmetrical rate).

Best,
Jake

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] model averaging for discrete character evolution

2019-08-07 Thread Brian O'Meara
I think this is ok in theory: say you have 10% of the weight on the ER
model, 90% on the ARD model, so your states at the nodes are based 10% on
the probabilities from ER, 90% from ARD. [Worth noting, of course, that
with N tips with one character each, estimating N-1 ancestral states, plus
the rates, plus the model weights, is asking a bit much of the data -- it
can be worth asking if there's another way to answer the biological
question]. The risk of model averaging is if some of the models are truly
terrible: you might get extreme parameter values because there's not enough
info to estimate them well. It won't be apparent with discrete ancestral
states (since there's a finite, reasonable state space), but you could have
an asymmetrical rate near infinity, for example, if you fit an ARD model
with not much data, and infinity times a weight for that model still means
a big number.

Model averaging for parameter estimates between the rates is ok, btw:

symmetrical model:

rate_0_to_1 = s
rate_1_to_0 = s

asymmetrical model:

rate_0_to_1 = a
rate_1_to_0 = b

weighted params:

rate_0_to_1 = s * weight_sym + a * weight_asym
rate_1_to_0 = s * weight_sym + b * weight_asym

Best,
Brian

___
Brian O'Meara, http://www.brianomeara.info, especially Calendar
, CV
, and Feedback


Professor, Dept. of Ecology & Evolutionary Biology, UT Knoxville
Associate Head, Dept. of Ecology & Evolutionary Biology, UT Knoxville



On Wed, Aug 7, 2019 at 11:33 AM Jacob Berv 
wrote:

> Dear R-sig phylo
>
> I’ve been running a few discrete character Mk type models using phytool's
> SIMMAP — and I had the idea that it might be useful to try model averaging
> across posterior probabilities for node states.
>
> Might this make sense to do, to avoid problems associated with model
> ranking via AIC? Ie, average the node state probabilities based on AIC
> weights? Is there some fundamental problem with this?
>
> I could imagine generating some code to generate all possible transition
> models given a set of N states, and then rather than ranking with AIC,
> model averaging for parameter estimates (though now that I think about it,
> not sure how one might reasonably average a symmetrical rate and an
> asymmetrical rate).
>
> Best,
> Jake
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at
> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/