I am trying to predict a binary outcome with a model that includes a random effect using survey data. I've included a description of the sampling design below, so feel free to comment on my survey weighting approach. My primary question is how to include a random effect in the survey weighted model. Here is the code up to this point:
# Libraries
library(survey)
# Make dataframe object where d is the working dataframe
dfobj <- svydesign((id = ~cluster+household,
strata = ~interaction(region, urban),
weights = ~chweight, strata = ~strata, data = d)
# Run a logit model
formula1 <- stunting ~ modern_toilet + diarrhoea + fever
+ insurance + sex + age + region_code
model1 <- svyglm(formula=formula1,design=dfobj,family = quasibinomial)
I would like the random effect to be on the region. Thanks,
Sampling Description:
The MICS 2006 used a two-stage stratified sample design. At the first stage of sampling, 300 census enumeration areas (124 urban and 176 rural EAs) were selected. These are a subsample of the 660 EAs (281 urban and 379 rural) selected for the GLSS 5. The clusters in each region were selected using systematic sampling with probability proportional to their size.