2

I'm currently analyzing data from a driving simulator study about different warning concepts that vary in two parameters. The explanatory variables are warning parameter 1 (2 treatment groups) and parameter 2 (2 treatment groups). The response variable is collisions after warnings (collision vs. no collision).

I would like to know whether parameter 1 and parameter 2 and their interaction have a significant effect on collision avoidance. If I understood right, it can be analyzed with logistic regression. I adopted the R code from the post Test for effects of two categorical variables on a binary response variable? for that:

mymodel <- glm(collision ~ parameter1*parameter2, data=mydata,
               family="binomial")
anova(mymodel, test="Chisq")

Now, I wonder which effect sizes should be reported and how to calculate them. Can anyone recommend an appropriate effect size?

  • 1
    What do you want to know the effect size for? Each predictor in your model? If so, odds ratio would be the first that comes to mind for logistic regression. – Ian_Fin Nov 16 '16 at 15:09
  • Hi and thank you so much for your answer! I want to report effect sizes for the main effects of the two parameters as well as for the interaction effect. As far as I understood OR, I can calculate it easily for the main effects. Here the R code, I use: > oddsratio(table(mydata$parameter1, mydata$collision), log=FALSE). However, I didn't find how to calculate OR for the interaction effect. – Gabriel B. Nov 16 '16 at 17:14
  • Odds ratio can be calculated from the coefficients in your regression, including the interaction. Specifically, it's $exp(\beta)$. – Ian_Fin Nov 16 '16 at 17:54
  • Thank you so much for your help! The only part I still don't understand is, why I get different values for the main effects for (A) > exp(coef(mymodel)) and (B) > oddsratio(table(parameter1, collision), log=FALSE) (which is matching my manual calculation). – Gabriel B. Nov 16 '16 at 18:16
  • I'm not familiar with the oddsratio() function, so I can't tell you why. The answer may have something to do with the way you've coded the categorical variables in the regression though – Ian_Fin Nov 16 '16 at 18:23

0 Answers0