Skip to contents

Thin extender over ppcor::spcor (matrix-wise) or ppcor::spcor.test (when y and z are supplied) for semi-partial (part) correlations.

Usage

morie_ppcor_semipartial(x, y = NULL, z = NULL, method = "pearson", ...)

Arguments

x

Numeric vector, matrix, or data frame. When y and z are NULL, the full pairwise semi-partial correlation matrix is returned via ppcor::spcor.

y

Optional second numeric vector.

z

Optional numeric vector / matrix of control variables.

method

Correlation method ("pearson", "spearman", or "kendall"), forwarded to ppcor.

...

Further arguments forwarded to the upstream function.

Value

A list with $method (qualified upstream name) and $raw (the upstream return object).