问题描述
我想使用R(2011-2012年)为科特迪瓦DHS建立调查设计。我专注于家庭暴力。
我使用了以下代码:
wt <- ipv_studyf$d005/1000000 # creating the variable weight
ipvdesign <- svydesign(ids = ipv_studyf$v021,# clustering- psu
strata = ipv_studyf$v023,# strata variable
weights = wt,# the weighting variable
data = ipv_studyf,# the dataset
variance="HT" ) # Horvitz-Thompson estimator
但是,我不断收到此错误消息:
**Error in na.weight(data.frame(weights)) : missing values in `weights'**
如果任何人对如何在R中设置数据集有任何见解并帮助我修复此错误消息,我将不胜感激!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)