Simulates a binary trait along a phylogeny, according to the model in Ives and Garland (2010).
Usage
rbinTrait(n=1, phy, beta, alpha, X = NULL, model = c("LogReg"))
Arguments
n
number of independent replicates
phy
a phylogenetic tree of type phylo with brach lengths.
beta
a vector of coefficients for the logistic regression model.
alpha
the phylogenetic correlation parameter.
X
a design matrix with one row for each tip in the phylogenetic tree
model
Currently, only phylogenetic logistic regression is implemented.
Value
If n=1, a numeric vector of 0-1 values with names from the
tip labels in the tree. For more than 1 replicate, a matrix with the
tip labels as row names, and one column per replicate.
encoding
utf-8
References
Ives, A. R. and T. Garland, Jr. 2010. "Phylogenetic logistic regression
for binary dependent variables". Systematic Biology 59:9-26.