My dependent variable is Accuracy (that takes 1 or 0 for right and wrong). My IVs are Emotion (Sad, Happy; coded as 1,2 respectively), Load (high or low coded as 1,2 respectively) and Group (Group A and Group B; coded as 1,2 respectively).

I'm running a logistic regression in R using the following formula:

model1 <- glm(Accuracy ~ Emotion + Group + Load, data = file_name, family = Binomial(link = "logit") 

summary(model1) gives me a result that I can interpret. However, I notice that the Emotion and Group variables are followed by a number:

Main Effect

I'm new to logistic regression, but I'm not sure why its giving a specific result for an emotion. Why does it say emotion2 instead of emotion? Usually, in ANOVA, I get a simple effect of IVs and then I look inside to know the sub-factors affecting the DV. Why is this different?

Moreover, I'm interested in knowing the interaction effect. So, I executed another command:

model11 <- glm(Accuracy ~ Emotion * Task * Group, data = file_name,
      family = binomial(link = "logit"))

summary(model11) gives me something completely different. I had expected that the main effect will be the same for the two models (model1 and model11), but this is not the case.

Regression with Interaction Effects

Can anyone explain why this is the case?


why does it say emotion2 instead of emotion

Emotion is likely coded as a factor. The model assumes that emotion=1 is the comparison group. The coefficient for emotion 2 is the log odds ratio of emotion=2 as compared to emotion =1.

summary(model11) gives me something completely different

Those are huge odds ratios. I suspect there is some strong correlation between covariates causing these enormous odds ratios.

  • 1
    $\begingroup$ The covariates aren't necessarily correlated--this looks like an experiment, they're probably orthogonal. Rather, there is complete separation here. $\endgroup$ – gung - Reinstate Monica Jun 4 '19 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.