Skip to content

Why does PROTEST report high significance when PROCRUSTES residuals are high? #633

Answered by gavinsimpson
NJOram asked this question in Q&A
Discussion options

You must be logged in to vote

I see the problem here. The arguments to protest() are not x and y, but are X and Y. When you call protest() as:

prot <- protest(x = scores_pca1, y = scores_pca2, permutations = 9999)

what seems to happen is that scores_pca1 gets used for X and Y and of course that will end up with a procrustes correlation of 1 and sums of squares effectively 0.

I don't know why you are extracting the scores as both procrustes() and protest() will happily work with ordination objects. If you call this as intended you get the right answer:

r$> set.seed(12345)                                                             
r$> prot <- protest(X = scores_pca1, Y = scores_pca2, permutations = 9999)       
r$> prot

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@NJOram
Comment options

Comment options

You must be logged in to vote
1 reply
@NJOram
Comment options

Answer selected by NJOram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #630 on March 20, 2024 15:39.