Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

partial.corr

partial correlations


Description

The partial correlation of x and y conditioning on z is the ordinary correlation of the residuals from the regression of x on z and the regression of y on z.

Usage

partial.corr(vars, cond)

Arguments

vars

matrix of data.frame of all the variables to be correlated.

cond

matrix of data.frame of all the variables to be conditioned on.

Value

matrix of partial correlations of the numeric variables in the argument vars conditioning on the numeric variables in cond.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

Examples

if.R(r=
partial.corr(longley[,1:3], longley[,4:6])
,s=
partial.corr(longley.x[,1:3], longley.x[,4:6])
)

HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.