f_auc {collinear}R Documentation

Association Between a Binomial Response and a Continuous Predictor

Description

These functions take a data frame with a binomial response "y" with unique values 1 and 0, and a continuous predictor "x", fit a univariate model, to return the Area Under the ROC Curve (AUC) of observations versus predictions:

Usage

f_auc_glm_binomial(df)

f_auc_glm_binomial_poly2(df)

f_auc_gam_binomial(df)

f_auc_rpart(df)

f_auc_rf(df)

Arguments

df

(required, data frame) with columns:

  • "x": (numeric) continuous predictor.

  • "y" (integer) binomial response with unique values 0 and 1.

See Also

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Other preference_order_functions: f_r2, f_r2_counts, f_v(), f_v_rf_categorical()

Examples

#load example data
data(vi)

#reduce size to speed-up example
vi <- vi[1:1000, ]

#integer counts response and continuous predictor
#to data frame without NAs
df <- data.frame(
  y = vi[["vi_binomial"]],
  x = vi[["swi_max"]]
) |>
  na.omit()

#AUC of GLM with binomial response and weighted cases
f_auc_glm_binomial(df = df)

#AUC of GLM as above plus second degree polynomials
f_auc_glm_binomial_poly2(df = df)

#AUC of binomial GAM with weighted cases
f_auc_gam_binomial(df = df)

#AUC of recursive partition tree with weighted cases
f_auc_rpart(df = df)

#AUC of random forest with weighted cases
f_auc_rf(df = df)

[Package collinear version 2.0.0 Index]