Re: [R-sig-phylo] testing binomial characters
Hi, Regarding the blog and the feasibility of MCMCglmm for threshold models: If y1 is binary and y2 is normal, then the univariate analysis would be: Ainv<-inverseA(tree)$Ainv m1<-MCMCglmm(y1~y2, random=~species,ginverse=list(species=Ainv), data=my.data, prior=my.prior, family="ordinal") family="ordinal" uses probit link (the original threshold model), family="categorical" uses logit link. The bivariate analysis would be m2<-MCMCglmm(cbind(y2,y1)~trait, random=~us(trait):species,rcov=us(trait):units, ginverse=list(species=Ainv), data=my.data, prior=prior, family=c("ordinal", "gaussian")) here 2x2 covariance matrices are set up at the phylogenetic and residual level. If we have these matrices as Va and Ve, then the assumption of the univariate model is that Va[2,1]/Va[1,1] = Ve[2,1]/Ve[1,1]. Alternative covariance structures could be used, for example ~idh(trait):species sets Va[2,1]=0 and ~idh(trait):units sets Ve[2,1]=0. Other less useful covariance functions for this type of model might be ~idv(trait):species (Va[2,1]=0, Va[1,1]=Va[2,2]) and ~species (Va[2,1]=Va[1,1]=Va[2,2]). The prior is important in models with discrete characters, because the residual variation is not identifiable. I fix it a priori at one, for example in the univariate model: prior$R=list(V=1, fix=1) and the bivariate model prior$R=list(V=diag(2), fix=2, nu=1.002) although you need to be more careful here, because the residual variation in y2 is identifiable and may be sensitive to the prior (inverse gamma in this instance). Note the ordering of the response (y2,y1) so that fix=2 fixes Ve[2,2]=1 (the residual variance of the binary character). The choice of fixing it at one is entirely arbitrary (most software chooses zero). Different values do change the estimates, but they can always be rescaled to what would have been estimated given another choice (see CourseNotes). I see there was some discussion of what to do when y1 has more than 2 states. family="ordinal" takes any number of states which are taken to be ordered. family="categorical" takes any number of states which are not ordered. "categorical" with probit link could be implemented (literally change plogis to pnorm at the 2/3 places it appears in the C code) but my guess is the answers will be indistinguishable in most cases. There are some drawbacks to modelling dependencies through correlated overdispersion (residuals) for non-gaussian data. However, I think these drawbacks do not apply to discrete data where overdispersion does not exist. With regards to the earlier posts on asymmetric transitions, if a probit link is used pnorm(0,intercept, sqrt(1+Va+Ve)) is approximately q01/(q10+q01) from the MK models. I have not been successful at finding an equivalence for q10+q01. Cheers, Jarrod Quoting Joe Felsenstein on Wed, 29 Aug 2012 12:41:48 -0700: Theodore Garland Jr wrote: Check this: Ives, A. R., and T. Garland, Jr. 2010. Phylogenetic logistic regression for binary dependent variables. Systematic Biology 59:9-26. In addition, check this: Felsenstein, J. 2012. A comparative method for both discrete and continuous characters using the threshold model. American Naturalist 179: 145-156. Joe Joe Felsenstein j...@gs.washington.edu Dept of Genome Sciences and Dept of Biology, Univ. of Washington, Box 5065, Seattle Wa 98195-5065 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] testing binomial characters
Theodore Garland Jr wrote: > Check this: > > Ives, A. R., and T. Garland, Jr. 2010. Phylogenetic logistic regression for > binary dependent variables. Systematic Biology 59:9-26. In addition, check this: Felsenstein, J. 2012. A comparative method for both discrete and continuous characters using the threshold model. American Naturalist 179: 145-156. Joe Joe Felsenstein j...@gs.washington.edu Dept of Genome Sciences and Dept of Biology, Univ. of Washington, Box 5065, Seattle Wa 98195-5065 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] testing binomial characters
Hi Jordan. One option is to use the threshold model from quantitative genetics and estimate the evolutionary correlation/covariance between the binary trait and the continuous characters. This approach is described in Felsenstein (2012; Am. Nat.) and implemented in the stand-alone C program, threshml (http://evolution.gs.washington.edu/phylip/download/threshml/). I also recently added a two character version (threshml can analyze an arbitrary number of binary & continuous traits) of this to phytools, described on my blog (http://phytools.blogspot.com/2012/08/bayesian-mcmc-for-threshold-model.html). If you decide to use phytools, you will have to download the latest version (http://faculty.umb.edu/liam.revell/phytools/nonstatic/phytools_0.1-91.tar.gz) and install from source as this in not in the current CRAN version. If you look at the blog post linked above you will also see that there was considerable discussion about whether it was possible to fit the same model using MCMCglmm. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://phytools.blogspot.com On 8/29/2012 3:23 PM, Jordan Golubov wrote: Dear All, I am trying to test whether a binomial character state (photoblastic seeds vs indifferent responsive seeds) in species of Cactaceae is affected by seed mass or length. 1) Is there a meas of identifying phylogenetic signal for a two character state? 2) Is there a way of testing what factor (both continuous seed mass/length) affects photoblastic rersponse, maybe a GLMM? Thanks ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] testing binomial characters
Check this: Ives, A. R., and T. Garland, Jr. 2010. Phylogenetic logistic regression for binary dependent variables. Systematic Biology 59:9-26. Cheers, Ted Theodore Garland, Jr. Professor Department of Biology University of California, Riverside Riverside, CA 92521 Office Phone: (951) 827-3524 Facsimile: (951) 827-4286 = Dept. office (not confidential) Email: tgarl...@ucr.edu http://www.biology.ucr.edu/people/faculty/Garland.html http://scholar.google.com/citations?hl=en&user=iSSbrhwJ Experimental Evolution: Concepts, Methods, and Applications of Selection Experiments. 2009. Edited by Theodore Garland, Jr. and Michael R. Rose http://www.ucpress.edu/book.php?isbn=9780520261808 (PDFs of chapters are available from me or from the individual authors) From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on behalf of Jordan Golubov [gfjor...@correo.xoc.uam.mx] Sent: Wednesday, August 29, 2012 12:23 PM To: r-sig-phylo@r-project.org Subject: [R-sig-phylo] testing binomial characters Dear All, I am trying to test whether a binomial character state (photoblastic seeds vs indifferent responsive seeds) in species of Cactaceae is affected by seed mass or length. 1) Is there a meas of identifying phylogenetic signal for a two character state? 2) Is there a way of testing what factor (both continuous seed mass/length) affects photoblastic rersponse, maybe a GLMM? Thanks -- Dr. Jordan Golubov Lab. Ecologia, Sistematica y FisiologiaVegetal Departamento El Hombre y Su Ambiente Universidad Autonoma Metropolitana Xochimilco Calz. del Hueso 1100, Col. Villa Quietud, Coyoacán 04960, México D. F. México "It is the mark of an educated mind to be able to entertain a thought without accepting it". >Aristotle ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo