Functions describing various models of 'intrinsic' evolution (i.e. evolutionary processes intrinsic to the evolving lineage, independent of other evolving lineages (competitors, predators, etc).

nullIntrinsic(params, states, timefrompresent)

brownianIntrinsic(params, states, timefrompresent)

boundaryIntrinsic(params, states, timefrompresent)

boundaryMinIntrinsic(params, states, timefrompresent)

boundaryMaxIntrinsic(params, states, timefrompresent)

autoregressiveIntrinsic(params, states, timefrompresent)

maxBoundaryAutoregressiveIntrinsic(params, states, timefrompresent)

minBoundaryAutoregressiveIntrinsic(params, states, timefrompresent)

autoregressiveIntrinsicTimeSlices(params, states, timefrompresent)

autoregressiveIntrinsicTimeSlicesConstantMean(params, states, timefrompresent)

autoregressiveIntrinsicTimeSlicesConstantSigma(params, states, timefrompresent)

Arguments

params

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

states

Vector of current trait values for a taxon. May be multiple 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 intrinsic models are:

nullIntrinsic describes a model of no intrinsic character change. It has no parameters, really.

brownianIntrinsic describes a model of intrinsic character evolution via Brownian motion. The input parameters for this model are: boundaryIntrinsic with parameters params = sigma

boundaryIntrinsic describes a model of intrinsic character evolution where character change is restricted above a minimum and below a maximum threshold. The input parameters for this model are: boundaryMinIntrinsic with parameters params = sigma, minimum, maximum

boundaryMinIntrinsic describes a model of intrinsic character evolution where character change is restricted above a minimum threshold. The input parameters for this model are: boundaryMinIntrinsic with parameters params = sigma, minimum

autoregressiveIntrinsic describes a model of intrinsic character evolution. New character values are generated after one time step via a discrete-time OU process. The input parameters for this model are: autoregressiveIntrinsic with params = sigma (sigma), attractor (character mean), attraction (alpha)

minBoundaryAutoregressiveIntrinsic describes a model of intrinsic character evolution. New character values are generated after one time step via a discrete-time OU process with a minimum bound. The input parameters for this model are: MinBoundaryAutoregressiveIntrinsic with parameters params = sigma (sigma), attractor (character mean), attraction (alpha), minimum

autoregressiveIntrinsicTimeSlices describes a model of intrinsic character evolution. New character values are generated after one time step via a discrete-time OU process with differing means, sigma, and attraction over time. In the various TimeSlices models, time threshold units are in time before present (i.e., 65 could be 65 MYA). The last time threshold should be 0. The input parameters for this model are: autoregressiveIntrinsicTimeSlices with parameters params = sd-1 (sigma-1), attractor-1 (character mean-1), attraction-1 (alpha-1), time threshold-1, sd-2 (sigma-2), attractor-2 (character mean-2), attraction-2 (alpha-2), time threshold-2

autoregressiveIntrinsicTimeSlicesConstantMean describes a model of intrinsic character evolution. New character values are generated after one time step via a discrete-time OU process with differing sigma and attraction over time The input parameters for this model are: autoregressiveIntrinsicTimeSlicesConstantMean with parameters params = sd-1 (sigma-1), attraction-1 (alpha-1), time threshold-1, sd-2 (sigma-2), attraction-2 (alpha-2), time threshold-2, attractor (character mean)

autoregressiveIntrinsicTimeSlicesConstantSigma describes a model of intrinsic character evolution. New character values are generated after one time step via a discrete-time OU process with differing means and attraction over time. The input parameters for this model are: autoregressiveIntrinsicTimeSlicesConstantSigma with parameters params = sigma (sigma), attractor-1 (character mean-1), attraction-1 (alpha-1), time threshold-1, attractor-2 (character mean-2), attraction-2 (alpha-2), time threshold-2

See also

Another intrinsic model with multiple optima is described at multiOptimaIntrinsic. Extrinsic models are described at abcmodels.extrinsic.

Author

Brian O'Meara and Barb Banbury

Examples

# \donttest{ set.seed(1) # Examples of simulations with various intrinsic models (and null extrinsic model) tree <- rcoal(20) # get realistic edge lengths tree$edge.length <- tree$edge.length*20 #Simple Brownian motion Intrinsic Model char <- doSimulation( phy = tree, intrinsicFn = brownianIntrinsic, extrinsicFn = nullExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0.01), extrinsicValues = c(0), 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
# Simple model with BM, but a minimum bound at 0, max bound at 15 char <- doSimulation( phy = tree, intrinsicFn = boundaryIntrinsic, extrinsicFn = nullExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0.01, 0, 15), extrinsicValues = c(0), 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
# Autoregressive (Ornstein-Uhlenbeck) model # with minimum bound at 0 char <- doSimulation( phy = tree, intrinsicFn = minBoundaryAutoregressiveIntrinsic, extrinsicFn = nullExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0.01, 3, 0.1, 0), extrinsicValues = c(0), 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
# Autoregressive (Ornstein-Uhlenbeck) model # with max bound at 1 char <- doSimulation( phy = tree, intrinsicFn = maxBoundaryAutoregressiveIntrinsic, extrinsicFn = nullExtrinsic, startingValues = c(10), #root state intrinsicValues = c(0.01, 3, 0.1, 1), extrinsicValues = c(0), 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
# }