Announcement

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

  • Testing correlations

    I am confused by the different correlation tests. I have ordinal variables, continuous, binary and categorical.

    I am aware of pwcorr (pairwise correlation)
    Code:
    pwcorr var1 var2
    , pearson chi2
    Code:
    ta var1 var2, chi2 V
    - with V option for Cramer's V , and spearman
    Code:
    spearman var1 var2
    What I don't understand is when to use which? For example, if I would like to know the association that exists between two variables, which do I use? And does it differ by the type of variable? From some of my reading it says that the pearsons chi2 should only be used with continuous, whereas spearman with ordinal and continuous. Pwcorr can run on any numeric variables but the results don't make sense if run on categorical variables. I've also seen that you can use pearson/spearman with two binary variables, so i am just a bit confused.

    For my data I need to test the following corrections:

    gender (binary) with political participation (binary) - here I'm assuming I can use pearson chi2 or spearman?

    Salary (continuous) with political participation (ordinal) - here I can use pwcorr?

    voting rights (categorical) with marital (categorical) - here i can use pearson chi2?

    Sorry if this is a bit of a silly question.



  • #2
    You can find some relevant info on this UCLA web page. Don't miss this comment at the bottom of the page:

    *Technically, assumptions of normality concern the errors rather than the dependent variable itself. Statistical errors are the deviations of the observed values of the dependent variable from their true or expected values. These errors are unobservable, since we usually do not know the true values, but we can estimate them with residuals, the deviation of the observed values from the model-predicted values. Additionally, many of these models produce estimates that are robust to violation of the assumption of normality, particularly in large samples.
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      pearsons chi2 should only be used with continuous
      Chi-square tests and distributions crop in many statistical contexts, but in this context the steer is the opposite. Chi-square tests are here for testing association between categorical variables when you have counts or frequencies of the various cross-combination. I wouldn't call chi-square a correlation unless the statistic is scaled to [-1, 1].

      It's (interesting to me and) simple logic that with binary variables Pearson and Spearman correlations are identical if either correlation is defined at all. (That is, you must have some 0s and some 1s on both variables.) Whether correlations are the best way to tackle such variables is a different matter. A much more general point is that binary variables -- especially when coded 0 or 1 -- have many more properties than is implied or stated by their being called categorical. Means and much else are defined naturally for such variables. Many textbooks and courses are decades out of date on this -- and indeed when Stevens defined his hierarchy of measurement scales, binary variables (and logit, probit, etc.) were already in the literature.

      More at

      https://stats.stackexchange.com/ques...een-two-boolea

      Comment


      • #4
        Thank you Bruce and Nick, I have a much better understanding now - will have a read of the link.

        Comment

        Working...
        X