Function calculates partial correlations between the provided variables
pcor(x, y = NULL, use = c("na.or.complete", "complete.obs", "everything",
"all.obs"), method = c("pearson", "spearman", "kendall"))
The following list of values is returned:
value - Matrix of the coefficients of partial correlations;
p.value - The p-values for the parameters;
method - The method used in the calculations.
Either data.frame or a matrix with numeric values.
The numerical variable.
What observations to use. See cor function for details.
The only option that is not available here is "pairwise.complete.obs"
.
Which method to use for the calculation of the partial correlations. This can be either Pearson's, Spearman's or Kendall's coefficient. See cor for details.
Ivan Svetunkov, ivan@svetunkov.ru
The calculation is done based on multiple linear regressions. The function calculates them for each pair of variables based on the residuals of linear models of those variables from the other variables in the dataset.
mcor, cramer, association