p values from correlation matrix using nancov

조회 수: 1 (최근 30일)
JacquelineK
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);
[i,p]
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')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by