Functions describing various models of 'extrinsic' evolution (i.e. evolutionary processes dependent on factors extrinsic to the evolving lineage, such as environmental change, or other evolving lineages that interact with the lineage in question (competitors, predators, etc).

nullExtrinsic(params, selfstates, otherstates, timefrompresent)

nearestNeighborDisplacementExtrinsic(
  params,
  selfstates,
  otherstates,
  timefrompresent
)

everyoneDisplacementExtrinsic(params, selfstates, otherstates, timefrompresent)

ExponentiallyDecayingPushExtrinsic(
  params,
  selfstates,
  otherstates,
  timefrompresent
)

Arguments

params

A vector containing input parameters for the given model (see Description below on what parameters).

selfstates

Vector of current trait values for the population of interest. May be multiple for some models, but generally expected to be only a single value. Multivariate TreEvo is not yet supported.

otherstates

Matrix of current trait values for all concurrent taxa/populations other than the one of interest, with one row for each taxon, and a column for each trait. May be multiple states per taxa/populations for some models, but generally expected to be only a single value. Multivariate TreEvo is not yet supported.

timefrompresent

The amount of time from the present - generally ignored except for time-dependent models.

Value

A vector of values representing character displacement of that lineage over a single time step.

Details

The following extrinsic models are:

nullExtrinsic describes a model of no extrinsic character change. It has no parameters, really.

nearestNeighborDisplacementExtrinsic describes a model of extrinsic trait evolution where character values of a focal taxon depend on the values of closest relatives on the tree (e.g. competitive exclusion). The input parameters for this model are: nearestNeighborDisplacementExtrinsic with parameters params = sigma, springK, maximumForce

everyoneDisplacementExtrinsic describes a model of extrinsic trait evolution where the character values of a focal taxon depend on the values of all co-extant relatives on the simulated tree. The input parameters for this model are: everyoneDisplacementExtrinsic with parameters params = sigma, springK, maximumForce

ExponentiallyDecayingPushExtrinsic describes a model of extrinsic trait evolution where the character values of a focal taxon is 'pushed' away from other taxa with similar values, but the force of that 'push' exponentially decays as lineages diverge and their character values become less similar. The input parameters for this model are: ExponentiallyDecayingPushExtrinsic with parameters params = sigma, maximumForce, halfDistance

See also

Intrinsic models are described at intrinsicModels.

Author

Brian O'Meara and Barb Banbury

Examples

# \donttest{ set.seed(1) # Examples of simulations with various extrinsic models (and null intrinsic model) tree <- rcoal(20) # get realistic edge lengths tree$edge.length <- tree$edge.length*20 #No trait evolution except due to # character displacement due to nearest neighbor taxon char <- doSimulation( phy = tree, intrinsicFn = nullIntrinsic, extrinsicFn = nearestNeighborDisplacementExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0), extrinsicValues = c(0.1, 0.1, 0.1), generation.time = 100000)
#> Warning: You have only 22 timeSteps on the shortest branch in this dataset #> but should probably have a lot more if you expect change on this branch. #> Please consider decreasing timeStep to no more than 0.0016
#Similarly, no trait evolution except due to # character displacement from all other taxa in the clade char <- doSimulation( phy = tree, intrinsicFn = nullIntrinsic, extrinsicFn = everyoneDisplacementExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0), extrinsicValues = c(0.1, 0.1, 0.1), generation.time = 100000)
#> Warning: You have only 22 timeSteps on the shortest branch in this dataset #> but should probably have a lot more if you expect change on this branch. #> Please consider decreasing timeStep to no more than 0.0016
# A variant where force of character displacement decays exponentially # as lineages become more different char <- doSimulation( phy = tree, intrinsicFn = nullIntrinsic, extrinsicFn = ExponentiallyDecayingPushExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0), extrinsicValues = c(0.1, 0.1, 2), generation.time = 100000)
#> Warning: You have only 22 timeSteps on the shortest branch in this dataset #> but should probably have a lot more if you expect change on this branch. #> Please consider decreasing timeStep to no more than 0.0016
# }