The function quantifies the relative amount of shape variation attributable to covariation with organism size (allometry)
plus other factors in a linear model, plus estimates the probability of this variation ("significance") for a null model,
via distributions generated from resampling permutations. Data input is specified by formulae (e.g.,
Y ~ X), where 'Y' specifies the response variables (shape data), and 'X' contains one or more independent
variables (discrete or continuous). 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
].
There are three formulae that need to be input (see Arguments). The first must contain variables for shape and size,
e.g., Y ~ X, where Y (dependent variable) is shape and X (independent variable) is size. The other two formulae
are optional to indicate (1) groups for separate allometric curves and (2) additional model variables to consider in
the ANOVA. The groups input must be a single factor or multiple factors; e.g., ~ group, or ~ a*b.
The resulting ANOVA uses sequential (Type I) sums of squares and cross-products with variables in this order:
size, groups (if provided), size*groups (if warranted), other variables (if provided). If a factor for groups is provided,
ANOVA for a "homogeneity of slopes" test will also 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 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).
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 workds 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
within groups (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).