1 / 25

Jane E. Miller, PhD

Calculating interaction effects from OLS coefficients: Interaction between two categorical independent variables. Jane E. Miller, PhD. Overview. General equation for a model with main effects and interactions Review: Coding of main effects and interaction terms

bayard
Télécharger la présentation

Jane E. Miller, PhD

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Calculating interaction effects from OLS coefficients:Interaction between two categorical independent variables Jane E. Miller, PhD

  2. Overview • General equation for a model with main effects and interactions • Review: Coding of main effects and interaction terms • Solving for the interaction pattern based on estimated coefficients • Graphical depiction of the interaction pattern

  3. Estimated coefficients Reference category: Non-Hispanic whites with >HS education. All variables are dummy-coded: 1 = named value, 0 = other values.

  4. Interpreting the main effects • The main effect terms estimate the difference in birth weight relative to those in the reference category (non-Hispanic whites with more than complete high school education). • βNHBis an estimate of the difference in intercept between non-Hispanic black infants and those in the reference category. • β<HS andβ=HS estimate the difference in intercept between infants in the reference category and those born to mothers with less than complete high school and complete high school, respectively. • Units are those of the dependent variable, grams.

  5. Interpreting the interaction between race and education • The race_education interaction tests whether the difference in birth weight for <HS versus =HS is different for non-Hispanic black infants than for their non-Hispanic white counterparts. • We calculate the overall effect for NHB and <HS as = βNHB+ β<HS+ βNHB_<HS • If the difference in birth weight across mothers’ education categories were the same for blacks as for whites, then the interaction term βNHB_<HS= 0.

  6. Calculating overall effect of interaction for specific case characteristics • The general equation to calculate how a case differs from the reference category: • main effects coefficients • interaction term coefficients • values of the independent variables = (βNHB × NHB) + (β<HS × <HS)+ (β=HS× =HS)+ (βNHB_<HS× NHB_<HS) +(βNHB_=HS×NHB_=HS) • To see which βspertain to which cases, fill in values of variables for different combinations of race and education.

  7. Review: Coding of main effects and interaction term variables Reference category

  8. Cases in the reference category for both independent variables General equation to calculate how a case differs from the reference category: = (βNHB × NHB) + (β<HS × <HS)+ (β=HS× =HS)+ (βNHB_<HS× NHB_<HS) +(βNHB_=HS× NHB_=HS) Fill in values of variables for non-Hispanic whites with >HS: = (βNHB × 0)+ (β<HS× 0)+ (β=HS× 0)+ (βNHB_<HS× 0)+ (βNHB_=HS× 0)= 0

  9. Cases in the reference category for both independent variables • All of the coefficients fall out of the equation for non-Hispanic whites born to mothers with >HS because each β is multiplied by a value of 0. • Thus, cases in the reference category for both race and education have a calculated overall effect of 0. • As it should be, because there is no difference between them and themselves! = (βNHB × 0)+ (β<HS× 0)+ (β=HS× 0)+ (βNHB_<HS× 0)+ (βNHB_=HS× 0)= 0

  10. Cases in the reference categoryfor 1 but not both independentvariables Fill values of variables for non-Hispanic whites with =HS into the general equation: = (βNHB × 0)+ (β<HS× 0)+ (β=HS× 1)+ (βNHB_<HS× 0)+ (βNHB_=HS× 0)=β=HS The equation for non-Hispanic white infants born to mothers with a high school diploma collapses to include only β=HSbecause all of the other coefficients are multiplied by a value of 0.

  11. Cases not in the reference category for eitherindependentvariable Fill in values of variables for non-Hispanic blacks with =HS: = (βNHB × 1)+ (β<HS× 0)+ (β=HS× 1)+ (βNHB_<HS× 0)+ (βNHB_=HS× 1) =βNHB +β=HS + βNHB_=HS Thus, the equation for non-Hispanic black infants born to mothers with a high school diploma collapses to include the main effects terms for bothβNHB andβ=HSand the interaction term βNHB_=HS. All the other βsfall out because they are multiplied by 0.

  12. Equations to calculate overall effect Difference in birth weight (grams) compared to infants born to non-Hispanic white women with more than a high school education = reference category.

  13. Interpreting the sign of the interaction terms: NHB_<HS • βNHB_<HS = –39, meaning that infants in that group have lower estimated birth weight than would be predicted from their race and mother’s education alone, based on the main effects (βNHB+ β<HS) • All three βs (both main effects and interaction) have negative signs, meaning that they cumulate to a large deficit in birth weight for NHB <HS. • The β on the interaction term reinforces (adds to) the predicted deficit based on race and education alone.

  14. Calculating overall effect for non-Hispanic blacks with <HS education βNHB = –168 β<HS = –54 βNHB_<HS = –39 = βNHB + β<HS + βNHB_<HS = (–168) + (–54) + (–39) = –261 –39 –54 –168 Compared to infants born to non-Hispanic white women with more than a high school education = reference category.

  15. Interpreting the sign of the interaction term: NHB_=HS • On the other hand, βNHB_=HS = +18, meaning that infants in that group have higherestimated birth weight than would be predicted from their race and mother’s education alone, based on the main effects (βNHB andβ=HS). • Both main effects terms have negative signs, but the interaction term has a positive (opposite) sign, so it partially offsets the deficit in birth weight predicted based on race and education alone.

  16. Calculating overall effect for non-Hispanic blacks with =HS education βNHB = –168 β=HS = –62 Note that interaction term has the OPPOSITE SIGN of the two main effects, partially offsetting their two negative effects on birth weight with a positive effect. βNHB_=HS = +18 = βNHB + β=HS + βNHB_=HS = (–168) + (–62) + (+18) = –212 +18 –62 –168 Compared to infants born to non-Hispanic white women with more than a high school education = reference category.

  17. Overall effects of race and mother’s education on birth weight = -261 Solid = main effect term. Striped = interaction of education level w/ NHB. Compared to non-Hispanic whites with >HS education.

  18. Predicted value and the intercept term • The intercept (or “constant”) term estimates the value of the dependent variable Y for cases in the reference category. • To calculate the predicted value of Y for each combination of the Xi, • add the estimated coefficient for the intercept (β0) to the βs for each variable that pertains to the category of interest.

  19. Examples: Predicted value • For instance, β0 = 3,042.8. • So infants who are in the reference category for all variables are estimated to weigh 3,042.8 grams. • This includes non-Hispanic whites born to women with >HS. • Reference category for race and mother’s education • Those born to Mexican American women with less than a high school education: • β0 +βMA+ β<HS + βMA_<HS = 3,042.8 + (–104.2) + (–54.2) + 99.4 = 3,039.8 – 59.0 =2,983.8 grams. 

  20. Use a spreadsheet to calculate and graph the interaction • Spreadsheets can • Store • The estimated coefficients • The input values of the independent variables • The correct generalized formula to calculate the predicted values for many combinations of the IVs involved in the interaction • Graph the overall pattern • See spreadsheet template and podcast

  21. Summary • Calculating the overall shape of an interaction pattern requires adding together the pertinent main effects and interaction term coefficients for each possible combination of the two categorical IVs in the interaction. • A spreadsheet can be helpful for storing and organizing the coefficients and formulas. • Depending on the respective signs of those βs, the interaction can either amplify or dampen the main effects on the component variables.

  22. Suggested resources • Chapter 16 of Miller, J.E. 2013. The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. • Chapters 8 and 9 of Cohen et al. 2003. Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, 3rd Edition. Florence, KY: Routledge.

  23. Supplemental online resources • Podcast on creating interaction term variables • Spreadsheet template for calculating overall effect of an interaction between two categorical variables.

  24. Suggested practice exercises • Study guide to The Chicago Guide to Writing about Multivariate Analysis, 2nd Edition. • Questions #3 and 5 in the problem set for Chapter 16 • Suggested course extensions for Chapter 16 • “Applying statistics and writing” exercise #1.

  25. Contact information Jane E. Miller, PhD jmiller@ifh.rutgers.edu Online materials available at http://press.uchicago.edu/books/miller/multivariate/index.html

More Related