Learn R Programming

bullseye (version 0.1.2)

pair_ace: Alternating conditional expectations correlation

Description

Calculates the maximal correlation coefficient from alternating conditional expectations algorithm for every variable pair in a dataset.

Usage

pair_ace(d, handle.na = TRUE, ...)

Value

A tibble of class pairwise with a maximal correlation from the alternating conditional expectations algorithm for every variable pair

Arguments

d

A dataframe

handle.na

If TRUE uses pairwise complete observations, otherwise NAs not handled.

...

other arguments

Details

The maximal correlation is calculated using alternating conditional expectations algorithm which find the transformations of variables such that the squared correlation is maximised. The ace function from acepack package is used for the calculation.

References

Breiman, Leo, and Jerome H. Friedman. "Estimating optimal transformations for multiple regression and correlation." Journal of the American statistical Association 80.391 (1985): 580-598.

Examples

Run this code
pair_ace(iris)

Run the code above in your browser using DataLab