"Joe" <[EMAIL PROTECTED]> wrote in message

news:[EMAIL PROTECTED]



> Hello,

>

> I have three variables (factors) ... A, B and C

> I have one response ... let's call it Y.

>

> I have done a full factorial DOE with 2-levels for each factor.

>

> I have established a relationship of the form

>

> Y = k0 + k1*A + k2*B + k3*C + k4*A*B + k5*A*C + k6*B*C



Note that the above equation lacks the term for the three-way in-

teraction (i.e., ABC).  In some cases below you need to take ac-

count of this term.



>

> I have evaluated the coefficients (k's) using least squares.

>

> Thus my "X" matrix is a 8x7 matrix



The full X matrix will have as many rows as there are available

values of the response variable (i.e., as many rows as we have

values of y).  For a balanced design this will be 8n rows where n

is the number of observations of y in each of the treatment

groups in the experiment.



Assuming two levels for each predictor variable (factor), the

full X matrix will have 8 columns.  These are:



- one column for the constant (sometimes called the �grand mean�)



- three columns for the main effects (one column for each)



- three columns for the two-way interactions (one column for

  each)



- one column for the three-way interaction.



Note that the numbers in the columns of the X matrix must be

properly generated or you won't get the right answer.  (I discuss

how the columns generated in the computer programs referenced be-

low.)




>

> Now I am interested in evaluating the sum of squares for each

> term in the equation (i.e. A, B, C, AB, AC and BC)

>

> Using Type II SS (Higher order terms omitted ... HTO), I evalu-

> ate the SS for each term as follows:

>

> First I evaluate the SS for whole model,



No, in the case of computing a Type II (HTO) main effect you

don't evaluate the residual sum of squares for the WHOLE model.

Instead, you need to evaluate the residual sum of squares for a

smaller model -- a different model in each of the three main-

effects cases below.





> then for each term in equation

>

> A -> remove columns A, AB and AC from the X matrix

> B -> remove columns B, AB and BC from the X matrix

> C -> remove columns C, AC and BC from the X matrix

> AB -> remove column AB

> AC -> remove column AC

> BC -> remove column BC

>

> and then evaluate the coefficients again

>

> I evaluate the difference in SS between two models

> This gives me the SS for that particular term.



The idea of computing analysis of variance sums of squares by

subtracting the residual sum of squares for one model from the

residual sum of squares for another model (as first proposed in

1934 by Frank Yates) is correct.  However, as noted above, you

don't use the WHOLE model for the Type II (HTO) sums of squares

(except when computing the sum of squares for the highest-level

interaction).  The reason why you don't use the whole model is

that both models whose residual sums of squares are �differenced�

have Higher-level Terms Omitted from them, as suggested by the

name HTO.





>

> Now for Type III (Higher order terms included ... HTI)

>

> I do everything same as above except how I choose terms for my

> model

>

> A -> remove column A

> B -> remove column B

> C -> remove column C

> AB -> remove column AB

> AC -> remove column AC

> BC -> remove column BC



Yes, this is correct.  The other model in each of the above six

cases is the WHOLE factorial model.  (Don�t forget to include the

term for the three-way interaction.)  Both models have Higher-

level Terms Included in them, as suggested by the name HTI.



>

> For a balanced design (like this ... a full factorial),



A full factorial design isn't necessarily "balanced" -- the con-

cepts of 'full factorial' and 'balanced' are independent of each

other.  These concepts are discussed in the computer programs

referenced below.





> I should get SS values from both types exactly same,

> but I don't ... and also the total of SS for each model term

> should add up to the SS of the model.  In my case this doesn't



Yes, for a balanced design if the computations are done correctly

you should get the same sums of squares using both the HTO and

HTI approaches.  Also, the individual sums of squares should add

up to the "model" sum of squares.



I discuss computation of analysis of variance sums of squares us-

ing Yates' approach in two heavily documented matrix-language

computer programs.  These programs apply to both balanced and un-

balanced cases and they demonstrate the computations for both

two-way and three-way analyses.  (The programs show the two mod-

els whose residual sums of squares are "differenced" for each ef-

fect.)  The programs are available at



    http://www.matstat.com/ss/



Don Macnaughton



------------------------------------------------------- 

Donald B. Macnaughton   MatStat Research Consulting Inc

[EMAIL PROTECTED]      Toronto, Canada

------------------------------------------------------- 






.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to