<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rense Nieuwenhuis &#187; weighted effect coding</title>
	<atom:link href="http://www.rensenieuwenhuis.nl/tag/weighted-effect-coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rensenieuwenhuis.nl</link>
	<description>&#34;The extra-ordinary lies within the curve of normality&#34;</description>
	<lastBuildDate>Thu, 12 Mar 2026 14:58:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>A novel method for modelling interaction between categorical variables</title>
		<link>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/</link>
		<comments>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/#comments</comments>
		<pubDate>Tue, 18 Apr 2017 08:00:43 +0000</pubDate>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
				<category><![CDATA[Peer Reviewed]]></category>
		<category><![CDATA[R-Project]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[dummy coding]]></category>
		<category><![CDATA[interaction]]></category>
		<category><![CDATA[moderation]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[wec]]></category>
		<category><![CDATA[weighted effect coding]]></category>

		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6075</guid>
		<description><![CDATA[We have been developing weighted effect coding in an ongoing series of publications (hint: a publication in the R Journal will follow). To include nominal and ordinal variables as predictors in regression models, their categories ...]]></description>
				<content:encoded><![CDATA[<p>We have been developing weighted effect coding in an ongoing series of publications (hint: a publication in the R Journal will follow). To include nominal and ordinal variables as predictors in regression models, their categories first have to be transformed into so-called &#8216;dummy variables&#8217;. There are many transformations available, and popular is &#8216;dummy coding&#8217; in which the estimates represent deviations from a preselected &#8216;reference category&#8217;. </p>
<p>To avoid choosing a reference category, weighted effect coding provides estimates representing deviations from the sample mean. This is particularly useful when the data are unbalanced (i.e., categories holding different numbers of observation). The basics of this  technique, with applications in R, were <a href="http://www.rensenieuwenhuis.nl/when-size-matters-weighted-effect-coding/">detailed here</a>.</p>
<p><a href="http://link.springer.com/article/10.1007/s00038-016-0902-0">In a new publication, available open access,</a>, we show that weighted effect coding can also be applied to regression models with interaction effects (also commonly referred to as moderation). The weighted effect coded interactions represent the additional effects over and above the main effects obtained from the model without these interactions. </p>
<p>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 &#8216;wec&#8217; package which can be installed by typing:</p>
<blockquote><p>
install.packages(&#8220;wec&#8221;)
</p></blockquote>
<h1>References (Open Access!)</h1>
<p>Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., &#038; Konig, R. (2017). <b>A novel method for modelling interaction between categorical variables</b>. <I>International Journal of Public Health</i>, 62(3), 427–431. <a href="http://link.springer.com/article/10.1007/s00038-016-0902-0">http://link.springer.com/article/10.1007/s00038-016-0902-0</a> </p>
<p>Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., &#038; Konig, R. (2017). <b>When size matters: advantages of weighted effect coding in observational studies</b>. <I>International Journal of Public Health</i>, 62(1), 163–167. <a href="http://doi.org/10.1007/s00038-016-0901-1">http://doi.org/10.1007/s00038-016-0901-1</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>When Size Matters: Weighted Effect Coding</title>
		<link>http://www.rensenieuwenhuis.nl/when-size-matters-weighted-effect-coding/</link>
		<comments>http://www.rensenieuwenhuis.nl/when-size-matters-weighted-effect-coding/#comments</comments>
		<pubDate>Fri, 24 Feb 2017 07:50:02 +0000</pubDate>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
				<category><![CDATA[Peer Reviewed]]></category>
		<category><![CDATA[R-Project]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[dummy]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[wec]]></category>
		<category><![CDATA[weighted effect coding]]></category>

		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6056</guid>
		<description><![CDATA[Categorical variables in regression models are often included by dummy variables. In R, this is done with factor variables with treatment coding. Typically, the difference and significance of each category are tested against a preselected ...]]></description>
				<content:encoded><![CDATA[<p>Categorical variables in regression models are often included by dummy variables. In R, this is done with factor variables with treatment coding. Typically, the difference and significance of each category are tested against a preselected reference category. We present a useful alternative. </p>
<p>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. <a href="http://link.springer.com/article/10.1007/s00038-016-0901-1">Our new paper shows how categories of a factor variable can be tested against the sample mean</a>. Although the paper has been online for some time now (and this post is an update to an earlier post some time age), we are happy to announce that our paper has now officially been published a the International Journal of Public Health.</p>
<p>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:</p>
<blockquote><p>
install.packages(&#8220;wec&#8221;)
</p></blockquote>
<h3>References</h3>
<p>Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., &#038; Konig, R. (2017). When size matters: advantages of weighted effect coding in observational studies. <I>International Journal of Public Health</i>, (62), 163–167. <a href="http://doi.org/10.1007/s00038-016-0901-1">http://doi.org/10.1007/s00038-016-0901-1</a> </p>
<p>Sweeney R, Ulveling EF (1972) A transformation for simplifying the interpretation of coefficients of binary variables in regression analysis. <i>Am Stat</i> 26:30–32</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rensenieuwenhuis.nl/when-size-matters-weighted-effect-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New version of WEC: focus on interactions</title>
		<link>http://www.rensenieuwenhuis.nl/new-version-of-wec-focus-on-interactions/</link>
		<comments>http://www.rensenieuwenhuis.nl/new-version-of-wec-focus-on-interactions/#comments</comments>
		<pubDate>Tue, 17 Jan 2017 11:00:52 +0000</pubDate>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
				<category><![CDATA[My Publications]]></category>
		<category><![CDATA[R-Project]]></category>
		<category><![CDATA[Academic Software]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[wec]]></category>
		<category><![CDATA[weighted effect coding]]></category>

		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6037</guid>
		<description><![CDATA[We have uploaded a new version of WEC, an R package to apply &#8216;weighted effect coding&#8217; to your dummy variables. With weighted effect coding, your dummy variables represent the deviation of their respective category from ...]]></description>
				<content:encoded><![CDATA[<p>We have uploaded a new version of WEC, an R package to apply &#8216;weighted effect coding&#8217; to your dummy variables. With weighted effect coding, your dummy variables represent the deviation of their respective category from the sample mean, rather than the deviation from a reference category. Particularly with observational data, which are often unbalanced, this can have attractive interpretations. We recently published two articles in which we discuss some of the advantages:</p>
<p><a href="http://doi.org/10.1007/s00038-016-0901-1"> Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., &#038; Konig, R. (2016b). When size matters: advantages of weighted effect coding in observational studies. <i>International Journal of Public Health</i>, 1–5. http://doi.org/10.1007/s00038-016-0901-1 </a></p>
<p><a href="http://doi.org/10.1007/s00038-016-0902-0"> Grotenhuis, M., Ben Pelzer, Eisinga, R., Nieuwenhuis, R., Schmidt-Catran, A., &#038; Konig, R. (2016a). A novel method for modelling interaction between categorical variables. <i>International Journal of Public Health</i>, 1–5. http://doi.org/10.1007/s00038-016-0902-0 </a></p>
<p>As some of the real advantages of  weighted effect coding come into play when using interactions, that was what we focused in the current update to our &#8216;wec&#8217; package (version 0.4). The package now supports interactions between a weighted effect coded factor variable and an interval variable, and the calculation of interactions between two weighted effect coded factor variables was much improved. An example is given below (with more to follow, hopefully soon).</p>
<p><code><br />
library(wec)<br />
data(PUMS)<br />
PUMS$race.wec <- factor(PUMS$race)<br />
contrasts(PUMS$race.wec) <- contr.wec(PUMS$race.wec, "White")<br />
PUMS$race.educint <- wec.interact(PUMS$race.wec, PUMS$education.int)<br />
m.wec.educ <- lm(wage ~ race.wec + education.int + race.educint, data=PUMS)<br />
summary(m.wec.educ)$coefficients<br />
</code></p>
<p>The code above results in a regression model (shown below) in which the main effect for education (9048) remains the same, whether the interaction terms are included or not (you can try this yourself). Thus, the interaction terms represent how much the average education effect varies by race.</p>
<pre>
                            Estimate Std. Error t value Pr(>|t|)
(Intercept)                     52320        559    93.5  0.0e+00
race.wecHispanic                -4955       1736    -2.9  4.3e-03
race.wecBlack                  -11276       1817    -6.2  5.7e-10
race.wecAsian                    5151       2381     2.2  3.1e-02
education.int                    9048        287    31.6 2.3e-208
race.educintinteractHispanic    -3266        977    -3.3  8.3e-04
race.educintinteractBlack       -3293        990    -3.3  8.8e-04
race.educintinteractAsian        3575       1217     2.9  3.3e-03
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.rensenieuwenhuis.nl/new-version-of-wec-focus-on-interactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting Weighted Effect Coding</title>
		<link>http://www.rensenieuwenhuis.nl/presenting-weighted-effect-coding/</link>
		<comments>http://www.rensenieuwenhuis.nl/presenting-weighted-effect-coding/#comments</comments>
		<pubDate>Tue, 08 Nov 2016 07:25:55 +0000</pubDate>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
				<category><![CDATA[Blogging about Science]]></category>
		<category><![CDATA[R-Project]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[dummy coding]]></category>
		<category><![CDATA[Manfred]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[te grotenhuis]]></category>
		<category><![CDATA[wec]]></category>
		<category><![CDATA[weighted effect coding]]></category>

		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6011</guid>
		<description><![CDATA[Weighted effect coding is a variant of dummy coding to include categorical variables in regression analyses, in which the estimate for each category represents the deviation of that category from the sample mean. The ‘wec’ ...]]></description>
				<content:encoded><![CDATA[<p>Weighted effect coding is a variant of dummy coding to include categorical variables in regression analyses, in which the estimate for each category represents the deviation of that category from the sample mean. The ‘wec’ package for R provides tools to use weighted effect coding. </p>
<p>Manfred te Grotenhuis is currently visiting the Swedish Institute of Social Research (SOFI), where he presented our joint work on Weighted Effect Coding. The recoding of his presentation is available on <a href="https://www.youtube.com/watch?v=TTLde6HVfOg&#038;t=510s">Manfred&#8217;s YouTube channel</a>, and embedded below:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='1170' height='689' src='http://www.youtube.com/embed/TTLde6HVfOg?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></p>
<p>The relevant papers are available here (open access):</p>
<ul>
<li><a href="http://link.springer.com/article/10.1007/s00038-016-0901-1">When size matters: advantages of weighted effect coding in observational studies</a></li>
<li><a href="http://link.springer.com/article/10.1007/s00038-016-0902-0">A novel method for modelling interaction between categorical variables</a></li>
</ul>
<p>More information, as well as software for SPSS and STATA are available from the <a href="http://www.ru.nl/sociology/mt/wec/downloads/">project website</a>. </p>
<p>ps. Stay updated for an exciting update to the ‘wec’ R package!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rensenieuwenhuis.nl/presenting-weighted-effect-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
