View source: R/model.test.wrapper.R
model.test.wrapper | R Documentation |
A wrapper function for model.test
to perform a model fitting analysis on disparity through time data.
model.test.wrapper(
data,
model,
pool.variance = NULL,
time.split = NULL,
fixed.optima = FALSE,
control.list = list(fnscale = -1),
verbose = TRUE,
sim = 1000,
plot.sim = TRUE,
col.sim,
col.obs = "hotpink",
lwd.obs = 2,
show.p = FALSE,
cex.p,
legend = FALSE,
...
)
data |
A |
model |
The model(s) of evolution to allow for changes in disparity-through-time using a homogenous or hetergenous model, either using a single input or a list containing different models (see list in |
pool.variance |
If |
time.split |
The age of the change in mode ( |
fixed.optima |
A |
control.list |
A |
verbose |
|
sim |
The number of separate simulations (default = 1000). |
plot.sim |
Logical. If |
col.sim |
Colour options used for the plotting of simulated values. See |
col.obs |
Colour of the observed data on the plot. Default colour is |
lwd.obs |
Line width of the observed value. |
show.p |
Logical, when |
cex.p |
A numerical value for the the font size of the displayed p-value (if |
legend |
Logical, when |
... |
Any additional arguments to be passed to |
This function gives the relative fit of model.test
output using log-likelihood and AICc values, as well as the Rank Envelope Test significance to elucidate if empirical data is significantly different to simulated data modelled using the estimated model parameters from model.test.sim
. This is equivalent to running test <- model.test.sim(sim = 1000, model = model.test(data, model)); summary(test) ; plot(test) ; plot(data, add = TRUE)
.
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 peer-reviewed (what does a Brownian motion like disparity curve means biologically?).
A matrix with the relative fit, parameter values, and Rank Envelope test p values for each model, and a plot of simulated data from each model alongside observed data for each model if plot.sim is TRUE
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, 717-745.
Hansen TF. 1997. Stabilizing selection and the comparative analysis of adaptation. Evolution. 51, 1341-1351.
Harmon LJ, et al. 2010. Early bursts of body size and shape evolution are rare in comparative data. 64, 2385-2396.
Hunt G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology. 32, 578-601. 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, 4885-4890. DOI: 10.1073/pnas.1403662111
Felsenstein J. 1973. Maximum-likelihood estimation of evolutionary trees from continuous characters. American Journal of Human Genetics. 25, 471-492.
Felsenstein J. 1985. Phylogenies and the comparative method. The American Naturalist. 51, 1-15.
Murrell DJ. 2018. A global envelope test to detect non-random bursts of trait evolution. Methods in Ecology and Evolution. DOI: 10.1111/2041-210X.13006
model.test
, model.test.sim
, summary.dispRity
and plot.dispRity
## Not run:
## Mammal disparity through time
data(BeckLee_disparity)
## The models to be fit to disparity data
models <- list("BM", "OU", "multi.OU", "Trend")
## test all models, and assess the significance of simulated data
## against the empirical distribution for each
model.test.wrapper(data = BeckLee_disparity, model = models, fixed.optima = TRUE,
time.split = 66, show.p = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.