I am trying to fit a set of univariate logistic regression models with tbl_uvregression()
based on a complex survey design object. I have tried several approaches based on online resources but still not able to get through. Below is the example code from my last attempt:
test_fit <-
survey::svydesign(id=~psu, strata=~strata, weights=~iweight, data=mm2, nest=T) %>%
tbl_uvregression(
method = glm,
y = medcare_recvd_notrecvd,
method.args = list(family = binomial),
include = c(age_yr_grp,educ,placeres),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2),
label = list(age_yr_grp ~ "Age", educ ~ "Education", placeres ~ "Area of residence")) %>%
add_glance_source_note()
test_fit
Any solution to this will be much appreciated.