Dear All,

I am using a data set of about 600 plant species to test for phylogenetic 
signal in shifts in flowering time. The trait data are slopes generated by 
regressing year against flowering onset for each species. When I use 
phylosignal (picante) vs. phylosig (phytools) to get K, I get the same K values 
but different p-values, regardless of how many simulations I run. For example, 
with 20,000 simulations using phylosignal, K = 0.185 and p = 0.015; using 
phylosig, K = 0.185 and p = 0.073. My understanding is that the two methods use 
different approaches to generate p-values, but should arrive at the same 
answer. Any explanations for this difference, or ways to correct mistakes I am 
making, would be greatly appreciated.

Here is the code I�m using:

library(picante)

library(phytools)

samp <- readsample("sampleslopes.txt")

phy <- read.tree("davies_tree2013.txt")

traits <- read.table("traitsslopes.txt", header = TRUE, row.names = 1)

prunedphy <- prune.sample(samp, phy)

samp <- samp[, prunedphy$tip.label]

traits <- traits[prunedphy$tip.label, ]

names(traits) <- prunedphy$tip.label

is.binary.tree(prunedphy)

prunedphy <- multi2di(prunedphy)

is.binary.tree(prunedphy)


phylosignal(traits, prunedphy, reps = 20000)

         K PIC.variance.obs PIC.variance.rnd.mean PIC.variance.P

1 0.185098      0.001584913           0.001817674     0.01519924

  PIC.variance.Z

1      -1.901372

phylosig(prunedphy, traits, method = "K", test = TRUE, nsim = 20000)

$K

[1] 0.185098


$P

[1] 0.07275

Many thanks in advance for your time and help.
Nicole


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

Reply via email to