Greetings Statisticians!
I am trying to create a crossed effects mixed model w/ interaction terms in lme4 to describe a regional analysis of MRI data in mouse brains w/ genotype, treatment, and time as categorical fixed effects to predict MRI signals as the dependent variable. I wish to model these fixed effects as 2x sets of interactions:
- Treatment x Region
- Genotype x Region
For these interactions, I have a base category for each variable which I expect to have excluded from the coefficients in the model results - I have successfully achieved this result in earlier models for this project that only utilized main effects in the absence of any interactions. In the case of the brain Region variable, this category is the calculated mean of ALL regions. Random effects include correlated intercepts & slopes for brain region and time, each with mouse subject.
The final model specification is as follows:
formula <- "Y ~ Region:Tx + Region:Transgenic + Week + (Week | Mouse) +
(Region | Mouse)"
Since I have 13 regions (+1 "total brain" region), 4x treatment groups, and 2x genotypes, I would expect to have a total of 54x fixed effects coefficients:
13x3 region:treatment coeffs + 13x1 region:genotype coeffs + 1x time coeff + 1x intercept
However, the resulting model is including coefficents that contain the base categories I indicated for a total of 71 coefficients, which is less than the total of 86x fixed effects coefficients I would expect to see if ALL categories were included:
14x4 region:treatment coeffs + 14x2 region:genotype coeffs + 1x time coeff + 1x intercept
As a side note, I'm receiving the following warning message as well:
fixed-effect model matrix is rank deficient so dropping 1 column /
coefficient
boundary (singular) fit: see ?isSingular
I specify my base categories with the following code:
data <- within(data, Region <- relevel(Region,ref = "Brain"))
data <- within(data, Tx <- relevel(Tx,ref = "Saline"))
data <- within(data, Transgenic <- relevel(Transgenic,ref = "WT"))
Why are my base categories not excluded from the interaction model as they typically are in main effects models?