GetMeansModified: The species means for the network model

Description Usage Arguments Value Author(s) References Examples

Description

This function returns the species mean for the network model. For the non hybrid species, it returns as a parameter μ and for hybrid species it returns μ+ \log β.

Usage

1
2
	GetMeansModified(x, phy, flow, actual.params)
	

Arguments

x

vector of the parameters: including rate of evolution σ^2, overall mean μ, measurement error SE, hybrid vigor β, variation at the burst of hybridization v_H.

phy

a class of phylo tree.

flow

a flow 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.

Value

the species mean

Author(s)

Brian O'Meara, Dwueng-Chwuan Jhwueng.

References

Jhwueng D.C. and O'Meara B.C. 2015. Trait evolution on phylogenetic networks. Submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
	#number of nonhybrd species
	ntax.nonhybrid<-5	
	#number of hybridspecies
	ntax.hybrid<-2
	#simulate 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)
    #set the parameter values
    sigma.sq <- 0.01;mu <- 1;SE <- 0;bt<-12;vh<-0
    par<-c(sigma.sq,mu,SE,bt,vh)
    names(par)<-c("sigma.sq","mu","SE","bt","vh")
    actual.params<-12
    names(actual.params)<-"bt"
	#calculate the species means
	GetMeansModified(par, network$phy, network$flow,actual.params)
	

BMhyd documentation built on May 2, 2019, 8:27 a.m.