4

我正在尝试使用包含使用调查数据的随机效应的模型来预测二元结果。我在下面包含了对抽样设计的描述,因此请随时评论我的调查加权方法。我的主要问题是如何在调查加权模型中包含随机效应。这是到目前为止的代码:

# 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)

我希望随机效应出现在该地区。谢谢,

取样说明:

MICS 2006 使用了两阶段分层样本设计。在抽样的第一阶段,选择了 300 个普查普查区(124 个城市和 176 个农村普查区)。这些是为 GLSS 5 选择的 660 个 EA(281 个城市和 379 个农村)的子样本。每个区域的集群是使用系统抽样选择的,其概率与其规模成正比。

4

1 回答 1

3

This isn't available in the survey package and I'm fairly sure it isn't available in R.

There are techniques for generalised linear mixed model fitting with survey data when the clusters for the random effects are the same as the sampling units. There are implementations in Stata (-gllamm-) and MLwin and possibly others.

Design-based inference for mixed models is an area of current research.

于 2014-12-17T02:11:27.733 回答