wtd.partial.cov: Computes weighted partial covariances, controlling for covariates
Description
wtd.partial.cov estimates the weighted partial covariance between two variables or sets of variables, controlling for additional covariates. The function uses weighted linear regression to residualize both dependent and independent variables before computing weighted covariances among the residuals.