I have a big dataset, where I have thousands of controls and then subjects with different conditions. In total, I have around 26 classes (conditions), including controls. The data is very unbalanced. For example, I have thousands of controls, then a few hundred in one class, and other classes have less than 10 subjects. I'm interested in looking at associations between brain measures and risk for disease, associated with these conditions. I have a variable that reflects that risk, with zero being the controls. However, I'm concerned about the unbalanced problem, since I have so many controls and a different number of subjects in each condition. I am afraid the effect will be driven by differences between controls and subjects with conditions, instead of truly reflecting an association between the different risk associated with conditions and brain measures.
At first, I thought about subsampling my dataset, but in a previous question, I posted here, I was advised to use linear mixed models, where I could use my whole dataset. I have been playing with this, but I'm not totally sure on how to apply this to my problem. I'm using the package lm4 in R and the function lmer().
I tried this:
glmm1<- lmer(brain_measure ~ risk + Age + Sex + ICV + (1|condition),data=dataset_all,REML = F, na.action = na.exclude)
This model provided interesting results, where some were similar to when using lm() and others were different. However, I also receive a warning about singularity issues in some brain measures (boundary (singular) fit: see ?isSingular). After reading some threads I'm not sure if this should be a concern. Also, condition and risk are obviously related, since different conditions have different risks, and, for example, there are a lot of subjects with risk=0 given that most of the people are controls. I don't know if this is a problem.
I would like your advice on this. If this is the best approach, and if I'm applying this right.