par_cor: Partial Correlation

Description Usage Arguments Value

View source: R/methods.R

Description

Calculates correlation / covariance between Y and X, holding control constant

Usage

1
par_cor(Y, X, control = NULL, wgt = rep(1, length(Y)))

Arguments

Y

outcome vector (must be numeric without NA's).

X

numeric data frame or matrix of factors to be considered.

control

numeric data frame or matrix of factors to control for. these are factors that we can't consider while looking for the optimal intervention (e.g. race).

wgt

an optional vector of weights.

Value

data frame with partial correlations, partial covariance & p-values.


optinterv documentation built on March 26, 2020, 7:05 p.m.