I'm analyzing data from a study with two fixed factors (sex and treatment), each with 2 levels(Male and Female, OVA and Vehicle). My model looks like this.

PFC = lmer(PFC ~ SEX * TX + (1|LITTER), data = df, REML = FALSE)

The summary output of this model is the following:

Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's method [lmerModLmerTest]
Formula: PFC ~ SEX * TX + (1 | LITTER)
   Data: df

     AIC      BIC   logLik deviance df.resid 
   -61.3    -52.9     36.7    -73.3       24 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.12513 -0.74036  0.07873  0.65812  2.12174 

Random effects:
 Groups   Name        Variance Std.Dev.
 LITTER   (Intercept) 0.000000 0.00000 
 Residual             0.005082 0.07129 
Number of obs: 30, groups:  LITTER, 8

Fixed effects:
            Estimate Std. Error       df t value Pr(>|t|)    
(Intercept)  0.74719    0.04446 30.00000  16.807  < 2e-16 ***
SEX          0.03362    0.02657 30.00000   1.266    0.215    
TX1         -0.26650    0.04446 30.00000  -5.994 1.42e-06 ***
SEX:TX1      0.04047    0.02657 30.00000   1.523    0.138    
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

My confusion is about the interpretation of the fixed effects estimates.

  1. FIXED EFFECT INTERCEPT IS WEIRD. My data is setup so that male = 1 and female = 2, while the experimental conditions are called “OVA” and “Vehicle”. Based on the way R calculates intercept (lowest number + early alphabetical are used as reference), this means that the intercept estimate should represent the mean of the male OVA group, right? However, the intercept value doesn’t match the mean of any of the 4 groups in the 2x2 design. This is the case even when I try centering the data beforehand. Do we know why that could be?

  2. THE SLOPE OF THE TREATMENT EFFECT IS INCORRECT? The fixed effects output shows that the value of TX is negative, which means that the slope of the data going from OVA to Vehicle should be negative. This would mean that OVA exposure increased my response variable. However, when I look at the actual data in graphical form, OVA exposure definitely reduced my response variable, so the slope of that line should be positive (see below). There are other instances elsewhere in my dataset where this type of thing happens. Am I misreading or misinterpreting the estimates in the table?

    Plot code so you know I'm not crazy:

    ggplot() +  
      geom_jitter(data = df, aes(x = TX, y = PFC, color = as.character(SEX))) +
      labs(x = "Tx", y = "Response", title = "Please Help Me") + 

A scatter plot showing that subjects in the OVA group had lower values than subjects in the Vehicle group

I've tried so hard to comb through stats pages on this topic but can't seem to grasp a better understanding. Any and all help is sincerely appreciated!

  • 3
    $\begingroup$ The intercept is evaluated at 0. If you have male=1 and female=2, then the intercept will be at a value not corresponding to any sex. This will similarly mess up your slopes (because you have an interaction term). My advice would be to either recode as male=0, female=1 or (better) recode SEX as a factor. $\endgroup$
    – Ben Bolker
    Commented Jan 13, 2022 at 0:33

1 Answer 1


I am not going to try answering your question. However, do note that the random effect (LITTER) gives zero varianze and zero Std. Dev. lmerTest or R should have thrown an error message: "boundary is singular..." which can be quite problematic. For example, see: boundary (singular) fit: see ?isSingular


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.