Dealing with missing values for correlations calculation

前端 未结 3 1254
长发绾君心
长发绾君心 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:20

    I would vote for the second option. Sounds like you have a fair amount of missing data and so you would be looking for a sensible multiple imputation strategy to fill in the spaces. See Harrell's text "Regression Modeling Strategies" for a wealth of guidance on 'how's to do this properly.

提交回复
热议问题