全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 HLM专版
1312 0
2014-04-30

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:

# Librarieslibrary(survey)# Make dataframe object where d is the working dataframedfobj <- svydesign((id = ~cluster+household, strata = ~interaction(region, urban)  weights = ~chweight, strata = ~strata, data = d)# Run a logit modelformula1 <- stunting ~ modern_toilet + diarrhoea + fever + insurance + sex + age + region_codemodel1 <- 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.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群