<< nan_ecovm Data Correlation and Covariance nan_rankcorr >>

NaN Toolbox >> NaN Toolbox > Data Correlation and Covariance > nan_partcorrcoef

nan_partcorrcoef

calculates the partial correlation between X and Y after removing the influence of Z.

Calling Sequence

nan_partcorrcoef(X [,Mode]);
nan_partcorrcoef(X,Y,Z);
nan_partcorrcoef(X,Y,Z,[]);
nan_partcorrcoef(X,Y,Z,'Pearson');
nan_partcorrcoef(X,Y,Z,'Rank');
nan_partcorrcoef(X,Y,Z,'Spearman');
[R,p,ci1,ci2] = nan_partcorrcoef(...);

Parameters

Mode=[]:

[default]

Mode='Pearson' or 'parametric' :

Mode='Spearman' :

Mode='Rank' :

computes the partial correlation based on cc(x,y),cc(x,z) and cc(y,z) with the respective mode.

r:

is the partialcorrelation matrix

r(i,j) is the partial correlation coefficient r between X(:

,i) and Y(:,j)

p :

gives the significance of PCC

p > alpha:

do not reject the Null hypothesis: "R is zero".

p < alpha:

The alternative hypothesis "R2 is larger than zero" is true with probability (1-alpha).

ci1 :

lower 0.95 confidence interval

ci2 :

upper 0.95 confidence interval

Description

X, Y and Z can contain missing values encoded with NaN. NaN's are skipped, NaN do not result in a NaN output. (Its assumed that the occurence of NaN's is uncorrelated) The output gives NaN, only if there are insufficient input data.

The partial correlation is defined as pcc(xy|z)=(cc(x,y)-cc(x,z)*cc(y,z))/sqrt((1-cc(x,y)')*((1-cc(x,z)')))

See also

Bibliography

on the partial correlation coefficient

[1] http://www.tufts.edu/~gdallal/partial.htm

[2] http://www.nag.co.uk/numeric/fl/manual/pdf/G02/g02byf.pdf

Authors

<< nan_ecovm Data Correlation and Covariance nan_rankcorr >>