17
Modeling Effects and Additive Two-Factor Models (i.e. without interaction) STAT:5201 Week 5: Lecture 1 1 / 17

Modeling Effects and Additive Two-Factor Models (i.e

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Modeling Effects and Additive Two-Factor Models (i.e

Modeling Effects andAdditive Two-Factor Models

(i.e. without interaction)

STAT:5201

Week 5: Lecture 1

1 / 17

Page 2: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

To “model” the data...

...to ‘break-down’ into its component parts.

...to define how the data were generated, or define thedata generating mechanism.

...to show each observation as a sum of effects, each effect comingfrom a different source of variation.

....to specify a statistical distribution for the data.

2 / 17

Page 3: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

Example (RCBD primary factor of daylength and block on LITTER)

Hibernation example with 1 primary factor of daylength and a block. Foreach of 6 random litters we have two hamsters, the treatments of shortand long will be randomly assigned to each pair of litter hamsters.

The observed enzyme level is generated by taking the grand mean, addinga litter effect and a day length effect, plus adding a random effectrepresenting unexplained variation, or ‘noise’.

3 / 17

Page 4: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

Example (RCBD primary factor of daylength and block on LITTER)

There are two levels to the main effect of daylength, which weperceive as a bump-up or bump-down, depending on the given level(short or long).

4 / 17

Page 5: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

It might be helpful to think of the residual as what is ‘left over’ afterµ and the other effects have been removed.

Example (RCBD primary factor of daylength and block on LITTER)

In the formal mathematical model, we see the different effectspresent, and the distribution of all random effects (we consider blockas random here).

5 / 17

Page 6: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

In the previous RCBD example, we assumed no interaction betweenthe block LITTER and daylength. This assumption is often made fora blocking factor & a primary factor.

A model that includes only main effects and no interaction is anadditive model or a main-effects only model.

In the main-effects only model, the effects of one factor does notdepend upon the level of the other factor. Changing from one level offactor A to another has the same effect across all levels of factor B.

6 / 17

Page 7: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

When we estimate effects in our models, we will use a hat or “∧” torepresent the estimate.

We will use the data to compute estimates of the effects. And theobserved enzyme level can be written as a sum of these estimatedeffects.

7 / 17

Page 8: Modeling Effects and Additive Two-Factor Models (i.e

Modeling & Effects

We often consider the “fitted value” or the value predicted by themodel:

Continuing,

8 / 17

Page 9: Modeling Effects and Additive Two-Factor Models (i.e

Estimates for the Additive Model

We will consider litter as a fixed effect in the model here.

Formal model (two fixed effects, no interaction):

Yij = µ+ Li + dj + εij with εijiid∼ N(0, σ2)

litter i = 1, . . . , 6 and daylength j = 1, 2 (short/long)

Estimates for the balanced scenario, sum-to-zero constraints:

Grand mean: µ = Y·· =∑

i

∑j Yij

12

litter i effect: Li = litter mean−grand mean= Yi. − Y·· =∑2

j=1 Yij

2 − Y··

dayength j effect: dj = daylength mean−grand mean

= Y.j − Y·· =∑6

i=1 Yij

6 − Y··

Residual estimate: εij = Yij − Yij = Yij − (µ+ Li + dj)

We can think of εij as the result of aligning the data for all of theeffects in the model, including the overall mean.

9 / 17

Page 10: Modeling Effects and Additive Two-Factor Models (i.e

Estimates for the Additive Model

10 / 17

Page 11: Modeling Effects and Additive Two-Factor Models (i.e

Estimates for the Additive Model

This model without interaction will provide a fit with parallel lines in theinteraction plot.

11 / 17

Page 12: Modeling Effects and Additive Two-Factor Models (i.e

Estimates for the Additive Model

Example (SAS two-factor additive model)

See handout on fitting two-factor additive model in SAS.

12 / 17

Page 13: Modeling Effects and Additive Two-Factor Models (i.e

Estimates for the Additive Model

Example (SAS two-factor additive model)

The other way to present the interaction plot.

13 / 17

Page 14: Modeling Effects and Additive Two-Factor Models (i.e

Two-factor CRD with Interaction

Example (Animal-fattening experiment)

Two primary factors: Vitamin B12 (0mg, 5mg) & Antibiotics (0mg, 40mg)

Three animals randomly assigned to each of 4 treatments. Response wasweight gain in lbs/week.

Because we can not assume that the two factors do not interact, weshould include interaction in the model.

G.W. Cobb (1998). Introduction to Design & Analysis of Experiments.14 / 17

Page 15: Modeling Effects and Additive Two-Factor Models (i.e

Two-factor CRD with Interaction

Example (Animal-fattening experiment)

This model will allow for a ‘separately fit’ mean for each treatment.

In other words, there will be no restrictions placed on the mean structure,such as coercion to the ‘best fitting’ parallel lines in the profile plot, aswith a main-effects only model.

Two-way ANOVA with interaction will be the next model we consider.

15 / 17

Page 16: Modeling Effects and Additive Two-Factor Models (i.e

Hierarchy of Terms in Factorials

A factorial model for data is called hierarchical if the presence of anyterm in the model implies the presence of all lower order terms.

As a general rule, if an interaction term is included in the model, thenall of its component parts should also be included.

If you include this interaction: then, also include:AB A,BABC A,B,C ,AB,AC ,BC

In our ANOVA tables, the lower-order terms will appear earlier (at thetop), but we will start the testing of terms at the bottom of the table,for higher-order interactions first. If the interaction for AB issignificant, then we will not test for the main effects of A and B asthose terms must remain in the model, regardless of significance.

16 / 17

Page 17: Modeling Effects and Additive Two-Factor Models (i.e

Plausibility of the Model

When we fit a model, we are probably using past experience orscientific knowledge to choose the model, and we’re makingassumptions about the data.

Before interpreting any results from the model fit, we should check tosee if the model is plausible (reasonable).

Usually, this is done by examining the residuals - the part of thevariations that the model can’t explain.

Things to consider:

Other possible effects that were not includedInteraction effectsAssumptions on the errors (e.g. εij

iid∼ N(0, σ2))

17 / 17