Download presentation
Presentation is loading. Please wait.
Published byLee Williamson Modified over 6 years ago
1
Overview of categorical by categorical interactions: Part I: Concepts, definitions, and shapes
Interactions in regression models occur when the association between one independent variable and the dependent variable DIFFERS depending on values of a second independent variable. The example we will trace in this series of lectures investigates whether the association between socioeconomic status and birth weight is the same for all racial/ethnic groups, where birth weight is our dependent variable (or outcome), and race and socioeconomic status are our independent variables (or predictors). Later in this lecture, I will mention a couple of other examples of questions that can be addressed using interaction specification in a regression model. Jane E. Miller, PhD
2
What is an interaction? The association between one independent variable (X1) and the dependent variable (Y) differs depending on the value of a second independent variable (X2). Can be thought of as an exception to a general pattern: X1 is associated with Y in one way when X2 = 1, but in a different way when X2 = 2. X1 is sometimes termed the “focal predictor” X2 is referred to as the “modifier” or “modifying variable.” In the most general terms, we say that an interaction occurs when the level or shape of an association between one IV and the DV differs depending on the value of a second IV. One way to think about this is that one IV (which we refer to as X1) is associated with the DV (called Y) in one way when a second IV (called X2 is equal to 1, than when that second IV =2. The association between X1 and Y could take on a different DIRECTION depending on the value of X2, or that association could vary in SIZE depending on the value of X2.
3
Statistical interactions defined
When X1 and X2 not only potentially have separate effects on Y, but also have a joint effect that is different from the simple sum of their respective individual effects. The association between X1and Y is conditional on X2. The specific combinations of values of X1 and X2 determine the value of Y. Put differently, an interaction occurs when two independent variables, X1 and X2 not only each have separate effects on Y, but [read slide]
4
Three general shapes of interaction patterns
Size: The effect of X1 on Y is larger for some values of X2 than for others; Direction: the effect of X1 on Y is positive for some values of X2 but negative for other values of X2; The effect of X1 on Y is non-zero (either positive or negative) for some values of X2 but is not statistically significantly different from zero for other values of X2. Interactions can occur in any of three broad types: The association between X1 and Y can differ In terms of size – e.g., larger for some values of X2 than for others. Direction – a positive association for some values of X2 and a negative association for others. Or a non-zero (positive or negative) association for some values of the modifying variable but a zero (or not stat sig) association for other values of the modifier. Now let’s look at an example of each in turn.
5
Synonyms for “interaction”
Terminology for interactions varies by discipline. Common synonyms include: Effects modification Moderating effect Modifying effect Joint effect Contingency effect Conditioning effect Heterogeneity of effects Before we go on to look at some illustrations of hypothetical interaction patterns, let me mention some synonyms for “interaction” that you might have encountered. One is “effects modification”, which as the term suggests, asks whether the effect of one IV (e.g., mother’s education) on the DV (birth weight) is modified by race. This type of pattern is sometimes termed an “elaboration paradigm”, meaning that the simple two way association between X and Y (e.g., education and birth weight) needs to be elaborated by taking into account a second IV (race), because no one pattern characterizes the education/birth weight association for all racial ethnic groups.
6
Specifying an interaction model
Multivariate regression specifications to test for interactions include a combination of “main effects terms” and “interaction terms.” We will go into more detail about how to specify a model with interactions in a later module, but first, let’s get acquainted with some terminology used for interactions, and learn how the various pieces are defined and specified.
7
Main-effects-only specification
A main-effects-only model implies that controlling for other covariates (xi), the effect of x1 on Y is the same for all values of x2, and the effect of X2 is the same for all values of X1. Its specification can be written: Y = β0 + β1X1 + β2X2, where x1 is the main effect term for the first independent variable (IV) x2 is the main effect term for a second IV
8
Example: Main-effects-only model
If Y is birth weight in grams X1 is dummy variable for <HS coded 1 for mothers with less than complete high school 0 for all other infants, the reference category X2 is a dummy variable for black race coded 1 for black infants 0 for white infants, the reference category Birth weight = β0 + β1<HS + β2Black implies that the shape of the education/birth weight association is the same for black as for white infants the education/birth weight (X1/Y) association is not modified by race Let’s apply these general concepts to a specific example. Our dependent variable, Y, is birth weight in grams Our first independent variable is family income in dollars Our second IV is a dummy variable for black race. Substituting those specific concepts into the equation, we get: This specification implies [read last bullet]
9
Education and race main effects only
Size of black/white birth weight gap is same in each education group. Black White BW (g.) This version has both a race main effect birth weight is higher for blacks and for whites at each education level; and an education main effect – birth weight increases w/ increasing mother’s education. birth weight levels increase with education for both races and the size and direction of the birth weight gap is the same within each education group, so there is no interaction between race and mother’s education. <HS =HS >HS Mother’s educational attainment
10
Interaction specification
A model with interactions implies that controlling for other covariates, the effect of x1 on Y is different for different values of X2. Y = β0 + β1X1 + β2X2 + β3X1 _ X2, where x1 is the main effect term for the focal IV in the interaction, x2 is the main effect term for the modifying IV, X1 _X2 is the interaction term between the focal and modifying IVs. A specification with main effects and interaction means that…
11
Interaction term The value of the interaction term variable is defined as the product of the two component variables: X1_ X2 = X1 × X2 When naming an interaction term variable, I often use an “_” to connect the names of the two component variables. E.g., <HS_black would be the interaction between the two variables “<HS” and “black.” E.g., for case #1, if <HS (X1) = 1 Black (X2) = 1 The interaction term <HS_black = 1 × 1 = 1 The way we implement this is to create a new variable, called an interaction term that is calculated as the product of the two component variables. e.g., the interaction term X1_X2 takes on the value X1 * X2 for each case. I often use the naming convention [read]
12
Contingency of coefficients in an interaction model
Y = β0 + β1X1 + β2X2 + β3X1 _ X2, Inclusion of the interaction term X1_ X2 means that the βis on the main effects terms X1 and X2 no longer apply to all values of X1 and X2. The main effects and interactions βis for X1 and X2 are contingent upon one another and cannot be considered separately. Once we include that interaction term X1_X2 in the model, the coefficients involving X1 and X2 can no longer be interpreted independently of one another. Another way to think about this is that the main effects coefficients for X1 and X2 no longer apply to all values of those variables, but rather must be interpreted for specific combinations of values of X1 and X2.
13
Implications for interpreting main effects and interaction coefficients
Y = β0 + β1X1 + β2X2 + β3X1_X2 In the interaction model: β1 estimates the effect of X1 on Y when X2 = 0, β2 estimates the effect of X2 on Y when X1 = 0, β3 must also be considered in order to calculate the shape of the overall pattern among X1, X2, and Y. E.g., when X1 and X2 take on other values. See podcast on calculating the shape of an interaction pattern. The implications of the interaction specification are [read rest of bullets] This will be explained in detail in the podcasts on calculating the overall shape of the interaction pattern from regression coefficients.
14
Example: Interaction model
BW = β1<HS + β2Black + β3<HS_black, If β3 is statistically significantly different from zero, the shape of the education/birth weight association is different for black than for white infants. β1 estimates the association between education and birth weight among whites (e.g., when Black = 0) β2 estimates the difference in birth weight for blacks compared to whites when <HS = 0 (e.g., for more educated mothers). β3 estimates how predicted birth weight deviates from the value implied by β1 and β2 alone, for different combinations of education and race. Applying these general concepts to our topic example, the equation for a model with main effects and interactions would read.
15
Education and race main effects, and interaction: Size of gap
Size of black/white birth weight gap varies across education groups. Black White BW (g.) In this version, we have both the main effects for race and education as in the previous chart, but this time the SIZE of the racial gap in birth weight varies across mother’s education categories, increasing as mother’s education increases. There is an interaction between race and mother’s education in their effect on birth weight. Put differently, at each education level, birth weight for whites exceeds that for blacks (race main effect), and for each race, birth weight increases with mother’s education (education main effect), but for blacks the rate of increase across education groups is much smaller than the corresponding increase for whites (interaction). Note that the heights of the three pink bars are pretty similar (increasing only slightly from L to R), whereas the three yellow bars increase substantially in height from L to R. The consequence is a widening racial gap in birth weight as mother’s education increases. This is one form of interaction. <HS =HS >HS Mother’s educational attainment
16
Possible patterns: Interaction between two categorical independent variables
Example: Race and mother’s education as predictors of birth weight Birth weight (BW) in grams is the dependent variable; The focal independent variable, mother’s educational attainment, is an ordinal categorical variable; The modifier, race, is a nominal independent variable. An interaction means that the association between mother’s education and birth weight differs by race . To see what an interaction “looks like”, let’s examine a specific research question: Does the association between race and birth weight differ by mother’s education,? Or, put differently, does the association between mother’s education and birth weight differ by race? In this example, birth weight in grams is the dependent variable; Mother’s educational attainment is a categorical (ordinal) independent variable. Race is a categorical (nominal) independent variable; it is the hypothesized MODIFIER, which Let’s take a look at some pictures to help you begin to see the range of hypothetical patterns that could characterize an association among three variables. Later, when we have estimated coefficients from a model based on actual data, we will compute and display the actual pattern in one observed population. The graphs will show how mean birth weight varies for all possible combinations of race (specified as non-Hispanic black compared to non-Hispanic white) and mother’s education (<complete HS, HS diploma but no higher, or >HS)
17
Race main effect, but no education main effect or interaction
Black White BW (g.) This graph has a cluster for each mother’s education level, organized in ascending order across the X-axis. The height of the bar is the mean birth weight for that group, with pink bars for non-Hispanic black infants and yellow bars for non-Hispanic white infants. In other words, typical of most charts, the dependent variable (birth weight) is shown on the Y or vertical axis, while the two independent variables are shown one on the X axis (the ordinal IV mother’s education) and the other (nominal IV, race) in the legend. In this version, we see that at every level of mother’s education, blacks weigh less at birth than their white counterparts. This is the race main effect. Mean birth weight for each racial group does not differ by mother’s educational attainment, so there is no education main effect, no interaction between race and education because the birth weight gap between black and white infants is the same direction and size for each of the three education groups. <HS =HS >HS Mother’s educational attainment
18
Education main effect, but no race main effect or interaction
Black White BW (g.) The basic layout of the variables on this graph is the same as on the preceding one, with mother’s education on the x-axis, race in the legend, and birth weight on the Y (vertical) axis. In this version, we see that birth weight increases with increasing mother’s education (a main effect of education) , but that mean birth weight is the same for blacks and whites within each mother’s education category. In other words, this graph shows: An education main effect NO race main effect NO race*education interaction, because the education pattern is the same in both direction and size for both racial groups. <HS =HS >HS Mother’s educational attainment
19
Education and race main effects, but no interaction
Size of black/white birth weight gap is same in each education group. Black White BW (g.) This version has both a race main effect birth weight is higher for blacks and for whites at each education level; and an education main effect – birth weight increases w/ increasing mother’s education. birth weight levels increase with education for both races and the size and direction of the birth weight gap is the same within each education group, so there is no interaction between race and mother’s education. <HS =HS >HS Mother’s educational attainment
20
Education and race main effects, and interaction: Size of gap
Size of black/white birth weight gap varies across education groups. Black White BW (g.) In this version, we have both the main effects for race and education as in the previous chart, but this time the SIZE of the racial gap in birth weight varies across mother’s education categories, increasing as mother’s education increases. There is an interaction between race and mother’s education in their effect on birth weight. Put differently, at each education level, birth weight for whites exceeds that for blacks (race main effect), and for each race, birth weight increases with mother’s education (education main effect), but for blacks the rate of increase across education groups is much smaller than the corresponding increase for whites (interaction). Note that the heights of the three pink bars are pretty similar (increasing only slightly from L to R), whereas the three yellow bars increase substantially in height from L to R. The consequence is a widening racial gap in birth weight as mother’s education increases. This is one form of interaction. <HS =HS >HS Mother’s educational attainment
21
Education and race main effects, and interaction: Direction of gap
Direction of black/white birth weight gap varies across education groups. Black White BW (g.) Black<white Black<white Black>white In this variant, we see that for both blacks and whites, birth weight increases as mother’s education increases. However, here birth weight for whites exceeds that for blacks in only the top two mother’s education categories, and the black/white difference in birth weight is larger for those in the >HS group than in the =HS group. In the <HS group, birth weight for blacks is higher than that for whites – the opposite direction as in the other two education groups. This is again the product of an interaction, but this time the difference is in terms of DIRECTION of association as well as magnitude of association. In other words, we cannot describe a direction of racial difference in birth weight that applies to all three education groups. <HS =HS >HS Mother’s educational attainment
22
Summary: Some possible patterns of race, education, and birth weight
BW BW BW <HS =HS >HS <HS =HS >HS <HS =HS >HS Main effect: education Main effects: race & education Main effect: race Black White My point here is NOT to show you actual patterns, but to push you to see some of the variety of possible patterns among three variables, considering hypothetical combinations of variation in both DIRECTION and SIZE of associations between these two IVs and a DV. There are many other possible combinations not shown here If you think that some of these patterns are implausible in the real world, bear with me. Although some of these patterns might not be observed for race, education, and birth weight in the U.S. today, they might well characterize patterns involving other times, places, or groups, or when we generalize the idea of an interaction to research questions involving other topics (and other categorical IVs and DV) BW BW <HS =HS >HS <HS =HS >HS Interaction: magnitude Interaction: direction & magnitude
23
Continue on to Part II Information on
Creating variables Specifying models Calculating overall shape of an interaction pattern from regression coefficients For a categorical by categorical interaction
24
Suggested resources Chapter 16, Miller, J. E The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Chapters 8 and 9 of Cohen et al Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, 3rd Edition. Florence, KY: Routledge.
25
Suggested exercises Study guide to The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. Problem set for chapter 16 Suggested course extensions for chapter 16
26
Contact information Jane E. Miller, PhD Online materials available at The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.