[Posted to Gang Chen and to Edstat.] Replies to queries embedded within Gang Chen's post:
On Fri, 21 Nov 2003, Gang Chen wrote: > One month ago, you helped me get straight with the four-way ANOVA with > mixed balanced design AxBxC(D). Here A, B, and D are fixed, while C > (usually subject) is random. > > Since now I don't have access to MINITAB, I would have to try a Matlab > function 'anovan' first. As far as I understand it, anovan currently > only allows plain fixed effects. I am not so sure if this is a concern > for a mixed design such as AxBxC(D). I wonder, as long as I get the sum > of squares based on the following formulas as though I am dealing with a > crossed design of AXBXCXD, it would be fine, correct? > > D > C(D) = C + CD > A > AD > AC(D) = AC + ACD > B > BD > BC(D) = BC + BCD > BA > BAD > BAC(D) = BAC + BACD > Error [formally, R(ABC(D)).] > > Basically my concern is, does the fact that C is a random factor in > the mixed design AxBxC(D) have any effect on the above calculation > based on the imaginary crossed design AXBXCXD. I think that it > doesn't, but I need some confirmation before I continue. Short answer: No. That C is random does not affect the computation of sums of squares, numbers of degrees of freedom, nor mean squares. What it DOES affect are the expected mean squares, and thereby the proper choice of a mean square (variously called an error mean square, a denominator mean square, or a comparison mean square) with which to compare the mean square for the current effect of interest (say, BA) in testing the null hypothesis that there are no differences among the means represented by this effect. Thus (compare the table above) the proper error mean square for BA would be BAC(D). > Another issue here is, if random factor C has k levels in the mixed > design AXBXC(D), I sould still treat C with k levels in the imaginary > crossed design AXBXCXD as though C were not nested within D, right? Yes, C still has k levels. You can verify that, adding the SS and also adding their corresponding d.f., the number of d.f. for, say, C(D) is <no. of d.f. for C> + <no. of d.f. for CD> = (k-1) + (k-1)(d-1) = d(k-1), as it should. (Using "d" for the number of levels of D.) > After I get all the sum of squares, I think that I can construct the F > statistics for effect tests myself by using the rules of thumb for > writing the ANOVA table without really relying on anything (such as F > values) from the Matlab function 'anova'. Instead, 'anovan' would be > just a tool to help me get those SSs. Am I on the right track? Yes. For a 4-way crossed design with fixed factors, the only error MS is that due to "Error", or R(ABC(D)), in the above table. This is the proper error MS only for the random effect ABC(D) in your nested design, so this is the only F value that 'anova' will report correctly. > Thanks from, > Gang [ snip, my response to the original query ] ----------------------------------------------------------------------- Donald F. Burrill [EMAIL PROTECTED] 56 Sebbins Pond Drive, Bedford, NH 03110 (603) 626-0816 . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
