After several personal e-mails with Donald, I figured out my confusion attempting to identify the degrees of freedom in a repeated measures design. I would sincerely like to thank Donald for taking the time to discuss this problem further. In the following e-mail, I would briefly like to correct and clarify myself once again.
We agree that a two-way repeated measures ANOVA is the best way to analyze the shirt problem. There are, of course, other ways of setting up the analysis (i.e. two within-subjects and 1 random factor for subjects or 1 within-subjects factor) as others on the listserv suggest. In a simple two-way setup, however, the degrees of freedom is 1 for the within-subjects factors and error mean square has 7 degrees of freedom (see below for explanation). This allows you to test the hypothesis that there is a type effect, size effect, and interaction effect. Degrees of freedom for one way within-subjects ANOVA: I finally went to a stats book to get the answer for df. Degrees of freedom for the error is (a-1) X (n-1). So when you only have 1 degree of freedom for the within-subjects factor the corresponding error term is n-1. However, when you have many timepoints (as we often do) you have to go back to the formula. For example, if you are working with three time points, then a-1 = 2 (where "a" is the number of levels). If I had a sample of 8 in this case, the degrees of freedom would be 2 times n-1 or, in this case, equal to 14. As you can see, this is what I did by accident. In our discussion, Donald added a more comprehensive description of degrees of freedom in a repeated measures design: Consider Archana's design, a two-way repeated measures design, which is R x A x B, using R for subjects (Replications; the experimental unit may not always be a human subject) with r = 8 levels, A = garment type with a = 2 levels (Type A, Type B), B = size with b = 2 levels (medium, large). R is a random factor, A and B are fixed factors. List the sources of variation, beginning with the random factor: R; A, RA; B, RB, AB, RAB. (Note that each time a new factor is added, it is followed by all its concatenations (interactions) with the previous factors.) The corresponding degrees of freedom are: R r-1 = 7 A a-1 = 1 RA (r-l)(a-l) = 7 B b-1 = 1 RB (r-1)(b-1) = 7 AB (a-1)(b-1) = 1 RAB (r-1)(a-1)(b-1) = 7 Because R is random and all other factors are fixed, the appropriate error means square for A is RA; for B, RB; for AB, RAB. To illustrate the effect of adding a between-subjects factor, say G (for Gender), the design would then be R(G) x A x B with r=4, g=a=b=2. (That is, R (subjects) is now nested within G: 4 males, 4 females.) The ANOVA table (now beginning with the factor in the innermost nest): G g-1 = 1 R(G) (r-1)g = 6 A a-1 = 1 GA (a-1)(g-1) = 1 AR(G) (a-1)(r-1)g = 6 B b-1 = 1 GB (g-1)(b-1) = 1 BR(G) (b-1)(r-1)g = 6 AB (a-1)(b-1) = 1 GAB (g-1)(a-1)(b-1) = 1 ABR(G) (a-1)(b-1)(r-1)g = 6 Every mean square involving R is the error term for the sources immediately preceding it in the table, when the sources are listed in this order: thus R(G) for G, AR(G) for A and GA, BR(G) for B and GB, ABR(G) for AB and GAB. Jeff --------------------------------------------------------------- Jeff Dang, MPH Statistician UCLA Cousins Center for Psychoneuroimmunology (Affiliated with the Neuropsychiatric Institute and Department of Psychiatry and Biobehavioral Sciences) 300 UCLA Medical Plaza, Room 3148 Los Angeles, CA 90095-7057 Tel: 310-267-4389 Fax: 310-794-9247 E-mail: [EMAIL PROTECTED] Web: http://www.cousinspni.org/ ATTENTION The information contained in this message may be legally privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message. -----Original Message----- From: Dang, Jeff Sent: Thursday, January 29, 2004 1:04 PM To: '[EMAIL PROTECTED]' Subject: FW: [edstat] one way ANOVA or repeated measures ANOVA Please accept this correction, "So, if I am not mistaken, would want to have two within-subjects factors representing the 2 types and 2 styles with degrees of freedom (1,14)." I got the degrees of freedom wrong. --------------------------------------------------------------- Jeff Dang, MPH Statistician UCLA Cousins Center for Psychoneuroimmunology (Affiliated with the Neuropsychiatric Institute and Department of Psychiatry and Biobehavioral Sciences) 300 UCLA Medical Plaza, Room 3148 Los Angeles, CA 90095-7057 Tel: 310-267-4389 Fax: 310-794-9247 E-mail: [EMAIL PROTECTED] Web: http://www.cousinspni.org/ ATTENTION The information contained in this message may be legally privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message. -----Original Message----- From: Dang, Jeff Sent: Thursday, January 29, 2004 12:47 PM To: '[EMAIL PROTECTED]' Subject: RE: [edstat] one way ANOVA or repeated measures ANOVA It's funny how such a simple problem becomes somewhat tricky.... Let's clarify the shirt problem because I think there may be some confusion. There are n=8 subjects, two types, and two styles. So, if I am not mistaken, for the one-way repeated measures ANOVA you would want to have two within-subjects factors representing the 2 types and 2 styles with degrees of freedom (2,14). You could also separate the independent variables up as James suggests into 1 within-subjects factor with degrees of freedom (3, 21). But this would not account for the fact that the "sizes" are nested within "shirts". You should let your hypotheses drive your analytical decision. Jeff Dang -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 9:11 AM To: [EMAIL PROTECTED] Subject: Re: [edstat] one way ANOVA or repeated measures ANOVA this is a one-way repeated measures ANOVA. total DF=31, partitioned into 7 between subjects and 24 within subjects. the 24 are further broken down into 3 for types of shirts and 21 for error (subjects by shirts interaction). the "test" uses the F with 3 and 21 degrees of freedom. the test statistic is the ratio of the mean square for shirts to the mean square error. if the F is significant, you can do a post hoc test to look at whether the types differ across sizes or the sizes differ across both types. have fun [EMAIL PROTECTED] (Archana) wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > Iam textile engineering looking for some statistical advice. > I have the following test garments (total 4 types)- > > Type A - medium and large > Type B - medium and large > > The same 8 subjects wore the shirts and perfomred some physical > activity. Their heart rate, skin and core temperature etc were > monitored. I want to find out if the heart rate or the other > parameters are significant for the 4 types of shirt. What do i follow? > One way anova or repeated measures design and why? > your answers would be of great help to me. > > Thanks . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . ================================================================= . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
