Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Experimental Statistics Spring 2006 - week 6 Chapter 15: Factorial Models (15.5)

Similar presentations


Presentation on theme: "1 Experimental Statistics Spring 2006 - week 6 Chapter 15: Factorial Models (15.5)"— Presentation transcript:

1 1 Experimental Statistics Spring 2006 - week 6 Chapter 15: Factorial Models (15.5)

2 2 STIMULUS EXAMPLE: Personal computer presents stimulus, and person responds. Study of how RESPONSE TIME is effected by a WARNING given prior to the stimulus: 2-factors of interest: Warning Type --- auditory or visual Time between warning and stimulus -- 5 sec, 10 sec, or 15 sec.

3 3.204.257.170.279.190.269.167.282.182.255.187.274.192.256.200.281.216.258 Auditory Visual 5 sec 10 sec 15 sec Warning Time Note: “Sort of like RCB” -- what is the difference? Question: How would you randomize? - 18 subjects - 1 subject

4 4 Observed data Level of Factor A Level of Factor B Replication (warning type) (time) (response time) Stimulus Data

5 5 Factor A Factor B 2-Factor ANOVA Data

6 6

7 7 A Possible Model for STIMULUS Data Note: so according to this model Note: The model assumes that the difference between types is the same for all times i = type, j = time

8 8 Auditory Visual 5 10 15 Hypothetical Cell Means

9 9 Similarly i.e. the model says the difference between times j and j' is the same for all types We may not want to make these assumptions!!

10 10 Auditory Visual 5 10 15 Hypothetical Cell Means Auditory Visual 5 10 15

11 11 Model for 2-factor Design where

12 12 Sum-of-Squares Breakdown (2-factor ANOVA) SSA SSB SSAB SSE

13 13 2-Factor ANOVA Table (2-Factor Completely Randomized Design) 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  See page 900

14 14 Hypotheses: Main Effects: Interactions:

15 15 data stimulus; input type$ time response; datalines; A 5.204 A 5.170 A 5.190 A 10.167 A 10.182 A 10.187 A 15.192 A 15.200 A 15.216 V 5.257 V 5.279 V 5.269 V 10.282 V 10.255 V 10.274 V 15.256 V 15.281 V 15.258 ; PROC GLM; CLASSES type time; MODEL response=type time type*time; means type/lsd; means time/lsd; TITLE ‘Stimulus Data'; run; Stimulus Data -- SAS

16 16 The GLM Procedure Dependent Variable: response Sum of Source DF Squares Mean Square F Value Pr > F Model 5 0.02837783 0.00567557 32.24 <.0001 Error 12 0.00211267 0.00017606 Corrected Total 17 0.03049050 R-Square Coeff Var Root MSE response Mean 0.930711 5.798365 0.013269 0.228833 Source DF Type I SS Mean Square F Value Pr > F type 1 0.02745606 0.02745606 155.95 <.0001 time 2 0.00026533 0.00013267 0.75 0.4917 type*time 2 0.00065644 0.00032822 1.86 0.1972 GLM Output

17 17 Testing Procedure 2 factor CRD Design Step 1. Test for interaction. Step 2. (a) IF there IS NOT a significant interaction - test the main effects (b) IF there IS a significant interaction - compare cell means

18 18 Stimulus Example Test for Interaction: Therefore we DO NOT reject the null hypothesis of no interaction.

19 19 Stimulus Data

20 20 Stimulus Example Test for Interaction: Therefore we DO NOT reject the null hypothesis of no interaction. Thus - based on the testing procedure, we next test for main effects.

21 Testing Main Effects: For each main effect (i.e. A and B) Note: I’ll use LSD from this point on unless otherwise noted. In General: where N denotes the # of observations involved in the computation of a marginal mean.

22 22 Auditory Visual 5 sec 10 sec 15 sec Warning Time.204.257.170.279.190.269.167.282.182.255.187.274.192.256.200.281.216.258

23 23 Stimulus Example Test for Main Effects: Thus, there is a significant effect due to type but not time A (type): B (time): - i.e. we can use LSD to compare marginal means for type - we will do this here for illustration although MC not needed when there are only 2 groups

24 24 The GLM Procedure t Tests (LSD) for response NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 12 Error Mean Square 0.000176 Critical Value of t 2.17881 Least Significant Difference 0.0136 Means with the same letter are not significantly different. t Grouping Mean N type A 0.267889 9 V B 0.189778 9 A GLM Output -- Comparing “Types”

25 25 The GLM Procedure t Tests (LSD) for response NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 12 Error Mean Square 0.000176 Critical Value of t 2.17881 Least Significant Difference 0.0167 Means with the same letter are not significantly different. t Grouping Mean N time A 0.233833 6 15 A A 0.228167 6 5 A A 0.224500 6 10 GLM Output -- Comparing “Times”

