


PARTCORRCOEF calculates the partial correlation coefficient.
X and Y 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)�)))
PARTCORRCOEF(X [,Mode]);
calculates the (auto-)correlation matrix of X
PARTCORRCOEF(X,Y,Z [,Mode]);
calculates the crosscorrelation between X and Y
Mode='Pearson' or 'parametric' [default]
gives the correlation coefficient
also known as the "product-moment coefficient of correlation" or "Pearson's correlation" [1]
Mode='Spearman' gives "Spearman's Rank Correlation Coefficient"
This replaces SPEARMAN.M
Mode='Rank' gives a nonparametric Rank Correlation Coefficient
This replaces RANKCORR.M
[R,p,ci1,ci2] = PARTCORRCOEF(...);
r is the partialcorrelation matrix
r(i,j) is the partial correlation coefficient r between X(:,i) and Y(:,j)
when influence of Z is removed.
p gives the significance of PCC
It tests the null hypothesis that the product moment correlation coefficient is zero
using Student's t-test on the statistic t = r sqrt(N-Nz-2)/sqrt(1-r^2)
where N is the number of samples (Statistics, M. Spiegel, Schaum series).
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
Further recommandation related to the correlation coefficient
+ LOOK AT THE SCATTERPLOTS!
+ Correlation is not causation. The observed correlation between two variables
might be due to the action of other, unobserved variables.
see also: SUMSKIPNAN, COVM, COV, COR, SPEARMAN, RANKCORR, RANKS, CORRCOEF
REFERENCES:
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