The function quantifies the relative amount of shape variation attributable to covariation with organism size (allometry)
plus (potentially) another grouping factor in a linear model, so as to provide initial visualizations of patterns of shape allometry.
Data input is specified by formulae (e.g., Y ~ X), where 'Y' specifies the response variables (Procrustes shape variables),
and 'X' contains A SINGLE independent continuous variable representing size. The response matrix 'Y' can be
either in the form of a two-dimensional data matrix of dimension (n x [p x k]), or a 3D array (p x n x k). It is assumed that
-if the data are based on landmark coordinates - the landmarks have previously been aligned using Generalized Procrustes Analysis (GPA)
[e.g., with gpagen
]. Additionally, one has the option of providing a second formula where groups are specified
in the form of ~ group. If groups are provided a "homogeneity of slopes" test will be performed.
It is assumed that the order of the specimens in the shape matrix matches the order of values in the independent variables.
Linear model fits (using the lm
function) can also be input in place of formulae.
Arguments for lm
can also be passed on via this function. For further information about ANOVA in geomorph, resampling
procedures used, and output, see procD.lm
or advanced.procD.lm
.
If greater flexibility is required for variable order, advanced.procD.lm
should be used.
It is strongly recommended that geomorph.data.frame
is used to create and input a data frame. This will reduce
problems caused by conflicts between the global and function environments. In the absence of a specified data frame,
procD.allometry
will attempt to coerce input data into a data frame, but success is not guaranteed.
The generic functions, print
, summary
, and plot
all work with procD.allometry
.
The generic function, plot
, produces plots of allometric curves, using one of three methods input (see below).
If diagnostic plots on model residuals are desired, procD.lm
should be used with the resulting model formula.
This, along with the data frame resulting from analysis with procD.allometry
can be used directly in procD.lm
,
which might be useful for extracting ANOVA components (as procD.allometry
is far more basic than procD.lm
, in terms of output).
A note on allometric models
This function is intended to be used for the graphical visualization of simple allometric patterns. The method is appropriate for
models such as shape~log(size) and shape~log(size) + groups. Three plotting options, the common allometric coefficient (CAC),
regression scores (RegScore), and predicted lines (PredLine) are implemented as originally described in the literature. NOTE however
that for more complex models with additional parameters, one may instead wish to use the plotting capabilities that accompany
procD.lm
(see below for more details).
Notes for experienced or advanced users
Experienced or advanced users will probably prefer using
procD.lm
with a combination of plot.procD.lm
, shape.predictor
, and plotRefToTarget
for publication-quality analyses and graphics. As stated above, use of procD.allometry is for visualizing simple allometric models
that do not contain additional covariates. Thus, procD.allometry may be thought of as a wrapper function for procD.lm
,
but only for a restricted set of models and using a philosophy for model selection based on the outcome of a homogeneity of slopes
test. This is not necessary if one wishes to define a model, irrespective of this outcome, or if more complex models are of interest.
In these circumstances procD.lm
offers much greater flexibility, and provides more statistically general approaches to
visualizing patterns. Thus,
procD.allometry
might be thought of as an exploratory tool,
if one is unsure how to model allometry for multiple groups. One should not necessarily
accept the procD.allometry
result as "truth" and other models can be explored with procD.lm
.
Examples for more flexible approaches to modeling allometry using procD.lm
are provided below.
Notes for geomorph 3.0.5 and subsequent versions
Previous versions of procD.allometry
had an argument, f3, for providing additional covariates. Complex
models can now be analyzed with procD.lm
, which has similar plotting capabilities as procD.allometry
.
Examples are provided below. This argument is no longer used, and procD.allometry
is restricted to simpler models,
deferring instead to procD.lm
for complex models.
Notes for geomorph 3.0.4 and subsequent versions
Compared to previous versions of geomorph, users might notice differences in effect sizes. Previous versions used z-scores
calculated with expected values of statistics from null hypotheses (sensu Collyer et al. 2015); however Adams and Collyer
(2016) showed that expected values for some statistics can vary with sample size and variable number, and recommended finding
the expected value, empirically, as the mean from the set of random outcomes. Geomorph 3.0.4 and subsequent versions now
center z-scores on their empirically estimated expected values and where appropriate, log-transform values to assure statistics
are normally distributed. This can result in negative effect sizes, when statistics are smaller than expected compared to the
average random outcome. For ANOVA-based functions, the option to choose among different statistics to measure effect size
is now a function argument.
Notes for geomorph 3.0 and making allometry plots
Former versions of geomorph had a "plotAllometry" function that performed ANOVA and produced
plots of allometry curves. In geomorph 3.0, the plot
function is used with
procD.allometry
objects to produce such plots. The following arguments can be used in
plot
to achieve desired results.
method = ("CAC, "RegScore, "PredLine"). Choose the desired plot method.
warpgrids: default = TRUE. Logical value to indicate whether warpgrids should be plotted.
(Only works with 3D array data)
label: can be logical to label points (1:n) - e.g., label = TRUE - or a vector indicating
text to use as labels.
mesh: A mesh3d object to be warped to represent shape deformation of the minimum and maximum size
if warpgrids=TRUE (see warpRefMesh
).
Use ?plot.procD.allometry
to understand the arguments used. The following are brief
descriptions of the different plotting methods using plot
, with references.
If "method=CAC" (the default) the function calculates the
common allometric component of the shape data, which is an estimate of the average allometric trend
for group-mean centered data (Mitteroecker et al. 2004). The function also calculates the residual shape component (RSC) for
the data.
If "method=RegScore" the function calculates shape scores
from the regression of shape on size, and plots these versus size (Drake and Klingenberg 2008).
For a single group, these shape scores are mathematically identical to the CAC (Adams et al. 2013).
If "method=PredLine" the function calculates predicted values from a regression of shape on size, and
plots the first principal component of the predicted values versus size as a stylized graphic of the
allometric trend (Adams and Nistri 2010).