partial.cor {AATtools} | R Documentation |
Partial correlation Compute the correlation between x and y while controlling for z.
partial.cor(x, y, z, use = c("complete.obs", "everything"))
x , y , z |
x and y will be correlated while controlling for z |
use |
optional character indicating how to handle missing values (see cor) |
partial.cor(mtcars$mpg,mtcars$cyl,mtcars$disp)