Weighted Effect Coding: Dummy coding when size matters

本文介绍了一种新的编码方法——加权效应编码(Weighted Effect Coding),该方法能够在回归模型中测试所有类别相对于样本均值的效果。这种方法特别适用于观察性研究中不同类别大小不一的情况。此外,还介绍了如何将此方法应用于交互效应的测试,并提供了在R、SPSS和Stata中的实现方式。

If your regression model contains a categorical predictor variable, you commonly test the significance of its categories against a preselected reference category. If all categories have (roughly) the same number of observations, you can also test all categories against the grand mean using effect (ANOVA) coding. In observational studies, however, the number of observations per category typically varies. We published a paper in the International Journal of Public Health, showing how all categories can be tested against the sample mean.

In a second paper in the same journal, the procedure is expanded to regression models that test interaction effects. Within this framework, the weighted effect coded interaction displays the extra effect on top of the main effect found in a model without the interaction effect. This offers a promising new route to estimate interaction effects in observational data, where different category sizes often prevail.

To apply the procedures introduced in these papers, called weighted effect coding, procedures are made available for R, SPSS, and Stata. For R, we created the ‘wec’ package which can be installed by typing:

install.packages(“wec”)

转自:http://www.rensenieuwenhuis.nl/weighted-effect-coding-dummy-coding-when-size-matters/

 

转载于:https://www.cnblogs.com/payton/p/6018428.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值