26 26

27 27

28 28 Pilot Plant Data Variable = Chemical Yield Factors:A – Temperature (160, 180) B – Catalyst (C1, C2) 160 C1 59 160 C1 61 160 C1 50 160 C1 58 180 C1 74 180 C1 70 180 C1 69 180 C1 67 160 C2 50 160 C2 54 160 C2 46 160 C2 44 180 C2 81 180 C2 85 180 C2 79 180 C2 81

29 29 Pilot Plant Data Variable = Chemical Yield Factors:A – Temperature (160, 180) B – Catalyst (C1, C2) 59 74 61 70 50 69 58 67 50 81 54 85 46 79 44 81 Catalyst Temperature

30 30

31 31

32 32 Pilot Plant -- Probability Plot of Residuals

33 33 DATA one; INPUT temp catalyst$ yield; datalines; 160 C1 59 160 C1 61. 180 C2 79 180 C2 81 ; PROC GLM; class temp catalyst; MODEL yield=temp catalyst temp*catalyst; Title 'Pilot Plant Example -- 2-way ANOVA'; MEANS temp catalyst/LSD; RUN; PROC SORT;BY temp catalyst; PROC MEANS; BY temp catalyst; OUTPUT OUT=cells MEAN=yield; RUN;

34 34 Pilot Plant Example -- 2-way ANOVA General Linear Models Procedure Dependent Variable: YIELD Sum of Mean Source DF Squares Square F Value Pr > F Model 3 2525.0000000 841.6666667 58.05 0.0001 Error 12 174.0000000 14.5000000 Corrected Total 15 2699.0000000 R-Square C.V. Root MSE YIELD Mean 0.935532 5.926672 3.8078866 64.250000 Source DF Type I SS Mean Square F Value Pr > F TEMP 1 2116.0000000 2116.0000000 145.93 0.0001 CATALYST 1 9.0000000 9.0000000 0.62 0.4461 TEMP*CATALYST 1 400.0000000 400.0000000 27.59 0.0002 Pilot Plant -- GLM Output

35 35 RECALL: Testing Procedure 2 factor CRD Design Step 1. Test for interaction. Step 2. (a) IF there IS NOT a significant interaction - test the main effects (b) IF there IS a significant interaction - compare cell means

36 36 Pilot Plant Example Test for Interaction: Therefore we reject the null hypothesis of no interaction - and conclude that there is an interaction between temperature and catalyst. Thus, we DO NOT test main effects

37 37

38 38

39 39 Since there is a significant interaction, we do not test for main effects! - instead compare “Cell Means” - NOTE: interaction plot is a plot of the cell means

40 40 Pilot Plant Data Variable = Chemical Yield Factors:A – Temperature (160, 180) B – Catalyst (C1, C2) 59 74 61 70 50 69 58 67 50 81 54 85 46 79 44 81 Catalyst Temperature

41 41 Pilot Plant Data -- cell means 57.0 70.0 48.5 81.5 Catalyst Temperature

42 Comparing Cell Means: If there is significant interaction, then we compare the a x b cell means using the criteria below. Procedure similar to that for comparing marginal means: where N denotes the # of observations involved in the computation of a cell mean.

43 43 The GLM Procedure t Tests (LSD) for yield NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 12 Error Mean Square 14.5 Critical Value of t 2.17881 Least Significant Difference 4.1483 Means with the same letter are not significantly different. t Grouping Mean N temp A 75.750 8 180 B 52.750 8 160 GLM Output -- Comparing “Temps” - disregard

44 44 The GLM Procedure t Tests (LSD) for yield NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 12 Error Mean Square 14.5 Critical Value of t 2.17881 Least Significant Difference 4.1483 Means with the same letter are not significantly different. t Grouping Mean N catalyst A 65.000 8 C2 A A 63.500 8 C1 GLM Output -- Comparing “Catalysts” - disregard

45 45 Note: - SAS does not provide a comparison of cell means

46 46 Pilot Plant Data -- cell means 57.0 70.0 48.5 81.5 CatalystCatalyst Temperature LSD: MSE = N = LSD = C2/160 C1/160 C1/180 C2/180 48.5 57.0 70.0 81.5

47 47 Testing Procedure Revisted 2 factor CRD Design Step 1. Test for interaction. Step 2. (a) IF there IS NOT a significant interaction - test the main effects (b) IF there IS a significant interaction - compare a x b cell means (by hand) Main Idea: We are trying to determine whether the factors effect the response either individually or collectively.


Download ppt "1 Experimental Statistics Spring 2006 - week 6 Chapter 15: Factorial Models (15.5)"

Similar presentations


Ads by Google