Dealing with missing values for correlations calculation

前端 未结 3 1265
长发绾君心
长发绾君心 2021-02-01 02:37

I have huge matrix with a lot of missing values. I want to get the correlation between variables.

1. Is the solution

cor(na.omit(matr         


        
3条回答
  •  庸人自扰
    2021-02-01 03:23

    For future readers Pairwise-complete correlation considered dangerous may be valuable, arguing that cor(matrix, use = "pairwise.complete.obs") is considered dangerous and suggesting alternatives such as use = "complete.obs").

提交回复
热议问题