Frequency weights in R (multilevel using lme4)

白昼怎懂夜的黑 提交于 2019-12-06 12:25:03

问题


I'm building a multilevel model with lme4 (two levels: a class and a student level with educational data). I'm using the ICCS 2009 data: http://www.iea.nl/iccs_2009.html). ICCS 2009 advise the use weights. I made a “within-school student weight” as the product of the class and student level weight factors. I also made the sums of the weights equal to the sample size. My question: how can I specify in R that I want to use this weight as a frequency weight. Do I have to use the "survey" package?


回答1:


iccs is a complex survey (see chapter 3 of the user guide) and the R survey package cannot (yet) handle multi-level models - you can read the bottom of this post for more detail

if you don't care about standard errors, most of the functions in lme4 have a weights= argument that should give you reasonable guesses.. but the standard errors will all be wrong.

the iccs 2009 user guide recommends other software on pdf page 33 of 112.



来源:https://stackoverflow.com/questions/18611234/frequency-weights-in-r-multilevel-using-lme4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!