Description Usage Arguments Details Value Author(s) References Examples
A function returns the variance covariance function for the network model under the Brownian motion for trait evolution.
1 2 | GetVModified(x, phy, flow, actual.params)
|
x |
vector of the parameters: including rate of evolution σ^2, overall mean μ, measurement error SE, hybrid vigor β, and variation at the burst of hybridization v_H. |
phy |
a class of phylo tree. |
flow |
a struture of gene flow. |
actual.params |
The parameters that are related to the hybridzation including the hybrid vigor β and variation at the burst of hybridization v_H. |
This functon calculates the variance covariance matrix under the network model. The function first read tree in phylo class and convert the variance covariance matrix use the Brownian motion model. It then uses the structure of the gene flow to identify the hybrid species, parents and the direction of the flow. The covariance of between the hybrid and non hybrid species is the weighted sum of the covariance from evolution along the tree plus evolution along the migration path. For the detail model descript, please see Jhwueng and O'Meara 2015.
the variance covariance matrix of size equal to the number of species on the tip of the phylogeny.
Brian O'Meara, Dwueng-Chwuan Jhwueng.
Jhwueng D.C. and O'Meara B.C. 2015. Trait evolution on phylogenetic networks. Submitted.
1 2 3 4 5 6 7 8 9 10 11 12 | #set the number of non hybrid species
ntax.nonhybrid<-4
#set the number of hybrid species
ntax.hybrid<-1
#simulate a network
network<-SimulateNetwork(ntax.nonhybrid=ntax.nonhybrid, ntax.hybrid=ntax.hybrid,
flow.proportion=0.5, origin.type='clade', birth = 1, death = 0.5, sample.f = 0.5,
tree.height = 1, allow.ghost=FALSE)
#assign the parameter values
sigma.sq <- 0.01;mu <- 1;SE <- 0
#get the variance covariance matrix
GetVModified(c(sigma.sq,mu,SE), network$phy, network$flow, "bt")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.