Open
Description
I remember mentioning this somewhere, but I'll rephrase it here for future reference:
Sometimes we want to correlate x and y, where x is, for instance, the mean score of some measure for an individual (average reaction time in the condition A). This value is sometimes accompanied by some measure of variability (or uncertainty) (for instance, the SD). We might want to take this information into account in the correlation, so that observations of x that are more precise (with lower associated variability) have more weight that observations with large uncertainty.
One alternative is to use weighted correlation:
- base:
cov.wt(cor = TRUE)
psych::cor.wt
- https://github.com/ahmademad/wCorr