balance2

When size matters: advantages of weighted effect coding in observational studies

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.

To apply the procedures introduced in this paper, called weighted effect coding, procedures are made available for R, SPSS, and Stata. For R, we created the ‘wec’ package.


Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., & Konig, R. (2016). When size matters: advantages of weighted effect coding in observational studies. International Journal of Public Health, 1–5. http://doi.org/10.1007/s00038-016-0901-1