p values from correlation matrix using nancov

2 ビュー (過去 30 日間)
JacquelineK 2017 年 9 月 21 日
コメント済み: JacquelineK 2017 年 9 月 23 日
I have a matrix A 225x13 containing missing values.
Because of the missing values I can not use corrcoef for my correlation matrix. Nor can I use [r,p].
So my current code looks like this:
Cov_A = nancov(A)
R = corrcov(Cov_A)
With corrcoef it would definetely be easier to just:
[r,p] = corrcoef(B);
[i,p] = find(p<0.05);
How do I get the same results, meaning r and p with "corrcov"? Or is it even possible to get pvalues with corrcov??


Brendan Hamm
Brendan Hamm 2017 年 9 月 22 日
The corrcoef function accepts Name-Value pair inputs to handle missing data.
[r,p] = corrcoeff(B,'rows','complete')
[r,p] = corcoeff(B,'rows','pairwise')
  1 件のコメント
JacquelineK 2017 年 9 月 23 日


その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by