Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] pseudo-ANOVA method to test if a number of correlations are similar #266

Closed
wants to merge 2 commits into from

Conversation

DominiqueMakowski
Copy link
Member

Based on this method by Nick Brown: https://twitter.com/sTeamTraen/status/1571573991667601408

library(correlation)
r <- correlation(mtcars)
anova(r)
#> Test that the correlations are similar.
#> 
#> Chi2(54) |      p
#> -----------------
#> 984.13   | > .999

Created on 2022-09-19 by the reprex package (v2.0.1)

I have no idea if it's meaningful / useful, though
@mattansb @bwiernik

@mattansb
Copy link
Member

It is not here - this assumes the correlations are independent (from different samples), whereas in your example these are from the same sample / share variables between them.

The code from that tweet is an omnibus version of the independent samples idea in #264.

As for the actual code - no idea.

@DominiqueMakowski
Copy link
Member Author

Ah right right so this cannot work as a method for easycorrelation since it's always on the same sample

@bwiernik
Copy link
Contributor

Here is a function for the covariance among sample correlations, from Nel or Alf & Graf

https://github.com/bwiernik/configural/blob/d60115ac6898e532c526265d12879d591d1f9964/R/utility.R#L128

This could be used to construct ANOVA or contrasts if you thought that would be useful

@bwiernik
Copy link
Contributor

ICYMI, what Nick discovered was the classical test for homogeneity used in meta-analysis https://twitter.com/wviechtb/status/1571760357391097857?s=46&t=mE4b89z-WPl7A5p7vzPapQ

@bwiernik
Copy link
Contributor

Going to close this for now -- we can revisit within-sample correlation comparisons or applying this method to between-sample correlation comparisons in a future PR

@bwiernik bwiernik closed this Oct 12, 2022
@DominiqueMakowski DominiqueMakowski deleted the anova_easycorrelation branch October 12, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants