ols_correlations: Part and partial correlations

View source: R/ols-correlations.R

ols_correlationsR Documentation

Part and partial correlations

Description

Zero-order, part and partial correlations.

Usage

ols_correlations(model)

Arguments

model

An object of class lm.

Details

ols_correlations() returns the relative importance of independent variables in determining response variable. How much each variable uniquely contributes to rsquare over and above that which can be accounted for by the other predictors? Zero order correlation is the Pearson correlation coefficient between the dependent variable and the independent variables. Part correlations indicates how much rsquare will decrease if that variable is removed from the model and partial correlations indicates amount of variance in response variable, which is not estimated by the other independent variables in the model, but is estimated by the specific variable.

Partial and part correlations are not defined for models with a single predictor and are returned as NA. The zero-order correlation is still available for such models. Models without an intercept are supported only with one predictor coefficient.

Part and partial correlations are not available for weighted models, because they are computed from auxiliary regressions that would ignore the model weights.

Value

ols_correlations returns an object of class "ols_correlations". An object of class "ols_correlations" is a data frame containing the following components:

Zero-order

zero order correlations

Partial

partial correlations

Part

part correlations

References

Morrison, D. F. 1976. Multivariate statistical methods. New York: McGraw-Hill.

Examples

model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)
ols_correlations(model)


olsrr documentation built on Nov. 18, 2026, 5:07 p.m.