<?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: R-Sessions 32: Forward.lmer: Basic stepwise function for mixed effects in R</title>
	<atom:link href="http://www.rensenieuwenhuis.nl/r-sessions-32/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rensenieuwenhuis.nl/r-sessions-32/</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: Gaiarrido</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-10803</link>
		<dc:creator><![CDATA[Gaiarrido]]></dc:creator>
		<pubDate>Mon, 08 Jun 2015 17:15:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-10803</guid>
		<description><![CDATA[Fantastic!!
Thanks]]></description>
		<content:encoded><![CDATA[<p>Fantastic!!<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rense Nieuwenhuis</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4654</link>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
		<pubDate>Mon, 15 Jul 2013 12:46:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4654</guid>
		<description><![CDATA[Hi Nick,

thank you for this excellent recommendation. For those interested, here&#039;s the link to the MuMln-package manual: http://cran.r-project.org/web/packages/MuMIn/MuMIn.pdf]]></description>
		<content:encoded><![CDATA[<p>Hi Nick,</p>
<p>thank you for this excellent recommendation. For those interested, here&#8217;s the link to the MuMln-package manual: <a href="http://cran.r-project.org/web/packages/MuMIn/MuMIn.pdf" rel="nofollow">http://cran.r-project.org/web/packages/MuMIn/MuMIn.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Isaac</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4653</link>
		<dc:creator><![CDATA[Nick Isaac]]></dc:creator>
		<pubDate>Mon, 15 Jul 2013 11:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4653</guid>
		<description><![CDATA[The MuMIn package now works well for mixed-effects models. I would recommend this over stepwise regression.]]></description>
		<content:encoded><![CDATA[<p>The MuMIn package now works well for mixed-effects models. I would recommend this over stepwise regression.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rense Nieuwenhuis</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4648</link>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
		<pubDate>Thu, 11 Jul 2013 12:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4648</guid>
		<description><![CDATA[Hi Allie,

I&#039;m afraid I don&#039;t really have any examples to share. I wrote this code to help a colleague out, and it really was tailor-made to his needs. It is good to hear that you find it helpful!]]></description>
		<content:encoded><![CDATA[<p>Hi Allie,</p>
<p>I&#8217;m afraid I don&#8217;t really have any examples to share. I wrote this code to help a colleague out, and it really was tailor-made to his needs. It is good to hear that you find it helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allie B.</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4644</link>
		<dc:creator><![CDATA[Allie B.]]></dc:creator>
		<pubDate>Fri, 05 Jul 2013 23:40:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4644</guid>
		<description><![CDATA[Hi Rense,

Thanks for sharing this function! I was wondering if you have any example data/code available using this function? I&#039;m trying to run it on my own and it would be really helpful to work through an example as I run into errors.

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Rense,</p>
<p>Thanks for sharing this function! I was wondering if you have any example data/code available using this function? I&#8217;m trying to run it on my own and it would be really helpful to work through an example as I run into errors.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rense Nieuwenhuis</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4369</link>
		<dc:creator><![CDATA[Rense Nieuwenhuis]]></dc:creator>
		<pubDate>Wed, 20 Jun 2012 17:11:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4369</guid>
		<description><![CDATA[Hi Frank,

thanks for using this function. I am aware of one journal article that used this function (and later this article was incorporated in a dissertation). The paper is by Jochem Tolsma, Tom van der Meer and Maurice Gesthuizen, and was published in Acta Politica. It is titled &quot;The impact of neighbourhood and municipality characteristics on social cohesion in the Netherlands&quot;.

You can find the article here: http://www.jtolsma.nl/uploads/Tolsma%202009%20AP.pdf]]></description>
		<content:encoded><![CDATA[<p>Hi Frank,</p>
<p>thanks for using this function. I am aware of one journal article that used this function (and later this article was incorporated in a dissertation). The paper is by Jochem Tolsma, Tom van der Meer and Maurice Gesthuizen, and was published in Acta Politica. It is titled &#8220;The impact of neighbourhood and municipality characteristics on social cohesion in the Netherlands&#8221;.</p>
<p>You can find the article here: <a href="http://www.jtolsma.nl/uploads/Tolsma%202009%20AP.pdf" rel="nofollow">http://www.jtolsma.nl/uploads/Tolsma%202009%20AP.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-4357</link>
		<dc:creator><![CDATA[Frank]]></dc:creator>
		<pubDate>Fri, 27 Apr 2012 21:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-4357</guid>
		<description><![CDATA[He Rense! Thanks for sharing this wonderful function.  I&#039;ve found it to be quite useful.  Are you aware of any papers that have used and cited it?]]></description>
		<content:encoded><![CDATA[<p>He Rense! Thanks for sharing this wonderful function.  I&#8217;ve found it to be quite useful.  Are you aware of any papers that have used and cited it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Vinod</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-3294</link>
		<dc:creator><![CDATA[Rick Vinod]]></dc:creator>
		<pubDate>Fri, 24 Sep 2010 15:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-3294</guid>
		<description><![CDATA[would your function work for cox proportional hazard
models?  I am fitting one of those with 3 sets of possible
dependent variables and some 100 possible regressors.
stepwise seems to be needed.]]></description>
		<content:encoded><![CDATA[<p>would your function work for cox proportional hazard<br />
models?  I am fitting one of those with 3 sets of possible<br />
dependent variables and some 100 possible regressors.<br />
stepwise seems to be needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alban Guillaumet</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-2908</link>
		<dc:creator><![CDATA[Alban Guillaumet]]></dc:creator>
		<pubDate>Mon, 02 Nov 2009 20:08:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-2908</guid>
		<description><![CDATA[Hi Rense,

very helpful indeed. 

I did not go through the entire code, but I think I have noticed a bug so I wanted to let you know

when writing the logs for if(sig.level != FALSE), your anova calculation for log.p[log.step] comes after you already replaces model.basis by model[[j]], so you do not get the appropriate p.value. 
I suggest you store anova(model.basis, models[[j]]) before you apply model.basis  length(blocks)) max.iter = length(blocks)

for(i in 1:max.iter){ # 2a 

models = list()
aic = numeric(length(blocks))

for(j in 1 : length(blocks)){ # 3a

models[[j]] = update(model.basis, as.formula(paste(&quot;. ~ . + &quot;, blocks[j])))

LL = logLik(models[[j]]) ; df = as.numeric(attr(LL, &quot;df&quot;)) 
aic[j] = as.numeric(-2* LL) + 2*df 

} # 3b 

LL_mb = logLik(model.basis) ; df_mb = as.numeric(attr(LL_mb, &quot;df&quot;))
aic_mb = as.numeric(-2* LL_mb) + 2*df_mb 

j = order(aic, decreasing=FALSE)[1]

if(aic[j] 0) log.df = data.frame(log.step = 1:log.step, log.block = log.block, log.AIC.bef = log.AIC.bef, log.AIC.aft = log.AIC.aft) else log.df = data.frame(log.step = NA, log.block = log.block, log.AIC.bef = log.AIC.bef, log.AIC.aft = log.AIC.aft) 
return(log.df)} # 1b]]></description>
		<content:encoded><![CDATA[<p>Hi Rense,</p>
<p>very helpful indeed. </p>
<p>I did not go through the entire code, but I think I have noticed a bug so I wanted to let you know</p>
<p>when writing the logs for if(sig.level != FALSE), your anova calculation for log.p[log.step] comes after you already replaces model.basis by model[[j]], so you do not get the appropriate p.value.<br />
I suggest you store anova(model.basis, models[[j]]) before you apply model.basis  length(blocks)) max.iter = length(blocks)</p>
<p>for(i in 1:max.iter){ # 2a </p>
<p>models = list()<br />
aic = numeric(length(blocks))</p>
<p>for(j in 1 : length(blocks)){ # 3a</p>
<p>models[[j]] = update(model.basis, as.formula(paste(&#8220;. ~ . + &#8220;, blocks[j])))</p>
<p>LL = logLik(models[[j]]) ; df = as.numeric(attr(LL, &#8220;df&#8221;))<br />
aic[j] = as.numeric(-2* LL) + 2*df </p>
<p>} # 3b </p>
<p>LL_mb = logLik(model.basis) ; df_mb = as.numeric(attr(LL_mb, &#8220;df&#8221;))<br />
aic_mb = as.numeric(-2* LL_mb) + 2*df_mb </p>
<p>j = order(aic, decreasing=FALSE)[1]</p>
<p>if(aic[j] 0) log.df = data.frame(log.step = 1:log.step, log.block = log.block, log.AIC.bef = log.AIC.bef, log.AIC.aft = log.AIC.aft) else log.df = data.frame(log.step = NA, log.block = log.block, log.AIC.bef = log.AIC.bef, log.AIC.aft = log.AIC.aft)<br />
return(log.df)} # 1b</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Isaac</title>
		<link>http://www.rensenieuwenhuis.nl/r-sessions-32/comment-page-1/#comment-2855</link>
		<dc:creator><![CDATA[Nick Isaac]]></dc:creator>
		<pubDate>Fri, 16 Oct 2009 16:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.rensenieuwenhuis.nl/?p=897#comment-2855</guid>
		<description><![CDATA[Dear Rense,

Thanks for putting this out - I&#039;ve been thinking for a while how I&#039;d code this. I should&#039;ve realised someone would have done it already.

I&#039;m intending to use the simpler &#039;lowest AIC&#039; criterion to choose the best model. I will start modifying the code next week. Do let me know if you&#039;ve done this already, but if not I will let you have the result.

Best wishes, Nick]]></description>
		<content:encoded><![CDATA[<p>Dear Rense,</p>
<p>Thanks for putting this out &#8211; I&#8217;ve been thinking for a while how I&#8217;d code this. I should&#8217;ve realised someone would have done it already.</p>
<p>I&#8217;m intending to use the simpler &#8216;lowest AIC&#8217; criterion to choose the best model. I will start modifying the code next week. Do let me know if you&#8217;ve done this already, but if not I will let you have the result.</p>
<p>Best wishes, Nick</p>
]]></content:encoded>
	</item>
</channel>
</rss>
