Presentation is loading. Please wait.

Presentation is loading. Please wait.

Experimental Statistics - week 8

Similar presentations


Presentation on theme: "Experimental Statistics - week 8"— Presentation transcript:

1 Experimental Statistics - week 8
Chapter 17: Models with Random Effects

2 Models with Random Effects
Fixed-Effects Models -- the models we’ve studied to this point -- factor levels have been specifically selected - investigator is interested in testing effects of these specific levels on the response variable Examples: -- CAR data - interested in performance of these 5 gasolines -- Pilot Plant data - interested in the specific temperatures (160o and o) and catalysts (C1 and C2)

3 Random-Effect Factor -- the factor has a large number of possible levels -- the levels used in the analysis are a random sample from the population of all possible levels - investigator wants to draw conclusions about the population from which these levels were chosen (not the specific levels themselves)

4 Fixed Effects vs Random Effects
This determination affects - the model - the hypothesis tested - the conclusions drawn - the F-tests involved (sometimes)

5 1-Factor Random Effects Model
Assumptions:

6 Hypotheses: Ho says (considering the variability of the yij’s) :
Ha: sa Ho says (considering the variability of the yij’s) : - the component of the variance due to “Factor” has zero variance -- i.e. no factor “level-to-level” variation - all of the variability observed is just unexplained subject-to-subject variation -- at least none is explained by variation due to the factor

7 DATA one; INPUT operator output; DATALINES; ; PROC GLM; CLASS operator; MODEL output=operator; RANDOM operator; TITLE ‘Operator Data: One Factor Random Effects Model'; RUN; These are data from an experiment studying the effect of four operators (chosen randomly) on the output of a particular machine. t = n =

8 One Factor Random effects Model
The GLM Procedure Dependent Variable: output Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE output Mean Source DF Type I SS Mean Square F Value Pr > F operator Source Type III Expected Mean Square operator Var(Error) + 4 Var(operator)

9 Conclusion: We reject Ho : sa2 = 0 (p = .0002) and we conclude that there is variability due to operator Note: Multiple comparisons are not used in random effects analyses -- we are interested in whether there is variability due to operator - not interested in which operators performed better, etc. (they were randomly chosen)

10 RECALL: 1-Factor (Fixed-Effects) ANOVA Table
(page 389) Rationale for F-test and critical region: estimates estimates + constant × - if no factor effects, we expect F ≈ 1; - if factor effects, we expect F > 1

11 Expected Mean Squares for 1-Factor ANOVA’s (p.979)
  EMS Source SS df MS Fixed Effects Random Effects Treatments SST t MST Error SSE t(n - 1) MSE   Total TSS tn - 1 Rationale for Test Statistic and Critical Region is the Same: Fixed or Random

12 DATA one; INPUT operator output; DATALINES; ; PROC GLM; CLASS operator; MODEL output=operator; RANDOM operator; TITLE ‘Operator Data: One Factor Random Effects Model'; RUN; These are data from an experiment studying the effect of four operators (chosen randomly) on the output of a particular machine.

13 One Factor Random effects Model
The GLM Procedure Dependent Variable: output Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE output Mean Source DF Type I SS Mean Square F Value Pr > F operator Source Type III Expected Mean Square operator Var(Error) + 4 Var(operator)

14 Estimating Variance Components
Solving for sa2 we get: so, we estimate sa2 by Also,

15 For OPERATOR Data,

16 RECALL: 2-Factor Fixed-Effects Model
where

17 Expected Mean Squares for 2-Factor ANOVA with Fixed Effects:
Expected MS F-test A MSA/MSE B MSB/MSE AB MSAB/MSE Error

18 2-Factor Random Effects Model
Assumptions: Sum-of-Squares obtained as in Fixed-Effects case

19 Expected Mean Squares for 2-Factor ANOVA with Random Effects:
Expected MS A B AB Error

20 To Test: we use F = we use F = we use F = Note: Test each of these 3 hypotheses (no matter whether Ho:sab2 = 0 is rejected)

21 2-Factor Random Effects ANOVA Table
Source SS df MS F Main Effects A SSA a - 1 B SSB b- 1 Interaction AB SSAB (a - 1)(b- 1) Error SSE ab(n - 1)   Total TSS abn - 1

22 Estimating Variance Components 2-Factor Random Effects Model
(note error on page 986)

23 Filtration Process: Response - % material lost through filtration
DATA one; INPUT operator filter loss; DATALINES; . ; PROC GLM; CLASS operator filter; MODEL loss=operator filter operator*filter; TITLE ‘2-Factor Random Effects Model'; RANDOM operator filter operator*filter/test; RUN; Filtration Process: Response - % material lost through filtration A – Operator (randomly selected) (a = ) B – Filter (randomly selected) (b = ) n = Operator Filter

