Description Usage Arguments Details Value Author(s) References Examples
View source: R/bilat.symmetry.r
Function performs an analysis of directional and fluctuating asymmetry for bilaterally symmetric objects
1 2 3 
A 
Either A 3D array (p x k x n) containing raw landmarks (requiring GPA to be performed) or a gpagen object (if GPA has been previously performed). If one
wishes to incorporate semilandmarks, GPA should be performed first using 
ind 
A vector containing labels for each individual. For matching symmetry, the matched pairs receive the same label (replicates also receive the same label). 
side 
An optional vector (for matching symmetry) designating which object belongs to which 'sidegroup' 
replicate 
An optional vector designating which objects belong to which group of replicates. 
object.sym 
A logical value specifying whether the analysis should proceed based on object symmetry =TRUE or matching symmetry =FALSE 
land.pairs 
An optional matrix (for object symmetry) containing numbers for matched pairs of landmarks across the line of symmetry 
data 
A data frame for the function environment, see 
iter 
Number of iterations for significance testing. 
seed 
An optional argument for setting the seed for random permutations of the resampling procedure. If left NULL (the default), the exact same Pvalues will be found for repeated runs of the analysis (with the same number of iterations). If seed = "random", a random seed will be used, and Pvalues will vary. One can also specify an integer for specific seed values, which might be of interest for advanced users. 
RRPP 
A logical value indicating whether residual randomization should be used for significance testing. 
print.progress 
A logical value to indicate whether a progress bar should be printed to the screen. This is helpful for longrunning analyses. 
The function quantifies components of shape variation for a set of specimens as described by their patterns of symmetry and asymmetry. Here, shape variation is decomposed into variation among individuals, variation among sides (directional asymmetry), and variation due to an individual x side interaction (fluctuating symmetry). These components are then statistically evaluated using Procrustes ANOVA. Statistical assessment of model effects for shape variation is accomplished using permutation procedures. Methods for both matching symmetry and object symmetry can be implemented. Matching symmetry is when each object contains mirrored pairs of structures (e.g., right and left hands) while object symmetry is when a single object is symmetric about a midline (e.g., right and left sides of human faces). Details on general approaches for the study of symmetry in geometric morphometrics may be found in: Mardia et al. 2000; Klingenberg et al. 2002.
As input, the function receives either A 3D array (p x k x n) containing raw landmarks (requiring GPA to be performed) or a gpagen object (if GPA has been previously performed). If one wishes to incorporate semilandmarks, GPA should be performed first using gpagen. Otherwise, bilat.symmetry can perform the initial GPA, assuming all landmarks are fixed. For "object.sym = FALSE, landmarks should be of dimension (p x k x 2n), as each specimen is represented by both left and right configurations.
Analyses of symmetry for matched pairs of objects is implemented when object.sym=FALSE. Here, a 3D array [p x k x 2n] contains the landmark coordinates for all pairs of structures (2 structures for each of n specimens). Because the two sets of structures are on opposite sides, they represent mirror images, and one set must be reflected prior to the analysis to allow landmark correspondence. IT IS ASSUMED THAT THE USER HAS DONE THIS PRIOR TO PERFORMING THE SYMMETRY ANALYSIS. Reflecting a set of specimens may be accomplished by multiplying one coordinate dimension by '1' for these structures (either the x, the y, or the zdimension). A vector containing information on individuals and sides must also be supplied. Replicates of each specimen may also be included in the dataset, and when specified will be used as measurement error (see Klingenberg and McIntyre 1998).
Analyses of object symmetry is implemented when object.sym=TRUE. Here, a 3D array [p x k x n] contains the landmark coordinates for all n specimens. To obtain information about asymmetry, the function generates a second set of objects by reflecting them about one of their coordinate axes. The landmarks across the line of symmetry are then relabeled to obtain landmark correspondence. The user must supply a list of landmark pairs. A vector containing information on individuals must also be supplied. Replicates of each specimen may also be included in the dataset, and when specified will be used as measurement error.
Compared to older versions of geomorph, some results can be expected to be slightly different. Starting with geomorph 3.0, results use only type I sums of squares (SS) with either full randomization of raw shape values or RRPP (preferred with nested terms) for analysis of variance (ANOVA). Older versions used a combination of parametric and nonparametric results, as well as a combination of type I and type III SS. While analytical conclusions should be consistent (i.e., "significance" of effects is the same), these updates maintain consistency in analytical philosophy. This change will require longer computation time for large datasets, but the tradeoff allows users to have more flexibility and eliminates combining disparate analytical philosophies.
Note also that significance of terms in the model are found by comparing Fvalues for each term to those obtained via permutation. Fratios and df are not strictly necessary (a ratio of SS would suffice), but they are reported as is standard for anova tables. Additionally, users will notice that the df reported are based on the number of observations rather than a combination of objects * coordinates * dimensions, as is sometimes found in morphometric studies of symmetry. However, this change has no effect on hypothesis testing, as only SS vary among permutations (df, coordinates, and dimensions are constants).
The generic functions, print
, summary
, and plot
all work with bilat.symmetry
.
An object of class "bilat.symmetry" returns a list of the following
shape.anova 
An analysis of variance table for the shape data. 
size.anova 
An analysis of variance table for the shape data (when object.sym=FALSE). 
symm.shape 
The symmetric component of shape variation. 
asymm.shape 
The asymmetric component of shape variation. 
DA.component 
The directional asymmetry component, found as the mean shape for each side. 
FA.component 
The fluctuating asymmetry component for each specimen, found as the specimenspecific side deviation adjusted for the mean directional asymmetry in the dataset. 
data.type 
A value indicating whether the analysis was performed as Object or Matching symmetry. 
permutations 
The number of random permutations used. 
random.shape.F 
A matrix of random Fvalues from the Shape analysis. 
random.size.F 
A matrix of random Fvalues from the Centroid Size analysis. 
perm.method 
A value indicating whether "Raw" values were shuffled or "RRPP" performed. 
call 
The matched call. 
Dean Adams, Emma Sherratt, and Michael Collyer
Klingenberg, C.P. and G.S. McIntyre. 1998. Quantitative genetics of geometric shape in the mouse mandible. Evolution. 55:23422352.
Mardia, K.V., F.L. Bookstein, and I.J. Moreton. 2000. Statistical assessment of bilateral symmetry of shapes. Biometrika. 87:285300.
Klingenberg, C.P., M. Barluenga, and A. Meyer. 2002. Shape analysis of symmetric structures: quantifying variation among individuals and asymmetry. Evolution. 56:19091920.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34  #Example of matching symmetry
data(mosquito)
gdf < geomorph.data.frame(wingshape = mosquito$wingshape, ind=mosquito$ind, side=mosquito$side,
replicate=mosquito$replicate)
mosquito.sym < bilat.symmetry(A = wingshape, ind = ind, side = side,
replicate = replicate, object.sym = FALSE, RRPP = TRUE, iter = 499, data = gdf)
summary(mosquito.sym)
plot(mosquito.sym, warpgrids = TRUE)
mosquito.sym$shape.anova # extract just the anova table on shape
# Previous example, performing GPA first
Y.gpa < gpagen(mosquito$wingshape)
mosquito.sym2 < bilat.symmetry(A = Y.gpa, ind = ind, side = side,
replicate = replicate, object.sym = FALSE, RRPP = TRUE, iter = 499, data = gdf)
summary(mosquito.sym2)
summary(mosquito.sym) # same results
#Example of object symmetry
data(scallops)
gdf < geomorph.data.frame(shape = scallops$coorddata, ind=scallops$ind)
scallop.sym < bilat.symmetry(A = shape, ind = ind, object.sym = TRUE,
land.pairs=scallops$land.pairs, data = gdf, RRPP = TRUE, iter = 499)
summary(scallop.sym)
# Previous example, incorporating semilandmarks (requires GPA to be performed first)
Y.gpa < gpagen(scallops$coorddata, curves= scallops$curvslide, surfaces = scallops$surfslide)
scallop.sym < bilat.symmetry(A = Y.gpa, ind = ind, object.sym = TRUE,
land.pairs=scallops$land.pairs, data = gdf, RRPP = TRUE, iter = 499)
summary(scallop.sym)
# NOTE one can also: plot(scallop.sym, warpgrids = TRUE, mesh = NULL)
# NOTE one can also: scallop.sym$data.type # recall the symmetry type

