0
$\begingroup$

Forgive my ignorance, but I don’t know where I missed this, however when looking at correlations is it true one cannot use continuous and categorical variables as comparables? I assume that it is true, but then does a pearson correlation work only on same variable types (continuous vs continuous ) or is a different method necessary all together (continuous vs categorical)?

Do I have to transform categorical variables in some way to make it comparable?

With that being said, what would you suggest as good material to read to become more proficient on correlations between two variable types?

$\endgroup$
0
$\begingroup$

First separate the data into train and test data. One of the hacks is to try to fit a polynomial regression model on the train data and see the accuracy on test data. If the test accuracy is high, then the continuous variable is correlated to the categorical variable. We fit a polynomial regression model because spearman rank correlation coefficient takes into account that the data is monotonically related.

Hope this helps!!!

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Welcome to CV. This doesn't seem to answer the question, which is about ways to correlate categorical and continuous variables. Could you edit it to clarify how it does answer the question? $\endgroup$ – whuber Mar 5 at 15:46
  • $\begingroup$ Such a method is widely used across the industry.It is hack.Let me simplify the concept to you.Just fit a linear regression on train data and the model will learn weights.So it's like getting a linear equation using the model.Now if apply the linear equation on test data,we will get a loss and if the loss is less,we can say that the unknown data is also linear.Hope this helps!!! $\endgroup$ – T.V.ANJINEYULU Banju Mar 12 at 5:13
  • $\begingroup$ The problem I have with this post, as I wrote, is that it does not appear to address the question that was asked--it seems to be answering some other question about assessing the relationship between variables. $\endgroup$ – whuber Mar 12 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.