24 SAS Random-Effects Output
(Filtration Data) 2-Factor Random Effects Model General Linear Models Procedure Dependent Variable: LOSS Sum of Mean Source DF Squares Square F Value Pr > F Model Error Corrected Total R-Square C.V Root MSE LOSS Mean Source DF Type III SS Mean Square F Value Pr > F OPERATOR FILTER OPERATOR*FILTER Source Type III Expected Mean Square OPERATOR Var(Error) + 3 Var(OPERATOR*FILTER) + 9 Var(OPERATOR) FILTER Var(Error) + 3 Var(OPERATOR*FILTER) + 12 Var(FILTER) OPERATOR*FILTER Var(Error) + 3 Var(OPERATOR*FILTER)

25 SAS Random-Effects Output – continued
“../test” option Tests of Hypotheses for Random Model Analysis of Variance Dependent Variable: LOSS Source: OPERATOR Error: MS(OPERATOR*FILTER) Denominator Denominator DF Type III MS DF MS F Value Pr > F Source: FILTER Source: OPERATOR*FILTER Error: MS(Error)

26 Filtration Problem Results and Conclusions

27 Variable 1: Active Ingredient (in mg/mL) at End of Storage Period
Table Factor ANOVA - Ex 15.41, page mg/mL Data The GLM Procedure Dependent Variable: mgml Sum of Source DF Squares Mean Square F Value Pr > F Model <.0001 Error Corrected Total R-Square Coeff Var Root MSE mgml Mean Source DF Type III SS Mean Square F Value Pr > F time <.0001 lab <.0001 time*lab

28 Table 3. Calculations for LSD comparisons of mg/mL Cell Means
T3L1 T1L1 T1L2 T6L1 T3L2 T9L1 T6L2 T9L2 Comparison Actual Difference (lsd = .086) T3L1 vs T9L T3L1 vs T6L T3L1 vs T9L T3L1 vs T3L T3l1 vs T6L T3L1 vs T1L T3L1 vs T1L X T1L1 vs T9L T1L1 vs T6L T1L1 vs T9L T1L1 vs T3L T1L1 vs T6L X T1L2 vs T9L T1L2 vs T6L T1L2 vs T9L T1L2 vs T3L T6L1 vs T9L T6L1 vs T6L T6L1 vs T9L T6L1 vs T3L T3L2 vs T9L T3L2 vs T6L T3L2 vs T9L T9L1 vs T9L X

29 T3L1 T1L1 T1L2 T6L1 T3L2 T9L1 T6L2 T9L2

30 2-Factor Mixed Effects Model
random fixed Assumptions: Sum-of-Squares obtained as before

31 Expected Mean Squares for 2-Factor ANOVA with Mixed Effects:
Expected MS A (fixed) (random) B AB Error

32

33 Expected Mean Squares for 2-Factor ANOVA with Mixed Effects:
SAS Expected MS Book’s Expected MS A (fixed) (random) B AB Error

34 Mixed-Effects Model To Test:
use F = SAS uses F = use F = Again: Test each of these 3 hypotheses as in random-effects case.

35 2-Factor Mixed-Effects ANOVA Table (using SAS Expected MS)
Source SS df MS F Main Effects A SSA a - 1 B SSB b- 1 Interaction AB SSAB (a - 1)(b- 1) Error SSE ab(n - 1)   Total TSS abn - 1

36 Estimating Variance Components 2-Factor Mixed-Effects Model
(based on SAS Expected MS) Note: A is a fixed effect

37 Response – fatigue of mechanical part
(F)ull Military Inspect. (R)educed Military Inspect. Product Inspection (C)ommercial Response – fatigue of mechanical part A – type of inspection (a = ) B – inspector (randomly selected) (b = ) n = Inspector

38 Mixed-Effects Data DATA one; INPUT insp$ level$ fatigue; DATALINES;
. 2 C 5.68 3 C 6.21 3 C 5.66 3 C 5.36 3 C 5.90 3 C 6.12 ; PROC GLM; CLASS insp level; MODEL fatigue= level insp level*insp; TITLE 'Mixed-Effects Model'; RANDOM insp level*insp/test; RUN; PROC MEANS mean var; CLASS level; VAR fatigue;

39 SAS Mixed-Effects Output
Mixed-Effects Model The GLM Procedure Dependent Variable: fatigue Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE fatigue Mean Source DF Type III SS Mean Square F Value Pr > F level insp insp*level

40 SAS Mixed-Effects Output - Continued
Mixed-Effects Model The GLM Procedure Source Type III Expected Mean Square level Var(Error) + 5 Var(insp*level) + Q(level) insp Var(Error) + 5 Var(insp*level) + 15 Var(insp) insp*level Var(Error) + 5 Var(insp*level) Tests of Hypotheses for Mixed Model Analysis of Variance Dependent Variable: fatigue Source DF Type III SS Mean Square F Value Pr > F level insp Error Error: MS(insp*level) insp*level Error: MS(Error)

41 Multiple Comparisons for Fixed Effect (Inspection Level)
-- Use MSAB in place of MSE where ▪ N denotes the # of observations involved in the computation of a marginal mean ▪ v denotes the df associated with AB interaction

42 SAS Mixed-Effects Output –
Output from PROC Means The MEANS Procedure Analysis Variable : fatigue N level Obs Mean Variance ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ C F R

43 Mixed-Effects Example Results and Conclusions:


Download ppt "Experimental Statistics - week 8"

Similar presentations


Ads by Google