Loading required package: rgl
Loading required package: ape
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
Initial GPA

  0%

==============  20%

============================  40%

====================================================================== 100%
Shape Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Size Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Call:
bilat.symmetry(A = wingshape, ind = ind, side = side, replicate = replicate,
object.sym = FALSE, data = gdf, iter = 499, RRPP = TRUE)
Symmetry (data) type: Matching
Type I (Sequential) Sums of Squares and Crossproducts
Randomized Residual Permutation Procedure Used
500 Permutations
Shape ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 0.104888 0.0116542 0.45533 2.6901 1.34269 0.062 .
side 1 0.003221 0.0032209 0.01398 0.7435 0.60403 0.674
ind:side 9 0.038990 0.0043323 0.16926 1.0407 0.69384 0.954
ind:side:replicate 20 0.083259 0.0041629 0.36143

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Centroid Size ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 4.1497e09 4.6107e10 0.18555 0.5965 0.28447 0.898
side 1 3.4740e10 3.4738e10 0.01553 0.4494 0.18543 0.530
ind:side 9 6.9569e09 7.7299e10 0.31108 1.4170 0.72586 0.566
ind:side:replicate 20 1.0910e08 5.4549e10 0.48784
Df SS MS Rsq F Z Pr(>F)
ind 9 0.104888 0.0116542 0.45533 2.6901 1.34269 0.062 .
side 1 0.003221 0.0032209 0.01398 0.7435 0.60403 0.674
ind:side 9 0.038990 0.0043323 0.16926 1.0407 0.69384 0.954
ind:side:replicate 20 0.083259 0.0041629 0.36143

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

  0%

