This function takes an object of class "phylo"
or class "simmap"
with a mapped binary or multistate trait (see read.simmap
) and data for a single continuously valued character. It then fits the Brownian rate variation ("noncensored") model of O'Meara et al. (2006; Evolution). This is also the basic model implemented in Brian O'Meara's Brownie software.
brownie.lite(tree, x, maxit=2000, test="chisq", nsim=100, se=NULL, ...)
An object of class "brownie.lite"
containing the following components:
is the rate, \(\sigma^2\), for a single-rate model. This is usually the "null" model.
is the estimated state at the root node for the single rate model.
variance on the single rate estimator - obtained from the Hessian.
log-likelihood of the single-rate model.
number of parameters in the single rate model (always 2).
is a length p (for p rates) vector of BM rates (\(\sigma_1^2\), \(\sigma_2^2\), and so on) from the multi-rate model.
is the estimated state at the root node for the multi-rate model.
p x p variance-covariance matrix for the p rates - the square-roots of the diagonals should give the standard error for each rate.
log-likelihood of the multi-rate model.
number of parameters in the multi-rate model (p+1).
P-value for a likelihood ratio test against the \(\chi^2\) distribution; or
P-value for a likelihood ratio test agains a simulated null distribution.
logical value indicating if the likelihood optimization converged.
a phylogenetic tree either as an object of class "phylo"
or "simmap"
. (See read.simmap
, make.simmap
, or paintSubTree
for more details about the latter object class.)
a vector of tip values for species. names(x)
should be the species names.
an optional integer value indicating the maximum number of iterations for optimization - may need to be increased for large trees.
an optional string indicating the method for hypothesis testing - options are "chisq"
or "simulation"
.
number of simulations (only used if test="simulation"
).
a vector containing the standard errors for each estimated mean in x
.
optional arguments.
Liam Revell liam.revell@umb.edu
Sampling error in the estimation of species means can also be accounted for by assigning the vector se
with the species specific sampling errors for x
.
O'Meara, B. C., C. Ane, M. J. Sanderson, and P. C. Wainwright. (2006) Testing for different rates of continuous trait evolution using likelihood. Evolution, 60, 922-933.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
brownieREML
, evol.vcv
, ratebytree
## load data from Revell & Collar (2009)
data(sunfish.tree)
data(sunfish.data)
## extract character of interest
buccal.length<-setNames(sunfish.data$buccal.length,
rownames(sunfish.data))
## fit model
multiBM.fit<-brownie.lite(sunfish.tree,
buccal.length)
print(multiBM.fit)
Run the code above in your browser using DataLab