Skip to content

cor_pmat produces values when cells in correlation matrix are NA #51

@elizabethwe

Description

@elizabethwe

Hi,

I've used this many times over the years (love it, thank you) and I currently have a couple variables that don't have observations when they overlap in my data. When I run cor() those cells are NA (as they should be), but then once I use the output of that for cor_pmat(), it produces p-values that are close to 0 (but not quite), when really they should also be NA. This becomes more of a problem when I try to run ggcorrplot and the number of values in the p-matrix exceeds the number of values in the correlation-matrix. Is there an argument to ignore cases when the correlation coefficient is NA?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions