Re: [R] Learning to do randomized block design analysis

From: T.K. <taekyunk_at_gmail.com>
Date: Wed, 5 Dec 2007 14:16:37 -0800

Dear R-Helpers

(1)

After a night's sleep, I realized why the other helpers think differently from me.
I agree with others that it may be better to use multi-stratum model but I was a bit surprised since they seem to think 'block' variable should *not* be a fixed effect.

  1. Others seemed to think, "Kevin is trying to estimate 'multi-stratum' model since he is using Error(block)"
  2. I thought "Kevin is trying to estimate a simple ANOVA model (*not* random effects model) but did not use the right R code"

I thought so for the following reasons.
1) I looked up the book in Amazon and browsed the index using ' Search Inside' function. It does not seem to cover random effects model. 2) The description of the book says it uses Minitab so I guessed Kevin is getting R code from somewhere else.
3) In addition, Kevin's code looked very similar to the example code of 'aov'.
The example code of 'aov' has the following code segment involving 'block' variable
## as a test, not particularly sensible statistically npk.aovE <- aov(yield ~ N*P*K + Error(block), npk) So, I guessed Kevin might have gotten his code from here. After emailing Kevin, I found that he is using the code from 'split-plot' section of MASS, so my guess is not that far off.

(2)

I got this new bits of information from Kevin.

The data set is from a psychological experiment and subjects are *assigned* to one of the blocks according to their scores on a test. Subjects with the lowest scores are assigned to block A, and highest to block E. These blocks were *not* randomly chosen from a larger set of blocks. Then the treatment was randomized within each 'block'.

Given this new information, I think it is okay to solve Kevin's question simply by using
aov(Score.changes ~ Therapy + Block, data=table) assuming the fixed effects of 'block'.

I would appreciate your correction if I am mistaken here.



T.K. (Tae-kyun) Kim
Ph.D. student
Department of Marketing
Marshall School of Business
University of Southern California

        [[alternative HTML version deleted]]



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. Received on Wed 05 Dec 2007 - 22:20:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Dec 2007 - 22:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.