Oversigt Course 02429 Analysis of correlated data: Mixed Linear - - PowerPoint PPT Presentation

oversigt course 02429 analysis of correlated data mixed
SMART_READER_LITE
LIVE PREVIEW

Oversigt Course 02429 Analysis of correlated data: Mixed Linear - - PowerPoint PPT Presentation

Factors Oversigt Course 02429 Analysis of correlated data: Mixed Linear Models Factors 1 Module 2: Factor structure diagrams Different model notations 2 Crossed factors 3 Per Bruun Brockhoff Nested factors 4 DTU Compute Building 324 -


slide-1
SLIDE 1

Course 02429 Analysis of correlated data: Mixed Linear Models Module 2: Factor structure diagrams Per Bruun Brockhoff

DTU Compute Building 324 - room 220 Technical University of Denmark 2800 Lyngby – Denmark e-mail: perbb@dtu.dk

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 1 / 19 Factors

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 2 / 19 Factors

Factors, definition

Experimental units: 1, . . . , N. Observations Y1,. . . ,YN For the i’th experimental unit: Yi, where i = 1, . . . , N. A factor is a partitioning of the experimental units in a number of disjoint groups. The names of the groups are the factor levels. Example: The factor gender. Factor levels: male and female. 10 individuals, the first 5 are male and the last 5 are female: gender1 = male, . . . , gender5 = male, gender6 = female, . . . , gender10 = female.

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 3 / 19 Different model notations

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 4 / 19

slide-2
SLIDE 2

Different model notations

Model notations

The "usual" model expression: (for the "gender example") Yij = µ + αi + ǫij, j = 1, . . . , 5, i = 1, 2 A more general (and better) model expression: Yi = µ(genderi) + ǫi with the two mean value structure (fixed) parameters µ(male) and µ(female) . Or equivalently: Yi = µ + α(genderi) + ǫi With "quantitative elements" in a model, e.g. a classical regression model: Yi = α + β · xi + ǫi

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 5 / 19 Crossed factors

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 6 / 19 Crossed factors

Crossed factors

Let F and G be two factors in an experiment. The product factor, F × G: (F × G)i = (Fi, Gi) Used for interactions. Example: 6 vegetables were stored under different conditions.

Each combination of:

Two atmosphere conditions: normal or modified. Three temperature conditions: 5, 10 or 15 centigrades (celcius).

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 7 / 19 Crossed factors

Crossed factors, cont.

Two factors:

atm with 2 levels: norm and mod temp with 3 levels: 5, 10, 15.

The product factor atm × temp has six levels: (norm, 5), (norm, 10), (norm, 15), (mod, 5), (mod, 10), (mod, 15). Model expression (2-way ANOVA): EY = α(atm) + β(temp) + γ(atm × temp).

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 8 / 19

slide-3
SLIDE 3

Nested factors

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 9 / 19 Nested factors

Nested factors

F finer than G if the partitioning according to F’s levels is a sub-partitioning of the groups obtained by the partitioning according to G’s levels. Nested structure = hierarchical structure Example: 3 Repeated observations on 8 piglets from 2 different litters:

Litter=1 Litter=2 Pig=1 Pig=2 Pig=3 Pig=4 Pig=5 Pig=6 Pig=7 Pig=8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

The factor piglet is finer than the factor litter. The factor piglet is nested within the factor litter. The factor litter is coarser than the factor piglet. The litter effect is contained in the piglet effect. A product factor is always finer than each of the individual factors.

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 10 / 19 Balance

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 11 / 19 Balance

Balance

A factor is balanced, if there are the same number of experimental units for each level of the factor. If atm × temp is balanced, then atm and temp will be balanced. Balance of single factors can occur under less restrictive assumptions. Some possible pleasant consequences of (a certain degree of) balance are that:

ANOVA tables are unique. Estimates of fixed effects levels equal their raw means. Estimates of fixed effect levels do not change even though random effects are considered fixed. In many cases, tests for the significance of fixed and/or random effects in the mixed model become simple F-tests.

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 12 / 19

slide-4
SLIDE 4

The actual diagram

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 13 / 19 The actual diagram

The factor structure diagrams

Storage example:

5 vegetables in each of the 6 conditions 30 experimental units

Factors: atm, temp, atm × temp. Basic factors always present:

The constant factor called 0, where the factor level is 0 for all experimental units. The unit factor I that partitions each experimental unit into its own group consisting of only this one experimental unit.

Factors: 0, atm, temp, atm × temp, I. Corresponding to the model expression: Yi = µ + α(atmi) + β(tempi) + γ(atm × tempi) + ǫi, i = 1, . . . , 30,

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 14 / 19 The actual diagram

The factor structure diagrams

[I]24

30

atm × temp2

6

atm1

2

temp2

3

01

1

Shows all factors (model terms) Structure: Arrows from finer to coarser factors. Degrees of freedom: Lower indices – can be calculated easily.

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 15 / 19 The actual diagram

The factor structure diagrams in R

library(diagram) ## Creating the list of factor names with indices: names=c(expression("[I]"[24]^{30}),expression(atm:temp[2]^{6}), expression(atm[1]^{2}), expression(temp[2]^{3}),expression(0[1]^{1})) ## Since there are 5 factors create the 5x5 matrix of zeros: M <- matrix(nrow = 5, ncol = 5, byrow = TRUE, data = 0) ## Envision the structure: e.g. I need an arrow from my first ## name to my second name so assign something to M[2,1] etc: M[2, 1] <- M[3,2] <- M[4, 2] <- M[5,3] <- M[5,4] <- "." ## Make the diagram: plotmat(M, pos = c(1, 1, 2, 1), name = names, lwd = 2, box.lwd = 1, cex.txt = 1, box.size = 0.1, box.type = "square", box.prop = 0.5, arr.type="triangle",curve=0)

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 16 / 19

slide-5
SLIDE 5

The actual diagram

The factor structure diagrams in R

. . . . . [I]24

30

atm : temp2

6

atm1

2

temp2

3

01

1

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 17 / 19 Mixed models and the diagram

Oversigt

1

Factors

2

Different model notations

3

Crossed factors

4

Nested factors

5

Balance

6

The actual diagram

7

Mixed models and the diagram

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 18 / 19 Mixed models and the diagram

Random effects in diagrams

Illustrated by use of brackets. The unit(residual) factor is always random: [I]. The diagram tells us how to test the fixed effects in a mixed model (in "nice" cases): Error stratum: A Random effect "pointing at" a fixed effect should be used as the error term for inference about this fixed effect.

Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 2 Fall 2014 19 / 19