Re: [R-sig-phylo] compare.gee issues with multiple predictor models
Hi Emmanuel, Thank you so much for those answers! Sandra. 2013/7/3 Emmanuel Paradis emmanuel.para...@ird.fr Hi Sandra, Le 01/07/2013 22:03, sandra goutte a écrit : Hello all, I am sorry if the question has already been answered, i have not found it int the archive. I am using compar.gee to look at possible correlations between behavioral traits and ecological variables. I have two problems: 1) if i try a model with more than 3 predictors, the function cannot compute the p-values. Is that a problem of df? Yes. In other words, your species are too closely related to give enough information to compute the P-values, but this is for GEEs only. Since you use a gaussian family for the response, you could use gls() instead: the estimated coefficients will be the same and you'll get P-values. 2) this one is more problematic to me: if i add predictors in my model, it actually changes the values estimated for the first one. to be clear here is an example of my output: That's expected and this is for any kind of regression models (and most estimation problems). Try with lm() if you want to make sure. Best, Emmanuel # with only canopy as a predictor Call: compar.gee(formula = DF ~ canopy, phy = tree2) Number of observations: 18 Model: Link: identity Variance to Mean Relation: gaussian QIC: 225.2231 Summary of Residuals: Min 1Q Median 3QMax -1.3742940 -0.6158815 1.1275603 2.6748027 10.2016164 Coefficients: EstimateS.E.t Pr(T |t|) (Intercept) 2.21716210 2.366080952 0.937061 0.43327224 canopy 0.02050857 0.006936446 2.956640 0.07879305 Estimated Scale Parameter: 12.71506 Phylogenetic df (dfP): 4.395587 # with canopy and splfrog as predictors Call: compar.gee(formula = DF ~ splfrog * canopy, phy = tree2) Number of observations: 18 Model: Link: identity Variance to Mean Relation: gaussian QIC: 197.5136 Summary of Residuals: Min 1Q Median 3QMax -1.4887445 -0.4669401 1.0553884 2.1243035 9.7526188 Coefficients: Estimate S.E. t Pr(T |t|) (Intercept)-1.2294629060 3.8542626753 -0.3189878 0.8481567 splfrog 0.0638736816 0.0542900060 1.1765274 0.6056463 canopy 0.0308125063 0.0507169033 0.6075392 0.7408100 splfrog:canopy -0.0002361583 0.0007856787 -0.3005787 0.8561095 Estimated Scale Parameter: 12.32929 Phylogenetic df (dfP): 4.395587 The values ar really different! Am i missing something obvious? Thank you all in advance for your help! Sandra. __**_ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/**listinfo/r-sig-phylohttps://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-** sig-ph...@r-project.org/http://www.mail-archive.com/r-sig-phylo@r-project.org/ -- PhD Student Muséum National d'Histoire Naturelle Département Systématique et Évolution USM 601 / UMR 7205 Origine, Structure et Évolution de la Biodiversité Reptiles Amphibiens - Case Postale 30 25 rue Cuvier F-75005 Paris Tel : +33 (0) 1 40 79 34 90 Mobile: +33 (0) 6 79 20 29 99 [[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] tps format problem reading in R
Hi John, There were two issues here, and both of which have easy fixes. First, there is only 1 specimen in your tps file, and the current version of readland.tps() was written for datasets with more than one specimen (we didn't envision folks reading in a single specimen for a morphometric analysis). This is easily fixed by changing the 3rd to last line of the function as below. Next, your file had a non-numeric ID for the specimen. To catch this, change the 4th to last line of the function as below. These two lines should now read: ID -sub(ID=, , tpsfile[grep(ID, tpsfile)]) #delete the 'as.numeric' dimnames(coords)[[3]] - as.list(imageID) # add 'as.list' The updated function code is attached, and will be in the next update of geomorph. Thanks for catching these; this makes the function more general. Best, Dean -- Dr. Dean C. Adams Professor Department of Ecology, Evolution, and Organismal Biology Department of Statistics Iowa State University Ames, Iowa 50011 www.public.iastate.edu/~dcadams/ phone: 515-294-3834 -Original Message- From: r-sig-phylo-boun...@r-project.org [mailto:r-sig-phylo-boun...@r-project.org] On Behalf Of John Denton Sent: Tuesday, July 02, 2013 10:20 PM To: r-sig-phylo@r-project.org Subject: [R-sig-phylo] FW: tps format problem reading in R Hi folks, I'm trying to read a tps file in the geomorph v1.1-1 R package using readland.tps(file), but every time I try the above, I get the error Error in dimnames(coords)[[3]] - imageID : 'dimnames' must be a list In addition: Warning message: In readland.tps(Lter_mean.TPS) : NAs introduced by coercion I do not get the error when I read in some of my other tps files (all of which were produced using append files in tpsUtil). The file I'm trying to read in is the side-averaged Procrustes coordinates, generated in MorphoJ. I've checked the hidden formatting, the line breaks, the number of decimal places, and the related file image extension, but I can't seem to figure it out. The file is attached. ~John John S. S. Denton Ph.D. Candidate Department of Ichthyology and Richard Gilder Graduate School American Museum of Natural History www.johnssdenton.com readland.tps Description: readland.tps ___ 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] obtaining reasonable values from OUCH (Krzysztof Bartoszek)
Hi, For multiple co-evolving traits you can also look at the mvSLOUCH package, http://www.math.chalmers.se/~krzbar/mvSLOUCH/mvSLOUCH.html Bartoszek et. al., A phylogenetic comparative method for studying multivariate adaptation, Journal of Theoretical Biology, 314:204-215, 2012. However you can also run into the problem of the model parameters being overly large but I observed that the resulting model covariance matrix, stationary covariance matrix and eigenvalues of the drift matrix were estimated usually better. Due to the high parameter space you should run the estimation procedure a couple of times and also specify the matrix types in the model. Good luck! Krzysztof Bartoszek ___ 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] question about measurement error in phylogenetic signal
Hello all, I have been trying to get something to work in a number of different packages and with a number of different approaches today that I couldn't get to run in a believable way. Before I spend another day on this, I was wondering what people think about the idea in general. I have a dataset of disease prevalence across ~100 species. There are ~2000 individuals total across the dataset, with 4 individuals per species. Prevalence per individual is coded as 0 or 1. I am interested in the phylogenetic signal of disease prevalence across the species. One approach that works is to simply calculate prevalence as the species-specific mean, i.e. if 3 individuals of 6 for a species had the disease, the prevalence would be 3/6 = 0.5. Then one can use these values with e.g. phylosig() (I arcsin sqrt transformed these proportions here). Like the few other published tests of phylogenetic signal in disease prevalence, there is little signal here. I could leave it at that, because in general there are very low detections in this dataset and it's probably not ideally suited to address this question anyhow. That aside however, because not all individuals of a given species always have the disease, I wanted to incorporate measurement error. So, based on the calculation for SE for binary data from the site: http://www.researchgate.net/post/Can_standard_deviation_and_standard_error_be_calculated_for_a_binary_variable, I also calculated a species-specific SEs as the sqrt(mean(prevalence)*((1- mean(prevalence))/individuals)). What do people think about this? It's hardly measurement error in the sense we normally mean it. On the other hand, I think it would be neat if there were some way to account for variation among individuals in prevalence, and the influence this has on phylogenetic signal. Cheers, Eliot [[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/
[R-sig-phylo] workshop on phylogeography
Hi all, I'm looking for information on workshops, trainings or courses that include phylogeography. That could be with R of course, but not absolutely necessarily. If you organize, or know about, such a course or workshop, at the PhD-candidate level and/or above, and in English preferably, please let me know. Thanks in advance. Best, Emmanuel ___ 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/