pair_polychor: Polychoric correlation

View source: R/pair_methods.R

pair_polychorR Documentation

Polychoric correlation

Description

Calculates Polychoric correlation using for every factor variable pair in a dataset.

Usage

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

Arguments

d

A dataframe

handle.na

ignored. Pairwise complete observations are used automatically.

...

other arguments

Details

The polychoric correlation is calculated using the polychor function from the polycor package, and assumes factor levels are in the given order. NAs are automatically handled by pairwise omit.

Value

A tibble of class pairwise with polychoric correlation for factor pairs, or NULL if there are not at least two factor variables

Examples

pair_polychor(iris)

bullseye documentation built on Sept. 11, 2024, 9:24 p.m.