tag:blogger.com,1999:blog-8499895524521663926.post3601797957206279889..comments2024-10-08T05:57:43.045-04:00Comments on Phylogenetic Tools for Comparative Biology: Significant update to phyl.pairedttest for phylogenetic paired t-test in RLiam Revellhttp://www.blogger.com/profile/04314686830842384151noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8499895524521663926.post-27029526070053426672022-11-17T02:55:51.672-05:002022-11-17T02:55:51.672-05:00Dear Liam,
I had posted earlier about a question a...Dear Liam,<br />I had posted earlier about a question about the phylogenetic paired t-test, and with your help I got it sorted (I think, in the end it was also partly a problem with incompatibility of different versions of R and the package, which I could not resolve working on an office computer earlier). Now everything is running fine, but I am a bit surprised by the outcome, fearing that I make some mistake in my settings. I am looking at body masses of male primates (27 species) from captive or wild populations. When I calculate the lambda, I get a very large lambda, which is highly significantly different from 0.<br />> (signal_C<-phylosig(baum, captive, method="lambda", test=TRUE))<br /><br />Phylogenetic signal lambda : 0.999934 <br />logL(lambda) : -14.3279 <br />LR(lambda=0) : 40.3972 <br />P-value (based on LR test) : 2.07242e-10 <br /><br />When I then run the paired test using the "Fixed=FALSE" option, I still get a test-outcome that seems to suggest that lambda is taken as zero (yielding overall significant differences between captive and wild body masses, which in itself is not surprising).<br />> lambda<-signal_C$lambda<br />> <br />> phyl.pairedttest(tree=baum,wild,captive, lambda=lambda, fixed=FALSE)<br /><br />Phylogenetic paired t-test:<br /><br /> t = -4.10251, df = 24, p-value = 0.000406537<br /><br />alternative hypothesis:<br /> true difference in means is not equal to 0<br /><br />95 percent confidence interval on the phylogenetic<br />difference in mean:<br /> [-0.086297, -0.0304976]<br /><br />estimates:<br /> phylogenetic mean difference = -0.0583973 <br /> sig^2 of BM model = 6.27146e-05 <br /> lambda (fixed or estimated) = 0 <br /><br />log-likelihood:<br /> 32.0024 <br /><br />In contrast, if I use the Fixed=TRUE option, and lambda is forced to be 0.99, then the difference between the means is not deemed to be statistically different.<br />> phyl.pairedttest(tree=baum,wild,captive, lambda=lambda, fixed=TRUE)<br /><br />Phylogenetic paired t-test:<br /><br /> t = -0.395143, df = 25, p-value = 0.696089<br /><br />alternative hypothesis:<br /> true difference in means is not equal to 0<br /><br />95 percent confidence interval on the phylogenetic<br />difference in mean:<br /> [-0.302461, 0.200968]<br /><br />estimates:<br /> phylogenetic mean difference = -0.0507465 <br /> sig^2 of BM model = 0.00073346 <br /> lambda (fixed or estimated) = 0.999934 <br /><br />log-likelihood:<br /> 18.1789 <br /><br />So now I am concerned about how lambda is estimated when Fixed=FALSE (which seems intuitively the more appropriate option) and that it does not what I think it does, i.e. to use the data to estimate whether phylogeny is important to take into account.<br />Sorry for the length of this - but could you tell me whether I could be reasonably confident about my fixed=FALSE approach, when the original lambda estimate was significiantly different from 0?<br />Marenhttps://www.blogger.com/profile/18374476859475515882noreply@blogger.com