Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running pairwise correlation with both categorical and continuous variables

    Dear All,

    I need to look at the pairwise correlation with both categorical and continuous variables. More specifically, dependent variable is well-being, independent variables are all continuous variables but some control variables are categorical variables such as marriage and job status. Can I use 'pwcorr wellbeing independent variables, marriage status job status other control variables, obs sig'? If not, what command can I use to get the correlation results?

    Many thanks,
    Yang

  • #2
    pwcorr will calculate Pearson correlations so long as the variables you feed it are numeric.

    Your problem is different.

    Such correlations if either or both variable is categorical don't usually make sense as the coding is arbitrary. A Pearson correlation between variables x y only makes sense to the extent that a linear relationship of the form y = a + bx would make sense.

    See https://stats.stackexchange.com/ques...een-two-boolea for more discussion of the special case of two binary variables.

    Comment

    Working...
    X