1 / 16

Stat 112: Lecture 19 Notes

Stat 112: Lecture 19 Notes. Chapter 7.2: Interaction Variables Thursday: Paragraph on Project Due. Interaction. Interaction is a three-variable concept. One of these is the response variable (Y) and the other two are explanatory variables (X 1 and X 2 ).

ezra-wynn
Download Presentation

Stat 112: Lecture 19 Notes

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. Stat 112: Lecture 19 Notes • Chapter 7.2: Interaction Variables • Thursday: Paragraph on Project Due

  2. Interaction • Interaction is a three-variable concept. One of these is the response variable (Y) and the other two are explanatory variables (X1 and X2). • There is an interaction between X1 and X2 if the impact of an increase in X2 on Y depends on the level of X1. • To incorporate interaction in multiple regression model, we add the explanatory variable . There is evidence of an interaction if the coefficient on is significant (t-test has p-value < .05).

  3. Interaction variables in JMP • To add an interaction variable in Fit Model in JMP, add the usual explanatory variables first, then highlight in the Select Columns box and in the Construct Model Effects Box. Then click Cross in the Construct Model Effects Box. • JMP creates the explanatory variable

  4. Interaction Example • The number of car accidents on a stretch of highway seems to be related to the number of vehicles that travel over it and the speed at which they are traveling. • A city alderman has decided to ask the county sheriff to provide him with statistics covering the last few years with the intention of examining these data statistically so that she can introduce new speed laws that will reduce traffic accidents. • accidents.JMP contains data for different time periods on the number of cars passing along the stretch of road, the average speed of the cars and the number of accidents during the time period.

  5. Interactions in Accident Data Increases in speed have a worse impact on number of accidents when there are a large number of cars on the road than when there are a small number of cars on the road.

  6. Notes on Interactions • The need for interactions is not easily spotted with residual plots. It is best to try including an interaction term and see if it is significant. • To understand better the multiple regression relationship when there is an interaction, it is useful to make an Interaction Plot. After Fit Model, click red triangle next to Response, click Factor Profiling and then click Interaction Plots.

  7. Plot on left displays E(Accidents|Cars, Speed=56.6), E(Accidents|Cars,Speed=62.5) as a function of Cars. Plot on right displays E(Accidents|Cars=12.6), E(Accidents| Cars,Speed=7) as a function of Speed. We can see that the impact of speed on Accidents depends critically on the number of cars on the road.

  8. Toy Factory Manager Data

  9. Model without Interaction

  10. Interaction Model

  11. Interaction Model in JMP • To add interactions involving categorical variables in JMP, follow the same procedure as with two continuous variables. Run Fit Model in JMP, add the usual explanatory variables first, then highlight one of the variables in the interaction in the Construct Model Effects box and highlight the other variable in the interaction in the Columns box and then click Cross in the Construct Model Effects box.

  12. Interaction Model • Interaction between run size and Manager: The effect on mean run time of increasing run size by one is different for different managers. • Effect Test for Interaction: • Manager*Run Size Effect test tests null hypothesis that there is no interaction (effect on mean run time of increasing run size is same for all managers) vs. alternative hypothesis that there is an interaction between run size and managers. p-value =0.0333. Evidence that there is an interaction.

  13. The runs supervised by Manager A appear abnormally time consuming. Manager b has higher initial fixed setup costs than Manager c (186.565>149.706) but has lower per unit production time (0.136<0.259).

  14. Interaction Profile Plot Lower left hand plot shows mean time for run vs. run size for the three managers a, b and c.

  15. Interactions Involving Categorical Variables: General Approach • First fit model with an interaction between categorical explanatory variable and continuous explanatory variable. Use effect test on interaction to see if there is evidence of an interaction. • If there is evidence of an interaction (p-value <0.05 for effect test), use interaction model. • If there is not strong evidence of an interaction (p-value >0.05 for effect test), use model without interactions.

More Related