#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)
Run the code above in your browser using DataLab