Skip to contents

Calculates Kendall's tau B every factor variable pair in a dataset.

Usage

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

Arguments

d

A dataframe

handle.na

ignored. Pairwise complete observations are used automatically.

...

other arguments

Value

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

Details

Calculated using KendallTauB. Assumes factor levels are in the given order. NAs are automatically handled by pairwise omit.

Examples

 d <- data.frame(x=rnorm(20), 
                 y=factor(sample(3,20, replace=TRUE)), 
                 z=factor(sample(2,20, replace=TRUE)))
 pair_tauB(d)
#> # A tibble: 1 × 6
#>   x     y     score group  value pair_type
#>   <chr> <chr> <chr> <chr>  <dbl> <chr>    
#> 1 y     z     tauB  all   0.0541 ff