0

I am interested between the correlation between a continuous variable and a binary variable (female=1/male=2).

I think it doesn't really make sense to calculate it like this:

cor.test(data$continuousvariable,data$binaryvariable)

Is correlation only used for two continous variables? What should I do?

StupidWolf
  • 4,494
  • 3
  • 10
  • 26
  • 1
    Does this answer your question? [Correlation coefficient between a (non-dichotomous) nominal variable and a numeric (interval) or an ordinal variable](https://stats.stackexchange.com/questions/73065/correlation-coefficient-between-a-non-dichotomous-nominal-variable-and-a-numer) – T.E.G. Aug 23 '20 at 13:58
  • Or this one: https://stats.stackexchange.com/questions/102778/correlations-between-continuous-and-categorical-nominal-variables/102800 (first one shows a non-dichotomous case). – T.E.G. Aug 23 '20 at 13:59

0 Answers0