==============  20%

============================  40%

====================================================================== 100%
Shape Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Size Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Call:
bilat.symmetry(A = Y.gpa, ind = ind, side = side, replicate = replicate,
object.sym = FALSE, data = gdf, iter = 499, RRPP = TRUE)
Symmetry (data) type: Matching
Type I (Sequential) Sums of Squares and Crossproducts
Randomized Residual Permutation Procedure Used
500 Permutations
Shape ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 0.104888 0.0116542 0.45533 2.6901 1.34269 0.062 .
side 1 0.003221 0.0032209 0.01398 0.7435 0.60403 0.674
ind:side 9 0.038990 0.0043323 0.16926 1.0407 0.69384 0.954
ind:side:replicate 20 0.083259 0.0041629 0.36143

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Centroid Size ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 4.1497e09 4.6107e10 0.18555 0.5965 0.28447 0.898
side 1 3.4740e10 3.4738e10 0.01553 0.4494 0.18543 0.530
ind:side 9 6.9569e09 7.7299e10 0.31108 1.4170 0.72586 0.566
ind:side:replicate 20 1.0910e08 5.4549e10 0.48784
Call:
bilat.symmetry(A = wingshape, ind = ind, side = side, replicate = replicate,
object.sym = FALSE, data = gdf, iter = 499, RRPP = TRUE)
Symmetry (data) type: Matching
Type I (Sequential) Sums of Squares and Crossproducts
Randomized Residual Permutation Procedure Used
500 Permutations
Shape ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 0.104888 0.0116542 0.45533 2.6901 1.34269 0.062 .
side 1 0.003221 0.0032209 0.01398 0.7435 0.60403 0.674
ind:side 9 0.038990 0.0043323 0.16926 1.0407 0.69384 0.954
ind:side:replicate 20 0.083259 0.0041629 0.36143

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Centroid Size ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 9 4.1497e09 4.6107e10 0.18555 0.5965 0.28447 0.898
side 1 3.4740e10 3.4738e10 0.01553 0.4494 0.18543 0.530
ind:side 9 6.9569e09 7.7299e10 0.31108 1.4170 0.72586 0.566
ind:side:replicate 20 1.0910e08 5.4549e10 0.48784
Initial GPA

  0%

==============  20%

============================  40%

==========================================  60%

====================================================================== 100%
Object Symmetry GPA

  0%

==============  20%

============================  40%

====================================================================== 100%
Shape Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Call:
bilat.symmetry(A = shape, ind = ind, object.sym = TRUE, land.pairs = scallops$land.pairs,
data = gdf, iter = 499, RRPP = TRUE)
Symmetry (data) type: Object
Type I (Sequential) Sums of Squares and Crossproducts
Randomized Residual Permutation Procedure Used
500 Permutations
Shape ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 4 0.063030 0.0157574 0.64135 9.8316 0.59203 0.978
side 1 0.028835 0.0288354 0.29341 17.9914 2.08232 0.064 .
ind:side 4 0.006411 0.0016027 0.06523

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Object Symmetry GPA

  0%

==============  20%

============================  40%

====================================================================== 100%
Shape Analysis

  0%

==============  20%

============================  40%

==========================================  60%

========================================================  80%

====================================================================== 100%
Call:
bilat.symmetry(A = Y.gpa, ind = ind, object.sym = TRUE, land.pairs = scallops$land.pairs,
data = gdf, iter = 499, RRPP = TRUE)
Symmetry (data) type: Object
Type I (Sequential) Sums of Squares and Crossproducts
Randomized Residual Permutation Procedure Used
500 Permutations
Shape ANOVA
Df SS MS Rsq F Z Pr(>F)
ind 4 0.0189901 0.0047475 0.37107 7.4974 0.33352 0.988
side 1 0.0296539 0.0296539 0.57944 46.8303 2.16133 0.066 .
ind:side 4 0.0025329 0.0006332 0.04949

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.