Announcement

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

  • Pearson correlation matrix with multiple significance stars

    Hi Statalisters,

    I'm trying to present Pearson's correlation matrix with significance stars at levels of 10%, 5% and 1%. I've run the following commands:


    pwcorr DACC AEM CSR AB_CFO absAB_CFO AB_PROD absAB_PROD AB_EXP absAB_EXP REM GROWTH SIZE LEV ROA BIG4 IND, stars(* 0.10 ** 0.05 *** 0.01)
    pwcorr DACC AEM CSR AB_CFO absAB_CFO AB_PROD absAB_PROD AB_EXP absAB_EXP REM GROWTH SIZE LEV ROA BIG4 IND, star(* 0.10 ** 0.05 *** 0.01)
    pwcorr DACC AEM CSR AB_CFO absAB_CFO AB_PROD absAB_PROD AB_EXP absAB_EXP REM GROWTH SIZE LEV ROA BIG4 IND, stars(all)

    But always get the same error:

    "option stars() not allowed
    r(198);"

    Can any of you help me with this? I'm using Stata SE14.


    Thank you in advance

  • #2
    The help for pwcorr is explicit: only one threshold is allowed for starring. So the error hinges on an idea of what you would prefer the syntax to be.

    The code for pwcorr is accessible, so in principle you can clone the command and revise the code. Someone else may have done this already.

    Personally I regard starring as a device of despair. If some correlations are worth taking seriously but not others why not just list the interesting ones? Who is insisting on a ritual display with (in this case) 120 correlations?
    Last edited by Nick Cox; 08 Jul 2020, 08:25.

    Comment


    • #3
      Do you know what the test that produces those stars is? I'm pretty sure it's a test that the correlation coefficient is zero. If you reject the null hypothesis, that might tell you very little. Imagine one correlation is 0.05***. That is of no practical significance at all, even if we are pretty sure it's not zero. I'd suggest focusing more on the magnitude of the correlation coefficients instead.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment

      Working...
      X