pairwise.slope.test(f1, covariate, iter = 999, int.first = FALSE,
angle.type = c("r", "deg", "rad"), RRPP = FALSE)
gpagen
]. The function two.d.array
can be used to
obtain a two-dimensional data matrix from a 3D array of landmark coordinates.
From the data, the slopes for each group are estimated, and pairwise differences in slopes determined.
It is assumed that one has verified a significant group*covariate interaction [e.g., with procD.lm
].
To evaluate significance of the pairwise differences, two possible resampling procedures are provided. First, if
RRPP=FALSE, the rows of the matrix of shape variables are randomized relative to the design matrix. This is
analogous to a 'full' randomization. Second, if RRPP=TRUE, a residual randomization permutation procedure
is utilized (Collyer et al. 2014). Here, residual shape values from a reduced model are
obtained, and are randomized with respect to the linear model under consideration. These are then added to
predicted values from the remaining effects to obtain pseudo-values from which SS are calculated. NOTE: for
single-factor designs, the two approaches are identical. However, when evaluating factorial models it has been
shown that RRPP attains higher statistical power and thus has greater ability to identify patterns in data should
they be present (see Anderson and terBraak 2003). Effect-sizes (Z-scores) are computed as standard deviates of the sampling
distributions generated, which might be more intuitive for P-values than F-values (see Collyer et al. 2014).
Slopes can differ in two ways: the amount of shape change per covariate unit change and the direction of shape change
associated with covariate change. Tests statistics to compare these attributes between groups are the differences in length
and direction between slope vectors, respectively. These statistics are calculated with the exact same random permutations used
to calculate random SS for ANOVA.
This test is essentially the same as procD.lm with post-hoc comparisons among slopes for appropriate
models. However, differences in slopes are calculated simultaneously with the same random permutations peformed for ANOVA,
making it less so a post-hoc test and more so a simultaneous test of pairwise contrasts (see Collyer et al. 2014).### MANCOVA example for Goodall's F test (multivariate shape vs. factors)
data(plethodon)
Y.gpa<-gpagen(plethodon$land) #GPA-alignment
y<-two.d.array(Y.gpa$coords)
## Pairwise slope vector correlations
pairwise.slope.test(y~plethodon$site, covariate = data.frame(CS = Y.gpa$Csize),
iter=49, angle.type="r")
## Pairwise angular difference between slopes
pairwise.slope.test(y~plethodon$site, covariate = data.frame(CS = Y.gpa$Csize),
iter=49, angle.type="rad")
## Using RRPP
pairwise.slope.test(y~plethodon$site, covariate = data.frame(CS = Y.gpa$Csize),
iter=49, angle.type="rad", RRPP=TRUE)
Run the code above in your browser using DataLab