Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analyzing Continuous and Categorical IVs Simultaneously Analysis of Covariance.

Similar presentations


Presentation on theme: "Analyzing Continuous and Categorical IVs Simultaneously Analysis of Covariance."— Presentation transcript:

1 Analyzing Continuous and Categorical IVs Simultaneously Analysis of Covariance

2 Skill Set When we model a single categorical and a single continuous variable, what do the main effects look like? What do the interactions look like? What is the meaning of each of the three b weights in such models? What is the sequence of tests used to analyze such data? Why should we avoid dichotomizing continuous IVs? What is the difference between ordinal and disordinal interactions? Why do we test for regions of significance of the difference between regression lines when we have an interaction?

3 Mixed IVs Simplest example has 2 IVs 1 IV is categorical (e.g., Male, Female) 1 IV is continuous (e.g., MAT score) –Keats:Shelly::Byron:Harley-Davidson DV is continuous, e.g., GPA in law school Have used ANOVA for categorical and Regression for continuous Both are part of GLM. Many people call mixing categorical and continuous vbls Analysis of Covariance (ANCOVA).

4 Example Data Note that there are 40 people here. Effect coding (1, -1) has been used to identify males vs. females. Doesn’t matter which is which (-1, 1) for coding purposes.

5 Example Data Graph What is the main story here?

6 Group vs. Common Regression Coefficient Can have 1 common slope, b c. Can have 2 group slopes, b F and b M. Common slope is weighted average of group slopes: Weight by SS X (here, MAT scores) for each group. Weight comes from variability in X and number of people in group.

7 Telling the Story With Graphs (1) Why is there nothing to tell here?

8 Telling the Story (2) How does the graph tell us which variable is important?

9 Telling the Story (3) What stories are being told in each of these graphs? When the story is obvious, the graph tells it. But we need statistical tests when the results are not obvious, and when we want to persuade others (publish).

10 Testing Sequence (1) Construct vectors X, G and XG. –X is continuous –G is group (categorical) –XG is the product of the two. Just mult. Intercept for common group is a. Note three b weights. First tells difference in groups. Second is common slope. Third is interaction (difference in group slopes). Two common terms, two difference terms.

11 Testing Sequence (2) Estimate 3 slopes (and intercept). Examine R 2 for model. If n.s., no story; quit. If R 2 sig and large enough: Examine b 3. If sig, there is an interaction. If sig, estimate separate regressions for different groups. If b 3 is not sig, re-estimate model without XG. Examine b 1 and b 2.

12 Testing Sequence (3) The significance of the b weights tells the importance of the variables. Is b 1 significant? (G, categorical) Is b 2 significant? (X, cont) YesNo YesParallel slopes, different intercepts Identical regressions NoMean diffs only; slopes are zero Only possible with severe confounding; ambiguous story.

13 Test Illustration (1) R 2 =.44; p <.05 Y' = -.0389+.75G+.0673X-.0146GX TermEstimateSEt G (b1; Sex).75.68561.0567 X (b2; MAT).0673.01254.9786* GX (b3; Int)-.0146.0135-1.0831 Step 1. R 2 is large & sig. Step 2. Slope for interaction (b 3 ) is N.S. (low power test) Step 3. Drop GX and re-estimate.

14 Test Illustration (2) R 2 =.42; p <.05 Y' =.1154+.0045G+.0687X TermEstimateSEt G (b1; Sex).0045.0833.1365 X (b2; MAT).0687.01355.0937* Step 4. Examine slopes (b weights). The only significant slope is for MAT. Conclusion: Identical regressions for Males and Females. The slight difference in lines is due to sampling error.

15 Second Illustration (1) Suppose our data look like these. What story do you think they tell?

16 Second Illustration (2) R 2 =.72; p <.05 Y' = -11.54+.8268G+.0643X-.0117GX TermEstimateSEtp G (b1; Sex).8268.66271.2476.22 X (b2; MAT).0643.01314.2947.0001 GX (b3; Int)-.0117.0131-.8945.3770 1.Is there any story to tell? 2.Is there an interaction? R 2 =.72; p <.05 Y' = -.1805+.2346G+.0655X TermEstimateSEtp G (b1; Sex).2346.03207.34.0001 X (b2; MAT).0655.01305.05.0001 What is the story? Does it agree with the graph?

