-
Notifications
You must be signed in to change notification settings - Fork 4
Influential clades
Gustavo Paterno edited this page Dec 14, 2017
·
8 revisions
The clade
method can be used to estimate and test the influence of
specific clades on parameter estimates.
- Additional arguments:
clade.col: The name of a column in the provided data frame with clades specification (a character vector with clade names).
n.species: Minimum number of species in the clade in order to include this clade in the leave-one-out deletion analysis. Default is 5.
n.sim: The number of repetitions for the randomization test
data(primates)
# run analysis:
clade <- clade_phylm(log(sexMaturity) ~ log(adultMass), phy = primates$phy[[1]],
data = primates$data, clade.col = "family")
# To check summary results and most influential clades:
summary(clade)
# Visual diagnostics for clade removal:
sensi_plot(clade, "Cercopithecidae")
sensi_plot(clade, "Cebidae")
sensi_plot(clade, "Cercopithecidae")
sensi_plot(clade, "Cebidae")
# Logtransform data
alien.data$logMass <- log(alien.data$adultMass)
# Run sensitivity analysis:
clade <- clade_physig(trait.col = "logMass", data = alien.data, n.sim = 100,
phy = alien.phy[[1]], clade.col = "family", method = "K")
summary(clade)
sensi_plot(clade, "Bovidae")
sensi_plot(clade, "Sciuridae")
sensi_plot(clade, "Bovidae")
sensi_plot(clade, "Sciuridae")
# Load data:
data("primates")
# Model trait evolution accounting for influential clades
clade_cont <- clade_continuous(data=primates$data, phy = primates$phy[[1]],
model="OU", trait.col = "adultMass", clade.col="family", n.sim=30, n.species=10,
n.cores = 2, track=TRUE)
# Check summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
summary(clade_cont)
# Visual diagnostics
sensi_plot(clade_cont,graph="all")
# Plot only one clade and one parameter
sensi_plot(clade_cont,clade="Cebidae",graph = "optpar")
sensi_plot(clade_cont,clade="Cebidae",graph = "optpar")
Different evolutionary models from fitContinuous
can be used: BM
,OU
,
EB
, trend
, lambda
, kappa
, delta
and drift
.
# Load data:
data("primates")
# Create a binary trait factor
primates$data$adultMass_binary<-ifelse(primates$data$adultMass > 7350, "big", "small")
# Model trait evolution accounting for influential clades
clade_disc <- clade_discrete(data=primates$data,phy = primates$phy[[1]],
model="ARD",transform="kappa",
trait.col = "adultMass_binary",clade.col="family",n.sim = 30,
n.species=8,n.cores = 2)
# Check summary statistics:
summary(clade_disc)
# Visual diagnostics
sensi_plot(clade_disc)
sensi_plot(clade_disc)
Different character models from fitDiscrete
can be fit by changing the model
argument.
These include ER
(equal-rates), SYM
(symmetric), ARD
(all-rates-different)
and meristic
(stepwise fashion). Similarly, all transformations to the phylogenetic tree
from fitDiscrete
can be used: none
, EB
, lambda
, kappa
and delta
.