# Do expits reveal effect sizes with logistic regression?

I used a logistic regression model (glme4) to determine whether two different types of words (emotional vs. unemotional) are recognized more accurately (accurate=0, error=1) when shown in a particular color (green, red, blue). The logistic model shows a significant difference between red and blue with a coefficient of .064. This difference was not influenced by word type (a coefficient = .0042 for the corresponding statistical interaction). My question is whether the “expit” function

expit <- function(x) { 1/(1+exp(-x)) }


is sufficient for the specification of the effect size (change in probability) for each of the two coefficients. How can the critical coefficients of .064 and .0042 be expressed in percentage values (effect sizes)? Numerically, the mean error rates for red and blue are 12% and 15%, respectively.

I used the lme4 function

lmer(Correct ~ WordType * Color + (1| Participants), data = df)


with contrasts(df$WordType) <- contr.sdif(2)) and contrasts(df$Color) <- contr.sdif(3)).

Results are given below:

Fixed effect    Estimate    SE       Z

intercept       -1.86       .144    -12.96
WdTpe2-1          .058      .055      1.05
Color21           .006      .028       .228
Color 32          .064      .017      3.79
WdType:Color21   -.008      .055      -.14
WdType:Color32    .0042     .033       .127

• It could be just me, but i'm having trouble understanding the 2nd 1/2 of your post. Could you edit a bit, maybe break down some of the statements into chunks so as to be plainer? – rolando2 Oct 27 '11 at 22:00
• Thanks rolando2; I made my second part a lot shorter and, hopefully, a bit clearer. – alwin Oct 28 '11 at 14:03
• Answering questions about effect sizes requires knowledge of the coding used, which you have not provided. (In fact you haven't even told us what statistical package has this "glme4" function.) – DWin Oct 28 '11 at 17:25

I recommend removing the unusual contrasts argument and re-running this. Using the defaults will help you use documentation and other resources that describe the model that's being fit. Under the default contrasts;

The intercept coefficient is a log odds; the log odds of getting an accurate answer, for questions in the lowest color category, where word type is the lowest level (WordType=0), and in average participants (i.e. where the random intercept term is zero).

The word type coefficient (a main effect') is a log odds ratio, i.e. it describes a comparison. More specifically, it estimates the log of the ratio of the odds of getting an accurate answer, comparing questions with WordType1 to WordType0, among questions in the lowest (reference) color category and in average participants.

The color main effects can be interpreted similarly; the comparison is of each color level to the reference category, this time keeping word type fixed and in average participants.

The interaction coefficients describe comparisons of comparisons, so their descriptions get still more long-winded. For example, the WordType:Color21 coefficient estimates the log of the ratio of two coefficients that describe Color21 main effects, among questions which are of WordType1 and and WordType0, and these comparisons are all made in average participants.

Using exp()` on the non-intercept terms you get an estimate of the parameter as described above but omitting 'log' throughout.

As far as my understanding for logistic regression is concerned, the interpretation of the coefficients in terms of measures of effect can be done using odds ratios. By assuming the other coefficients held fixed even if they are unspecified which is not necessary in the calculation of odds ratios. You can take the ratio between the two results directly and interpret it as odds ratios. I know that in the sense of epidemiology this issue is much more obvious however it is not restricted to the use in epidemiological studies.

For example in your model, if we let all variables to be held fixed and only the two desired variables (color 32, wdType:color32) are changeable then you can compute value of expit at first all possible values. The outcome will represent the odds of each case, now for the comparability between two cases you can take the ratio between both results and what will you have is basically the odds ratios.

• For your original question it is best to stick with odds ratios as these have meaning without specifying the settings of other variables. But interpretation of individual coefficients (and their anti-logs) only works in the special case that the model is coded in a special way and that no nonlinearities or interactions are included. – Frank Harrell Jan 27 '12 at 13:30