17 More Complex Designs With more complex designs, logic and sequence of tests remain the same. Categorical vbls may have more than 2 levels We may have several continuous IVs If multiple categories, create multiple (G-1) interaction terms. If multiple Xs, create products for each. Test the terms as a block using hierarchical regression :

18 Categorizing Continuous IVs The median split (e.g., personality, stress, BEM sex-role scales). Don’t do this because: –Loss of power and information – treat IQs of 100 and 140 as identical. –Loss of replication (median changes by sample) –Arbitrary value of split - “high stress” group may not be very stressed Some throw out middle people – also a problem because of range enhancement bias.

19 Interactions Some research is aimed squarely at interactions, e.g., Aptitude Treatment Interaction (ATI) research. Learning styles, etc. Types of Interactions: No interactionOrdinal Interaction Disordinal Interaction Implications?

20 Regions of Significance With a disordinal interaction, there must be a place where the treatments are equal (where the lines cross). The crossover is found by (a1-a2)/(b2-b1) or (4-1.5)/(.8-.3) = 2.5/.5 =5, just where it appears to be on the graph. Some places on X give equivalent effects. Other places show a benefit to one treatment or the other.

21 Simultaneous Regions of Significance F is the tabled value. N is n 1 +n 2 = total people.

22 Disordinal Example (1) Hypothetical experiment in teaching Research Methods. Learning style – high scores indicate preference for spoken instruction. Two instruction methods – graphics intensive and spoken intensive. N=40. X = learning style questionnaire score. G = method of instruction. DV is in-class test score.

23 Disordinal Example (2) RY (Test) X (Learn Style) G (Lect v. tutor) GX (Int) Y1 X.221 G-.09.031 GX.35.02.881 M73.827.780.43 SD15.0615.141.0131.94 SourceDfSSMS F Model38035.69 2678.56 119.53 Error36806.70 22.41 C Total398842.40 R 2 =.91 VariableEstimateSEtp Int67.09 G-26.991.58-17.09.0001 X.227.054.54.0001 GX.917.0518.33.0001

24 Disordinal Example (3) n1=20YX G=1 Y1R X.951 M72.428.2 SD18.4315.26 SourceDfSS G=1 Model15805.09 Error18651.71 C Total196456.80 R 2 =.90 VariableEstimateSEtp Int40.102.8813.9.0001 X1.15.0912.66.0001 Group 1 data

25 Disordinal Example (4) n2=20YX G=-1 Y1R X-.971 M75.227.35 SD11.0215.41 Group 2 data SourcedfSS G=-1 Model12152.21 Error18154.99 C Total192307.20 R 2 =.93 VariableEstimateSEtP Int94.091.3669.03.0001 X-.69.04-15.81.0001

26 Disordinal Example (5) Therefore, the regression will all terms included is: Y'=67.09 - 26.99G +.23X +.92GX The regression for the 1 group is: Y'=40.1 + 1.15X The regression for the -1 group is: Y'= 94.09 -.69X. To find the crossover point, we find (a1-a2)/(b2-b1) which, in our case is (94.09-40.1)/(1.15+.69) = 29.34. N=40n1=20n2=20Group1 = 1 Group2 = -1 F.05(2,36) =3.26SS res(tot) = 806.70 SS res(1) = 651.71SS res(2) = 154.99 Note: SS res(tot) = SS res(1) + + SS res(2) =4424.48SD=15.26, SS =SD 2 *(N-1) =4511.89SD=15.41, SS=15.41*15.4 1*19 =28.2From corrs =27.35From corrs a1=40.10b1=1.15a2=94.09b2=-.69

27 Disordinal Example (6) Lower27.26 Middle29.34 Upper31.48 Therefore, our estimates are:

28 Disordinal Example (7) N.S. Region


Download ppt "Analyzing Continuous and Categorical IVs Simultaneously Analysis of Covariance."

Similar presentations


Ads by Google