how to filter variables after Pearson correlation test
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am doing the Pearson correlation test to a matrix, using 8 variables. I am getting values from 0.01 to 0.95. How can I filter (eliminate) the variables that have a correlation higher than 0.95 (in pairs)? I am looking to have an array with those variables, like this: [var1 var5 var6 var7]
I thank you in advance,
Best regards,
0 个评论
采纳的回答
Enrico Gambini
2022-2-3
编辑:Enrico Gambini
2022-2-3
I didn' fully get your question.
If you want to delete the variable columns from the matrix you can do the following:
%I will call your matrix "M"
M(:,[2:4,8])=[];% this will delete columns 2,3,4,8
Hope that this could be helpful
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!