
Last chance! 50% off unlimited learning
Sale ends in
varCompPhylip(x, phy, exec = NULL)
varA
and varE
with the phylogenetic
(additive) and phenotypic (environmental) variance-covariance
matrices. If a single trait is analyzed, these contains its variances.x
can be in several forms: (i) a numeric vector if
there is single trait and one observation per species; (ii) a
matrix or data frame if there are several traits (as columns) and a
single observation of each trait for each species; (iii) a list of
vectors if there is a single trait and several observations per
species; (iv) a list of matrices or data frames: same than (ii) but
with several traits and the rows are individuals. If x
has names, its values are matched to the tip labels of
phy
, otherwise its values are taken to be in the same order
than the tip labels of phy
.
Phylip (version 3.68 or higher) must be accessible on your computer. If
you have a Unix-like operating system, the executable name is assumed
to be "phylip contrast"
(as in Debian); otherwise it is set
to "contrast"
. If this doesn't suit your system, use the
option exec
accordingly. If the executable is not in the path, you
may need to specify it, e.g., exec = "C:/Program Files/Phylip/contrast"
.
Felsenstein, J. (2008) Comparative methods with sampling error and within-species variation: Contrasts revisited and revised. American Naturalist, 171, 713--725.
pic
, pic.ortho
, compar.lynch
tr <- rcoal(30)
### Five traits, one observation per species:
x <- replicate(5, rTraitCont(tr, sigma = 1))
varCompPhylip(x, tr) # varE is small
x <- replicate(5, rnorm(30))
varCompPhylip(x, tr) # varE is large
### Five traits, ten observations per species:
x <- replicate(30, replicate(5, rnorm(10)), simplify = FALSE)
varCompPhylip(x, tr)
Run the code above in your browser using DataLab