1 / 11

Plotting Complex Models

Plotting Complex Models. Interpreting 1 st order terms w/ & w/o interactions Coding & centering… gotta? oughta? Plotting complex main effects models Plotting complex models with interactions Oh – that’s why to dummy code & re-center…. Very important things to remember…

jimbo
Download Presentation

Plotting Complex Models

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. Plotting Complex Models • Interpreting 1st order terms w/ & w/o interactions • Coding & centering… gotta? oughta? • Plotting complex main effects models • Plotting complex models with interactions • Oh – that’s why to dummy code & re-center…

  2. Very important things to remember… • All 1st order predictor regression weights have the same interpretation… • The expected direction and extent of change in Y for a 1-unit increase in X1 after controlling for the other variable(s) in the model at the value 0 • If that 1st order predictor is not involved in a higher-order effect (interaction), then the regression weight is interpreted as a main or unconditional effect - not being part of an interaction, the effect of that variable is the same for all values of all other variables. • If that 1st order predictor is involved in a higher-order effect, then the regression weight is interpreted as a conditional effect when the other variable(s) involved in the interaction = 0 – being part of an interaction, the effect is different for different values of those other variable(s) & the interaction weight describes the direction and extent of those differences

  3. Coding & Transforming predictors for MR models • Categorical predictors will be converted to dummy codes • Quantitative predictors will be centered, usually to the mean Is this absolutely necessary? Not usually… Many sources, and nearly all older ones, used unit-coded & un-centered predictors and their multiplicative combinations. Much of the time it works just fine… So, why is dummy-coding and centering a good idea? Mathematically – 0s (as control group & mean) simplify the math & minimize collinearity complications Interpretively – the “controlling for” included in multiple regression weight interpretations is really “controlling for all other variables in the model at the value 0” – “0” as the comparison group & mean will make b interpretations simpler and more meaningful

  4. Plotting Complex Main Effects Models Sometimes we have a model with more than 2 predictors, and sometimes we want to plot these more complex models. There is only so much that can be put into a single plot and reasonably hope the reader will be able to understand it. Remember, with main effects models (with no interactions), all lines are parallel!!! So, our plots are a series of lines, each for a different combination of variable groups/values. The most common version of these plots is to show how 2 variables relate to the criterion, for a given set of values for the other variables (usually their mean) Here’s an example!

  5. So, we have this model… perf’ = b1age + b2mar1 + b3mar2 + b4sex + b5exp + a • age & exp(erience) are centered quantitative variables • sex is dummy coded 0 = male 1 = female • mar(ital status) is dummy coded • mar1 single = 1 mar2 divorced = 1 married = 0 • To plot this we have to decide what we want to show, say… • How are experience & marital status related to performance for 25-year-old females? • All we do is fill in the values of the “selection variables” and simplify the formula to end up with a plotting function for each regression line… • For this plot: • performance (the criterion) is on the Y axis • experience (a quantitative predictor) is on the X axis • we’ll have 3 regression lines, one each for single, married & divorced

  6. How are experience & marital status related to perf for 25-year-old females? perf’ = b1age + b2mar1 + b3mar2 + b4sex + b5exp + a • sex 0 = male 1 = female • mar mar1 single = 1 mar2 divorced = 1 married = 0 For married  perf’ = b1*25 + b2*0 + b3*0 + b4*1 + b5exp + a we plotperf’ = b5exp + ( b4 + b1*25 + a) height slope For singles  perf’ = b1*25 + b2*1 + b3*0 + b4*1 + b5exp + a we plot perf’ = b5exp + (b2 + b4 + b1*25 + a) height slope For divorced  perf’ = b1*25 + b2*0 + b3*1 + b4*1 + b5exp + a we plot perf’ = b5exp + (b3 + b4+ b1*25 + a) height slope

  7. How are experience & marital status related to perf for 25-year-old females? perf’ = b1age + b2mar1 + b3mar2 + b4sex + b5exp + a • sex 0 = male 1 = female • mar mar1 single = 1 mar2 divorced = 1 married = 0 Let’s look at the plotting formulas again For married  perf’ = b5exp + ( b4 + b1*25 + a) For singles  perf’ = b5exp + (b2 + b4 + b1*25 + a) For divorced  perf’ = b5exp + (b3 + b4+ b1*25 + a) Notice that each group’s regression line has the same slope (b5), because there is no interaction. The difference between the group’s regression lines are their height – which differ based on the relationship between marital status and perf !!!

  8. Plotting Complex Models with Interactions • As mentioned earlier, most ANOVA & multiple regression models were originally designed to be used with experimental designs. However, most models are currently used with non-experimental data, and so, most have more than 2 predictors! • So, what do you do if you’ve got a model with a mix of variables, including an interaction, and want to see what it looks like. • To apply the model we’ve just looked at, you have to make two decisions: • select the binary & quant variable you want to plot • Specify the values of the other variables that define your target population (you can make multiple plots to cover the different populations you want to describe)

  9. So, we have this model… perf’ = b1age + b2mar + b3sex + b4exp + b5sex_exp + a • age, exp(erience) & mar(ried #years) are centered quantitative variables • sex is dummy coded 0 = male 1 = female • mar(ital status) is dummy coded • mar1 single = 1 mar2 divorced = 1 married = 0 • To plot this we have to decide what we want to show, say… • How are experience, sex & their interaction related to performance for 25-year-olds that have been married for 2 years?? • All we do is fill in the values of the “selection variables” and simplify the formula to end up with a plotting function for each regression line… • For this plot: • performance (the criterion) is on the Y axis • experience (a quantitative predictor) is on the X axis • we’ll have 2 regression lines, one each for males & females

  10. How are experience, sex & their interaction related to performance for 25-year-olds who have been married for 2 years? sex 0 = male 1 = female perf’ = b4exp + b5sex_exp + b3sex + b1age + b2mar + a perf’ = (b4 + b5sex)exp + (b3sex + b1age + b2mar + a) Males  perf’ = (b4+ b5*0)exp + (b3*0 + b1*25 + b2*2 + + a) we plotperf’ = b4exp + ( b1*25 + b2*2 + a) height slope Females  perf’ = (b4 + b5*1)exp + (b3*1 + b1*25 + b2*2 + a) we plotperf’ = (b4 +b5)exp + ( b3 + b1*25 + b2 + a) height slope

  11. But, here’s what cool about using re-centered quant variables… • If we re-center the quant variables to the population value we care about (25 year olds who have been married for 2 years), then the value we plug into the formula would be “0” and those terms are simplified leaving… • Males  perf’ = b4exp + ( b1*0 + b2*0 + a) • = b4exp + + a • Females  perf’ = (b4 +b5)exp + ( b3 + b1*0 + b2*0 + a) • perf’ = (b4 +b5)exp + ( b3 + a) • In other words, if we re-center the quant “control variables” to the desired population values=0, the plot of “the interaction at the combination of control values” requires only plotting the main effects and the interaction!!! This greatly simplifies plotting!!

More Related