<?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: Post hoc analysis for Friedman&#8217;s Test  (R code)</title> <atom:link href="http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/feed/" rel="self" type="application/rss+xml" /><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/</link> <description>Writing about statistics with R, and open source stuff (software, data, community)</description> <lastBuildDate>Tue, 07 Sep 2010 13:02:41 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Matthias</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-3190</link> <dc:creator>Matthias</dc:creator> <pubDate>Tue, 07 Sep 2010 13:02:41 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-3190</guid> <description>To those that read my comment, please just ignore it: the error was entirely down to my own lack of experience with R and attempting to name a variable &#039;data&#039;. The script works perfectly!</description> <content:encoded><![CDATA[<p>To those that read my comment, please just ignore it: the error was entirely down to my own lack of experience with R and attempting to name a variable &#8216;data&#8217;. The script works perfectly!</p> ]]></content:encoded> </item> <item><title>By: Matthias</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-3189</link> <dc:creator>Matthias</dc:creator> <pubDate>Tue, 07 Sep 2010 12:17:39 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-3189</guid> <description>Hi,
Great that such a script is available, really appreciate it.Doesn&#039;t seem to work on all data though. For e.g., I have ordinal data ranging from 1-3 in groups = 15, and blocks = 7.R produces this error:Error in data[, X.name] : incorrect number of dimensionsThe ordinary friedman.test gives me:Friedman chi-squared = 50.127, df = 14, p-value = 5.814e-06So in principle your script should also work. But I am at a loss to explain why it does not. Will keep trying though.
Thanks again!</description> <content:encoded><![CDATA[<p>Hi,<br
/> Great that such a script is available, really appreciate it.</p><p>Doesn&#8217;t seem to work on all data though. For e.g., I have ordinal data ranging from 1-3 in groups = 15, and blocks = 7.</p><p>R produces this error:</p><p>Error in data[, X.name] : incorrect number of dimensions</p><p>The ordinary friedman.test gives me:</p><p>Friedman chi-squared = 50.127, df = 14, p-value = 5.814e-06</p><p>So in principle your script should also work. But I am at a loss to explain why it does not. Will keep trying though.<br
/> Thanks again!</p> ]]></content:encoded> </item> <item><title>By: Xavier</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-3023</link> <dc:creator>Xavier</dc:creator> <pubDate>Tue, 27 Jul 2010 22:05:26 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-3023</guid> <description>Awesome work. It&#039;s really helping me. I add your blog in my bookmark !</description> <content:encoded><![CDATA[<p>Awesome work. It&#8217;s really helping me. I add your blog in my bookmark !</p> ]]></content:encoded> </item> <item><title>By: James</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2992</link> <dc:creator>James</dc:creator> <pubDate>Tue, 20 Jul 2010 14:53:44 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2992</guid> <description>Hi Tal,I can&#039;t wait to successfully use the code you have worked out and so kindly shared with us ALL.To start. i&#039;ve  plugged in the followingfriedman.test.with.post.hoc &lt;- function(formu, data, to.print.friedman = T, to.post.hoc.if.signif = T,  to.plot.parallel = T, to.plot.boxplot = T, signif.P = .05, color.blocks.in.cor.plot = T, jitter.Y.in.cor.plot =F)I receive a + symbol. Is this correct? I&#039;ve been working at trying to get my data into your code for 2 days, but am new to R and am struggling.I have updated the coin, multcomp, and colorspace with success. Does this need to be done in a specific order or each time I reopen R?I have 3 columns of data. Id = turtle name (block), temperature (factor)...collected stomach temperature from 7 turtles) and time (group)...want to see if there is a difference in stomach temperature for 4 time periods (dawn, day, dusk, night). I do not have 0s or blanks in my data set and found a sig. difference for Friedman.test in R.any advice would be greatly appreciated!!!</description> <content:encoded><![CDATA[<p>Hi Tal,</p><p>I can&#8217;t wait to successfully use the code you have worked out and so kindly shared with us ALL.</p><p>To start. i&#8217;ve  plugged in the following</p><p>friedman.test.with.post.hoc &lt;- function(formu, data, to.print.friedman = T, to.post.hoc.if.signif = T,  to.plot.parallel = T, to.plot.boxplot = T, signif.P = .05, color.blocks.in.cor.plot = T, jitter.Y.in.cor.plot =F)</p><p>I receive a + symbol. Is this correct? I&#039;ve been working at trying to get my data into your code for 2 days, but am new to R and am struggling.</p><p>I have updated the coin, multcomp, and colorspace with success. Does this need to be done in a specific order or each time I reopen R?</p><p>I have 3 columns of data. Id = turtle name (block), temperature (factor)&#8230;collected stomach temperature from 7 turtles) and time (group)&#8230;want to see if there is a difference in stomach temperature for 4 time periods (dawn, day, dusk, night). I do not have 0s or blanks in my data set and found a sig. difference for Friedman.test in R.</p><p>any advice would be greatly appreciated!!!</p> ]]></content:encoded> </item> <item><title>By: LuisM</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2874</link> <dc:creator>LuisM</dc:creator> <pubDate>Mon, 05 Jul 2010 15:35:45 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2874</guid> <description>Thanks Tal!!</description> <content:encoded><![CDATA[<p>Thanks Tal!!</p> ]]></content:encoded> </item> <item><title>By: Tal Galili</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2873</link> <dc:creator>Tal Galili</dc:creator> <pubDate>Mon, 05 Jul 2010 15:13:27 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2873</guid> <description>Hello LuisM,Thank you very much for offering me the honor of being cited.Due to my lack of experience, I might be missing on how this should be done, but here is how you might do it:The analysis was done using R:
@Manual{,
title        = {R: A Language and Environment for Statistical
Computing},
author       = {{R Development Core Team}},
organization = {R Foundation for Statistical Computing},
address      = {Vienna, Austria},
year         = 2010,
note         = {{ISBN} 3-900051-07-0},
url          = {http://www.R-project.org}
}
With the “coin” and “multcomp” packages.
Performing the post-hoc tests of:
Wilcoxon-Nemenyi-McDonald-Thompson test
Hollander &amp; Wolfe (1999), page 295Using the code of &quot;Tal Galili&quot;, published on r-statistics.com (http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code)</description> <content:encoded><![CDATA[<p>Hello LuisM,</p><p>Thank you very much for offering me the honor of being cited.</p><p>Due to my lack of experience, I might be missing on how this should be done, but here is how you might do it:</p><p>The analysis was done using R:<br
/> @Manual{,<br
/> title        = {R: A Language and Environment for Statistical<br
/> Computing},<br
/> author       = {{R Development Core Team}},<br
/> organization = {R Foundation for Statistical Computing},<br
/> address      = {Vienna, Austria},<br
/> year         = 2010,<br
/> note         = {{ISBN} 3-900051-07-0},<br
/> url          = {http://www.R-project.org}<br
/> }<br
/> With the “coin” and “multcomp” packages.<br
/> Performing the post-hoc tests of:<br
/> Wilcoxon-Nemenyi-McDonald-Thompson test<br
/> Hollander &#038; Wolfe (1999), page 295</p><p>Using the code of &#8220;Tal Galili&#8221;, published on r-statistics.com (<a
href="http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code" rel="nofollow">http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code</a>)</p> ]]></content:encoded> </item> <item><title>By: LuisM</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2871</link> <dc:creator>LuisM</dc:creator> <pubDate>Sun, 04 Jul 2010 13:38:15 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2871</guid> <description>Hi Tal,Thanks a lot for all your helpfull information.I have used your code for R to perform a post hoc in a Friedman test. I would like to know how can I cite your code in a journal.
Thanks,
Luis</description> <content:encoded><![CDATA[<p>Hi Tal,</p><p>Thanks a lot for all your helpfull information.</p><p>I have used your code for R to perform a post hoc in a Friedman test. I would like to know how can I cite your code in a journal.<br
/> Thanks,<br
/> Luis</p> ]]></content:encoded> </item> <item><title>By: Tal Galili</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2752</link> <dc:creator>Tal Galili</dc:creator> <pubDate>Wed, 16 Jun 2010 12:18:36 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2752</guid> <description>Hi Katrine,
I am glad you found my post helpful :)If I understood you correctly, your dataset is of 10 animals.  For each animal you&#039;ve got 10 (overtime) observation.  Each observation is a number (the number of stress factors).
If I got you correctly, then indeed the code in this post (for the post hoc friedman test) could potentially help you.
BUT, I don&#039;t think it will be very helpful.
You are dealing with a case of 10 repeated measures on each individual animal.  That means you&#039;ve got 10 over 2 comparisons (45).  That is a big number.
Also, you are having a time effect here, why not use it in some way ?For example, why not only look at 3 time points (start, middle, finish) and make the post hoc comparison on them?
This post hoc might offer more easily interpretable results.A better yet solution would be to go further and see if you can use some mixed models on your data.
Then, what you are looking to check is if you are having a significant slope for the trend line.
Although I haven&#039;t yet wrote about these methods (and I also don&#039;t know how your data is behaving and how legitimate it is to use mixed models on it).Consider also giving a look to what I wrote here:
http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/But if my earlier tip (of just using less data points - to allow interpretation), is not enough for you - then I suggest you try and find some professional help to look at your data and see if mixed models can work on it or not. (Or just learn it by yourself, but it might take some time :)  )Regarding the visualization, it is very straight forward.
This tutorial:
http://www.ats.ucla.edu/stat/R/seminars/Repeated_Measures/repeated_measures.htm
Shows how to do it with lattice.  You might also want to try ggplot2 for that (both have some learning curve, but offer good results).Good luck,
Tal</description> <content:encoded><![CDATA[<p>Hi Katrine,<br
/> I am glad you found my post helpful <img
src='http://www.r-statistics.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>If I understood you correctly, your dataset is of 10 animals.  For each animal you&#8217;ve got 10 (overtime) observation.  Each observation is a number (the number of stress factors).<br
/> If I got you correctly, then indeed the code in this post (for the post hoc friedman test) could potentially help you.<br
/> BUT, I don&#8217;t think it will be very helpful.<br
/> You are dealing with a case of 10 repeated measures on each individual animal.  That means you&#8217;ve got 10 over 2 comparisons (45).  That is a big number.<br
/> Also, you are having a time effect here, why not use it in some way ?</p><p>For example, why not only look at 3 time points (start, middle, finish) and make the post hoc comparison on them?<br
/> This post hoc might offer more easily interpretable results.</p><p>A better yet solution would be to go further and see if you can use some mixed models on your data.<br
/> Then, what you are looking to check is if you are having a significant slope for the trend line.<br
/> Although I haven&#8217;t yet wrote about these methods (and I also don&#8217;t know how your data is behaving and how legitimate it is to use mixed models on it).</p><p>Consider also giving a look to what I wrote here:<br
/> <a
href="http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/" rel="nofollow">http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/</a></p><p>But if my earlier tip (of just using less data points &#8211; to allow interpretation), is not enough for you &#8211; then I suggest you try and find some professional help to look at your data and see if mixed models can work on it or not. (Or just learn it by yourself, but it might take some time <img
src='http://www.r-statistics.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p><p>Regarding the visualization, it is very straight forward.<br
/> This tutorial:<br
/> <a
href="http://www.ats.ucla.edu/stat/R/seminars/Repeated_Measures/repeated_measures.htm" rel="nofollow">http://www.ats.ucla.edu/stat/R/seminars/Repeated_Measures/repeated_measures.htm</a><br
/> Shows how to do it with lattice.  You might also want to try ggplot2 for that (both have some learning curve, but offer good results).</p><p>Good luck,<br
/> Tal</p> ]]></content:encoded> </item> <item><title>By: Katrine</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2751</link> <dc:creator>Katrine</dc:creator> <pubDate>Wed, 16 Jun 2010 11:59:17 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2751</guid> <description>Hi!
Wow, this place has been a huge help to me, thank you, Tal.I&#039;ve gotten a bit confused though, in my search for the correct statistics for my master thesis in behavioral biology.I am looking at 10 trainingsessions (over time) with a number of stress related symptoms within each session. These symptoms are a result of a human impact on 10 different animals.Using the Friedman test I&#039;ve already established that there is a significant difference in the number of symptoms between the 10 sessions. Now I would like to know between which sessions the difference is. Have I understood correctly if I think I can test this with the method mentioned above (the post hoc Friedman)?Furthermore I would like to make a trendline from session 1 to session 10 showing if the number of symptoms are in- or declining over time. Do you know how to do this in R?Hope all this makes sence...Best wishes,
Katrine</description> <content:encoded><![CDATA[<p>Hi!<br
/> Wow, this place has been a huge help to me, thank you, Tal.</p><p>I&#8217;ve gotten a bit confused though, in my search for the correct statistics for my master thesis in behavioral biology.</p><p>I am looking at 10 trainingsessions (over time) with a number of stress related symptoms within each session. These symptoms are a result of a human impact on 10 different animals.</p><p>Using the Friedman test I&#8217;ve already established that there is a significant difference in the number of symptoms between the 10 sessions. Now I would like to know between which sessions the difference is. Have I understood correctly if I think I can test this with the method mentioned above (the post hoc Friedman)?</p><p>Furthermore I would like to make a trendline from session 1 to session 10 showing if the number of symptoms are in- or declining over time. Do you know how to do this in R?</p><p>Hope all this makes sence&#8230;</p><p>Best wishes,<br
/> Katrine</p> ]]></content:encoded> </item> <item><title>By: Tal Galili</title><link>http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/comment-page-1/#comment-2736</link> <dc:creator>Tal Galili</dc:creator> <pubDate>Sat, 12 Jun 2010 11:25:56 +0000</pubDate> <guid
isPermaLink="false">http://www.r-statistics.com/?p=150#comment-2736</guid> <description>Hello Jacob,You are absolutely correct.
The Friedman test is only of use when we are doing a one-way repeated measures (non parametric) ANOVA.I was wondering myself how this can be performed when the need arise for a multiway ANOVA.  As I wrote on my other post &lt;a href=&quot;http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/&quot; rel=&quot;nofollow&quot;&gt;repeated measures anova with r (tutorials and functions)&lt;/a&gt;, I couldn&#039;t (yet) find a solution for this issue.  (although there is a solution for multi way, non-parametric, NOT repeated measures, ANOVA.  See that post for more on that).If you ever come about a solution for this case, please let me know.Best,
Tal</description> <content:encoded><![CDATA[<p>Hello Jacob,</p><p>You are absolutely correct.<br
/> The Friedman test is only of use when we are doing a one-way repeated measures (non parametric) ANOVA.</p><p>I was wondering myself how this can be performed when the need arise for a multiway ANOVA.  As I wrote on my other post <a
href="http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/" rel="nofollow">repeated measures anova with r (tutorials and functions)</a>, I couldn&#8217;t (yet) find a solution for this issue.  (although there is a solution for multi way, non-parametric, NOT repeated measures, ANOVA.  See that post for more on that).</p><p>If you ever come about a solution for this case, please let me know.</p><p>Best,<br
/> Tal</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 4/19 queries in 0.009 seconds using disk
Object Caching 408/421 objects using disk

Served from: www.r-statistics.com @ 2010-09-08 00:11:31 -->