The R Journal: accepted article

This article will be copy edited and may be changed before publication.

Weighted Effect Coding for Observational Data with wec
Rense Nieuwenhuis, Manfred te Grotenhuis and Ben Pelzer

Abstract Weighted effect coding refers to a specific coding matrix to include factor variables in generalised linear regression models. With weighted effect coding, the effect for each category represents the deviation of that category from the weighted mean (which corresponds to the sample mean). This technique has particularly attractive properties when analysing observational data, that commonly are unbalanced. The wec package is introduced, that provides functions to apply weighted effect coding to factor variables, and to interactions between (a.) a factor variable and a continuous variable and between (b.) two factor variables.

Received: 2016-12-23; online 2017-03-27
CRAN packages: wec

CC BY 4.0
This article is licensed under a Creative Commons Attribution 4.0 International license.

  author = {Rense Nieuwenhuis and Manfred te Grotenhuis and Ben Pelzer},
  title = {{Weighted Effect Coding for Observational Data with wec}},
  year = {2017},
  journal = {{The R Journal}},
  url = {}