f_v {collinear} | R Documentation |
Association Between a Categorical Response and a Categorical Predictor
Description
Computes Cramer's V, a measure of association between categorical or factor variables. Please see cor_cramer_v()
for further details.
Usage
f_v(df)
Arguments
df |
(required, data frame) with columns:
|
Value
numeric: Cramer's V
See Also
Other preference_order_functions:
f_auc
,
f_r2
,
f_r2_counts
,
f_v_rf_categorical()
Examples
#load example data
data(vi)
#reduce size to speed-up example
vi <- vi[1:1000, ]
#categorical response and predictor
#to data frame without NAs
df <- data.frame(
y = vi[["vi_factor"]],
x = vi[["soil_type"]]
) |>
na.omit()
#Cramer's V
f_v(df = df)
[Package collinear version 2.0.0 Index]