<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: A novel method for modelling interaction between categorical variables</title>
	<atom:link href="http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/</link>
	<description>&#34;The extra-ordinary lies within the curve of normality&#34;</description>
	<lastBuildDate>Thu, 10 Jan 2019 23:23:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>By: Rense Nieuwenhuis</title>
		<link>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/comment-page-1/#comment-16388</link>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
		<pubDate>Wed, 19 Apr 2017 06:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6075#comment-16388</guid>
		<description><![CDATA[Hi Mikael,

this is an issue that we are currently thinking about and working on. It would, of course, be very desirable to implement, but we haven&#039;t decided yet on how to do so best. Particularly for the interactions it may be complex. But, for the &#039;regular&#039; weighted effect coding (=without interaction), it should be easy to implement, for instance as follows:

library(questionr)
contr.wecw &lt;- function (x, omitted, w) 
{
  frequencies &lt;- wtd.table(x, weights=w)
  n.cat &lt;- length(table(x))
  omitted &lt;- which(levels(x) == omitted)
  new.contrasts &lt;- contr.treatment(n.cat, base = omitted)
  new.contrasts[omitted, ] &lt;- -1 * frequencies[-omitted]/frequencies[omitted]
  colnames(new.contrasts) &lt;- names(frequencies[-omitted])
  return(new.contrasts)
}]]></description>
		<content:encoded><![CDATA[<p>Hi Mikael,</p>
<p>this is an issue that we are currently thinking about and working on. It would, of course, be very desirable to implement, but we haven&#8217;t decided yet on how to do so best. Particularly for the interactions it may be complex. But, for the &#8216;regular&#8217; weighted effect coding (=without interaction), it should be easy to implement, for instance as follows:</p>
<p>library(questionr)<br />
contr.wecw <- function (x, omitted, w)<br />
{<br />
  frequencies <- wtd.table(x, weights=w)<br />
  n.cat <- length(table(x))<br />
  omitted <- which(levels(x) == omitted)<br />
  new.contrasts <- contr.treatment(n.cat, base = omitted)<br />
  new.contrasts[omitted, ] <- -1 * frequencies[-omitted]/frequencies[omitted]<br />
  colnames(new.contrasts) <- names(frequencies[-omitted])<br />
  return(new.contrasts)<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael</title>
		<link>http://www.rensenieuwenhuis.nl/a-novel-method-for-modelling-interaction-between-categorical-variables/comment-page-1/#comment-16387</link>
		<dc:creator><![CDATA[Mikael]]></dc:creator>
		<pubDate>Tue, 18 Apr 2017 18:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=6075#comment-16387</guid>
		<description><![CDATA[Hi, I would be very interested in using the weighted effect coding in my work.  However, I am using mostly weighted regressions (lm(y~x, weights=w)). In that case the counts should be replaced by sum of weights.  What would be the most convenient way to achieve this using &#039;wec&#039;?  Is this possible in the first place?]]></description>
		<content:encoded><![CDATA[<p>Hi, I would be very interested in using the weighted effect coding in my work.  However, I am using mostly weighted regressions (lm(y~x, weights=w)). In that case the counts should be replaced by sum of weights.  What would be the most convenient way to achieve this using &#8216;wec&#8217;?  Is this possible in the first place?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
