Description Usage Arguments Details Value Author(s) References Examples
SimEvo
performs a simulation of shape variation using a modification of Lande's evolutionary model Polly 2004
1 | SimEvo(vari, consensusvec, resids, ngen, fsamp)
|
vari |
Variation coefficient |
consensusvec |
Consensus shape (vectorized form) |
resids |
GPA residuals matrix |
ngen |
Number of generations of simulations (Default: 1000000 steps). |
fsamp |
Frequency of samples (Default: 1000000 steps). |
Lande's evolutionary model defines mean morphological variation over generations Δ Z as:
Delta Z = beta*G
where G is the additive genetic covariance matrix, and β are selection coefficients applied to the morphological structure. Polly 2004 proposes a modification of this equation in order to use it with morphological data instead of genetic data:
Delta Z = beta*H*P
where P is the phenotypic covariance matrix, and H is an heritability matrix (See Polly 2004 for more information).
resids
will be used as the phenotypic covariance matrix, and vari
will be used to simulate β H term. After ngen
simulations steps the new shape will be
reconstructed from the starting shape consensusvec
.
The number of plots representing the new shapes can be modify using fsamp
.
It returns a list of ngen/fsamp shapes (landmarks coordinates)
Cabrera Juan Manuel
Polly, P. D. (2004). On the simulation of the evolution of morphological shape: multivariate shape under selection and drift. Palaeontologia Electronica, 7(2), 1-28.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
data("aegla_landmarks")
#Use GpaResiduals function to obtain GPA residual matrix and consensus
# coordinates from landmark configuration
a_data=GpaResiduals(aegla_landmarks)
#Simulate morphological evolution with a variation rate "vari"
# trough "ngen" generations and retrieve the last generation shape coordinates
simshape = SimEvo(vari = 2, consensusvec = a_data$cvectorized,
resids = a_data$resid, ngen = 10000, fsamp = 10000)
#Plot consensus shape and the simulated shape
par(mfrow=c(1, 2))
plot(a_data$consens,type = "p",main = "Reference", xlab = "", ylab = "")
plot(simshape[[1]],type = "p",col = "red",main = "Target", xlab = "", ylab = "")
#Or you can use PlotVariations to see the difference more clearly
PlotVariations(simshape,a_data$consens)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.