I have a dataset with 142 data entries: 121 individuals measured on two occasions (two years, before and after treatment, Year = 0 or 1), in the second year 46 individuals were in treated plots and the rest were in control plots (treatment = 0 or 1). Here's some example data:
ID <- c("480", "480", "620", "620","712","712")
Year <- c("0", "1", "0", "1","0", "1")
Plot <- c("14", "14", "13", "13","20","20")
Treat <- c("0", "0", "0", "1", "0", "1")
Exp <- c("31", "43", "44", "36", "29", "71")
ExpSqrt <- c("5.567764", "6.557439", "6.633250", "6.000000", "5.385165", "8.426150")
Winter <- data.frame(ID, Year, Plot, Treat,
Exp, ExpSqrt,
stringsAsFactors = TRUE)
Plots and individuals are random factors and I'm trying to fit a mixed model to determine the effect of Year, Treatment and the interaction between them:
model_Exp <- lmer(ExpSqrt~Year+Treat+Year*Treat+(1|ID)+(1|Plot),data=Winter)
but I keep getting the warning message:
"fixed-effect model matrix is rank deficient so dropping 1 column / coefficient"
This removes the interaction.
I have no NA values in my dataset and Exp is always positive but I have sqrt transformed this as the distribution was non-normal. It's not a particularly small dataset, I have tried the using the function findLinearCombos from the caret package but it returns no result.
My understanding is that there is some problem because treatment 1 only occurs under condition year=1 (but not in all instances: Year=1 also contains 75 control individuals).
I am not sure a) how or if this can be resolved? or b) if it can't be resolved how to interpret this?
I have read some responses about this warning but have done everything I found suggested to resolve it, I've also read a bit about the Hauck-Donner effect, but I'm not sure if this is my problem and being relatively new to stats I can't admit I entirely understand it.