search for: pcor2

Displaying 1 result from an estimated 1 matches for "pcor2".

Did you mean: pcor
2000 Feb 25
0
Summary: Partial correlation coefficients in R. Thanks everybody!
...y John Logsdon, among others: The partial correlation coefficients are the negative scaled off-diagonal inverse variance. So compute the variance-covariance matrix, invert, scale to the diagonal and negate and you have it. And an implementation by Martyn Plummer (here, too, I received several): pcor2 <- function(x){ conc <- solve(var(x)) resid.sd <- 1/sqrt(diag(conc)) pcc <- - sweep(sweep(conc, 1, resid.sd, "*"), 2, resid.sd, "*") return(pcc) } This is the version I'm using now, together with a test for significance of each co...