saschaview at gmail.com
2012-Feb-19 18:25 UTC
[R] Non-parametric test for repeated measures and post-hoc single comparisons in R?
Some attribute x from 17 individuals was recorded repeatedly on 6 time points using a Likert scale with 7 distractors. Which statistical test(s) can I apply to check whether the changes along the 6 time points were significant? set.seed( 123 ) x <- matrix( sample( 1:7, 17*6, repl=T ), nrow = 17, byrow = TRUE, dimnames = list(1:17, paste( 'T', 1:6, sep='' )) ) I found the Friedman test and the Quade test for testing the overall hypothesis. friedman.test( x ) quade.test( x ) However, the R help files, my text books (Bortz, Lienert and Boehnke, 2008; K?hler, Schachtel and Voleske, 2007; both German), and the Wikipedia texts differ in what they propose as requirements for the tests. R says that data need to be unreplicated. I read 'unreplicated' as 'not-repeated', but is that right? If so, the example, in contrast, in friedman.test() appears to use indeed repeated measures. Yet, Wikipedia says the contrary that is to say the test is good especially if data represents repeated measures. The text books say either (in the same paragraph, which is very confusing). What is right? In addition, what would be an appropriate test for post-hoc single comparisons for the indication which column differs from others significantly? Bortz, Lienert, Boehnke (2008). Verteilungsfreie Methoden in der Biostatistik. Berlin: Springer K?hler, Schachtel, Voleske (2007). Biostatistik: Eine Einf?hrung f?r Biologen und Agrarwissenschaftler. Berlin: Springer -- Sascha Vieweg, saschaview at gmail.com
Tal Galili
2012-Feb-19 18:31 UTC
[R] Non-parametric test for repeated measures and post-hoc single comparisons in R?
The following post would not answer your question at full, but might give some good code/information: http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/ ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Sun, Feb 19, 2012 at 8:25 PM, <saschaview@gmail.com> wrote:> Some attribute x from 17 individuals was recorded repeatedly on 6 time > points using a Likert scale with 7 distractors. Which statistical test(s) > can I apply to check whether the changes along the 6 time points were > significant? > > set.seed( 123 ) > x <- matrix( sample( 1:7, 17*6, repl=T ), > nrow = 17, byrow = TRUE, > dimnames = list(1:17, paste( 'T', 1:6, sep='' )) > ) > > I found the Friedman test and the Quade test for testing the overall > hypothesis. > > friedman.test( x ) > quade.test( x ) > > However, the R help files, my text books (Bortz, Lienert and Boehnke, > 2008; Köhler, Schachtel and Voleske, 2007; both German), and the Wikipedia > texts differ in what they propose as requirements for the tests. R says > that data need to be unreplicated. I read 'unreplicated' as 'not-repeated', > but is that right? If so, the example, in contrast, in friedman.test() > appears to use indeed repeated measures. Yet, Wikipedia says the contrary > that is to say the test is good especially if data represents repeated > measures. The text books say either (in the same paragraph, which is very > confusing). What is right? > > In addition, what would be an appropriate test for post-hoc single > comparisons for the indication which column differs from others > significantly? > > Bortz, Lienert, Boehnke (2008). Verteilungsfreie Methoden in der > Biostatistik. Berlin: Springer > Köhler, Schachtel, Voleske (2007). Biostatistik: Eine Einführung für > Biologen und Agrarwissenschaftler. Berlin: Springer > > -- > Sascha Vieweg, saschaview@gmail.com > > ______________________________**________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide http://www.R-project.org/** > posting-guide.html <http://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
saschaview at gmail.com
2012-Feb-19 19:00 UTC
[R] Non-parametric test for repeated measures and post-hoc single comparisons in R?
On 19.02.12 19:31, Tal Galili wrote:> The following post would not answer your question at full, but might give > some good code/information: > http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/Thank you, Tal! As you already mentioned, your interesting post supports Friedman being indeed the right test for my problem, but it does not explain why and what my mis-interpretation of unreplicated versus unrepeated is. However, your code may help to run post-hoc single comparisons. Yet, I may take the chance to clarify that my problem is that Wikipedia, text books, and the R help say different things -- at least to my understanding. Anyway, you helped, thank you!
peter dalgaard
2012-Feb-19 21:04 UTC
[R] Non-parametric test for repeated measures and post-hoc single comparisons in R?
Repeated measures means that you have multiple measurements on the same individual. Usually, the same person measured at different time points. So if you have N individuals and T times, then you can place your observations in an N*T layout. In this layout, you can have 1 observation per cell or R > 1 observations. In the former case, the design is referred to as unreplicated. Got it? -pd On Feb 19, 2012, at 19:25 , saschaview at gmail.com wrote:> Some attribute x from 17 individuals was recorded repeatedly on 6 time points using a Likert scale with 7 distractors. Which statistical test(s) can I apply to check whether the changes along the 6 time points were significant? > > set.seed( 123 ) > x <- matrix( sample( 1:7, 17*6, repl=T ), > nrow = 17, byrow = TRUE, > dimnames = list(1:17, paste( 'T', 1:6, sep='' )) > ) > > I found the Friedman test and the Quade test for testing the overall hypothesis. > > friedman.test( x ) > quade.test( x ) > > However, the R help files, my text books (Bortz, Lienert and Boehnke, 2008; K?hler, Schachtel and Voleske, 2007; both German), and the Wikipedia texts differ in what they propose as requirements for the tests. R says that data need to be unreplicated. I read 'unreplicated' as 'not-repeated', but is that right? If so, the example, in contrast, in friedman.test() appears to use indeed repeated measures. Yet, Wikipedia says the contrary that is to say the test is good especially if data represents repeated measures. The text books say either (in the same paragraph, which is very confusing). What is right? > > In addition, what would be an appropriate test for post-hoc single comparisons for the indication which column differs from others significantly? > > Bortz, Lienert, Boehnke (2008). Verteilungsfreie Methoden in der Biostatistik. Berlin: Springer > K?hler, Schachtel, Voleske (2007). Biostatistik: Eine Einf?hrung f?r Biologen und Agrarwissenschaftler. Berlin: Springer > > -- > Sascha Vieweg, saschaview at gmail.com > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com