model.test  R Documentation 
Fit models of disparity change through time
model.test(
data,
model,
pool.variance = NULL,
time.split = NULL,
fixed.optima = FALSE,
control.list = list(fnscale = 1),
verbose = TRUE
)
data 
A 
model 
The model(s) of evolution to allow for changes in disparitythroughtime using a homogenous or hetergenous model, either using a single input or a list containing different models (See Details). If a vector with multiple modes is supplied then the model will test for shifts in modes at the time supplied by 
pool.variance 
If 
time.split 
The age of the change in mode ( 
fixed.optima 
A 
control.list 
A 
verbose 

DISCLAIMER: this function is working properly (i.e. it does what it is supposed to do), however, the interpretation of the results has not yet been thought through, discussed and peerreviewed (what does a Brownian motion like disparity curve means biologically?).
The models are fit using maximum likelihood optimisation using the function optim. Finetuning of the search algorithms can be applied using the control.list
argument. Models can be fit using a homogenous model with the same process applied to the entire sequence or models with time splits that represent a change in parameters or a shift in mode. When a heterogeneous and/or a timeshift model is specified with a specified time.split
then the shift is tested at that value only. If no time shift is supplied then multiple shift times are tested, with all bins that allow for at least 10 bins either side of the split. If the entire sample is fewer than 30 samples long then no time splits are searched for (unless a time split is supplied by the user). Parameters are shared across different modes. For example, c("BM", "OU")
would fit a model in which the process starts with a BM model and shifts to an OU process. The ancestral value at the start of the sequence and sigma squared value are shared across the models. Any combination of the following homogenous models (with the exception of "multi.OU"
) can be fit to the data:
BM: Fits a unbiased random walk model of Brownian motion evolution (Felsenstein 1973; 1985; Hunt 2006). The model optimises the ancestral state and the 'stepvariance' (sigmasquared).
OU: The OrnsteinUhlenbeck model of evolution in which the change in variance is constrained to an optimum value (Hansen 1997). In this model there are three parameters: optima, alpha, and ancestral state. The strength of attraction based on the parameter alpha and the ancestral state is estimated from the data. The optima value is estimated from the data, and this can lead to optima being found outside the known data values, and thus the model can resemble a trend. If the argument fixed.optima = TRUE
, the model will not estimate optima but constrain it to the first (ancestral) value in the sequence as is done in phylogenetic OU models.
Trend: Fits a Brownian motion model with a directional component. This model is also known as the General Random Walk (Hunt 2006). This model has three parameters: the ancestral state, the 'stepvariance' (sigmasquared), and the positive or negative trend.
Stasis: Fits a model in which traits evolve with variance (omega) around a mean (theta). This model is timeindependent in that the model is guided only by the variance and attraction to the mean (Hunt 2006).
EB: EarlyBurst, trait variance accumulates early in the evolution of a trait and decreases exponentially through time (Blomberg et al. 2003; Harmon et al. 2010). This model has three parameters: ancestral state, sigmasquared, and the exponential rate of decrease. Note this model expects the mean to remain unchanged through the model, so does not explicitly model a rapid change to a new mean or optimum value.
multi.OU: Fits a model in which the value of the optima shifts at one or more time splits. The values of the 'stepvariance' (sigma squared) and attraction to the optima (alpha) are shared across all the samples. This model can not be fit with other models  the multi.OU system can be fit to the model only.
A list of class dispRity
and model.test
that can be plotted and summarised via summary.dispRity
and plot.dispRity
.
The list is composed of:
$aic.models
summary for each model's small sample Akaike Information Criterion (AICc), delta AICc, and AICc weight
$full.models
the list of the full models outputs from optim
with the estimated parameters, loglikelihood, convergence statistics, and the split.time if applicable
$call
the model input
$models.data
input data used by the model(s)
$fixed.optima
Logical indicating whether a fixed optima was assumed for OU model(s)
Mark N Puttick and Thomas Guillerme
Blomberg SP, Garland T Jr, & Ives AR. 2003. Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution. 57, 717745.
Hansen TF. 1997. Stabilizing selection and the comparative analysis of adaptation. Evolution. 51, 13411351.
Harmon LJ, et al. 2010. Early bursts of body size and shape evolution are rare in comparative data. 64, 23852396.
Hunt G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology. 32, 578601. DOI: 10.1666/05070.1.
Hunt G, Hopkins MJ & Lidgard S. 2015. Simple versus complex models of trait evolution and stasis as a response to environmental change. Proceedings of the National Academy of Sciences. 112, 48854890. DOI: 10.1073/pnas.1403662111
Felsenstein J. 1973. Maximumlikelihood estimation of evolutionary trees from continuous characters. American Journal of Human Genetics. 25, 471492.
Felsenstein J. 1985. Phylogenies and the comparative method. The American Naturalist. 51, 115.
Murrell DJ. 2018. A global envelope test to detect nonrandom bursts of trait evolution. Methods in Ecology and Evolution. DOI: 10.1111/2041210X.13006
model.test.wrapper
, model.test.sim
, summary.dispRity
and plot.dispRity
## Not run:
## Mammal disparity through time
data(BeckLee_disparity)
## The four models to fit
models < list("BM", "OU", "multi.OU", c("BM", "OU"))
## Fitting the four models to the disparity data
tests < model.test(BeckLee_disparity, models, time.split = 66)
## Summarising the models
summary(tests)
## Plotting only the models support
plot(tests)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.