Hi John,

In addition to Brian's suggestion, depending on what you are interested in 
testing you could also set this up in GLM-style format either with the binary 
trait as the response in a package like phylolm or as a phylogenetic mixed 
model in ape (with the binary trait as response) or MCMCglmm (with either trait 
as response).

Cheers,
Kev

Dr Kevin Arbuckle
Darlithydd mewn Biowyddorau (Bioleg Esblygiadol) / Lecturer in Biosciences 
(Evolutionary Biology)
Adran Biowyddorau / Department of Biosciences
Coleg Gwyddoniaeth / College of Science
Prifysgol Abertawe  / Swansea University 
Abertawe / Swansea
SA2 8PP
UK

Rhowch wybod i ni os hoffech dderbyn eich gohebiaeth yn Gymraeg. Rydym yn 
croesawu gohebiaeth yn Gymraeg neu yn Saesneg. Ni fydd gohebu yn Gymraeg yn 
arwain at oedi.

-----Original Message-----
From: R-sig-phylo [mailto:r-sig-phylo-boun...@r-project.org] On Behalf Of 
r-sig-phylo-requ...@r-project.org
Sent: 22 March 2018 11:00
To: r-sig-phylo@r-project.org
Subject: R-sig-phylo Digest, Vol 122, Issue 7

Send R-sig-phylo mailing list submissions to
        r-sig-phylo@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
or, via email, send a message with subject or body 'help' to
        r-sig-phylo-requ...@r-project.org

You can reach the person managing the list at
        r-sig-phylo-ow...@r-project.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of R-sig-phylo digest..."


Today's Topics:

   1. correlation of binary and multistate (John Denton)
   2. Re: correlation of binary and multistate (Brian O'Meara)

----------------------------------------------------------------------

Message: 1
Date: Wed, 21 Mar 2018 19:19:55 +0000
From: John Denton <jden...@amnh.org>
To: "r-sig-phylo@r-project.org" <r-sig-phylo@r-project.org>
Subject: [R-sig-phylo] correlation of binary and multistate
Message-ID: <71f19d34-03a0-4121-a389-f7fe607b9...@amnh.org>
Content-Type: text/plain; charset="us-ascii"

Hi all,

Does anybody know of a package that does character correlations between binary 
and multistate characters (and even better with the possibility of missing 
data)?

Thanks!

~John



------------------------------

Message: 2
Date: Wed, 21 Mar 2018 15:43:35 -0400
From: "Brian O'Meara" <omeara.br...@gmail.com>
To: John Denton <jden...@amnh.org>
Cc: "r-sig-phylo@r-project.org" <r-sig-phylo@r-project.org>
Subject: Re: [R-sig-phylo] correlation of binary and multistate
Message-ID:
        <cakywhkoayv28kqbfi_pxmtjehdpopfkfly2dakocfzucs4y...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You can do this with corHMM by making an appropriate model with rayDISC.
For example, if character A has states 0,1 and character B has states 0,1,2, 
you then recode this into a single multistate character:

00 -> 0
01 -> 1
02 -> 2
10 -> 3
11 -> 4
12 -> 5

and then create a rate matrix that matches your hypotheses (i.e., force the
00->10 rate [the 0->3 rate in the new coding] to be the same as the 
00->01->11
and 02->12 rates (so that the state of the second character doesn't affect the 
rate of the first character) or and compare (or model average) with a model 
where they are free to vary).

It wouldn't be hard to make a looping thing to do this automatically (Jeremy 
Beaulieu has for two and three binary trait correlation in the same package 
with corDISC but not for multistate yet) but as far as I know no one has (pull 
requests welcome!).

There may also be this functionality in phytools: I remember some Pagel 
correlation work was added, but I don't know about its limitations with 
multistate.

Best,
Brian

PS: Of course, with all this stuff, I now worry about the Maddison and FitzJohn 
issue: https://academic.oup.com/sysbio/article/64/1/127/2847997.


_______________________________________________________________________
Brian O'Meara, http://www.brianomeara.info, especially Calendar 
<http://brianomeara.info/calendars/omeara/>, CV <http://brianomeara.info/cv/>, 
and Feedback <http://brianomeara.info/teaching/feedback/>

Associate Professor, Dept. of Ecology & Evolutionary Biology, UT Knoxville 
Associate Head, Dept. of Ecology & Evolutionary Biology, UT Knoxville Associate 
Director for Postdoctoral Activities, National Institute for Mathematical & 
Biological Synthesis <http://www.nimbios.org> (NIMBioS)


On Wed, Mar 21, 2018 at 3:19 PM, John Denton <jden...@amnh.org> wrote:

> Hi all,
>
> Does anybody know of a package that does character correlations 
> between binary and multistate characters (and even better with the 
> possibility of missing data)?
>
> Thanks!
>
> ~John
> _______________________________________________
> 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-ph...@r-project.org/
>

        [[alternative HTML version deleted]]




------------------------------

Subject: Digest Footer

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


------------------------------

End of R-sig-phylo Digest, Vol 122, Issue 7

_______________________________________________
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/

Reply via email to