I have one fixed effect (group
) and one nested random effect (nested
). There are 20 levels of group
, and all but one of them has 4 levels of nested
. There is significant variance in nested
that I feel should be included in the ANOVA model, but because a single level of group
has only a single corresponding nested
level, this seems technically inappropriate.
Moreover, when I run a mixed model anova while including nested
(either with lme4 in R or proc MIXED in SAS), there is always some message about "Convergence criteria met but final hessian is not positive definite" (SAS warning). I found an informative SAS paper that mentioned that this error is often caused by mis-specified models (see https://support.sas.com/resources/papers/proceedings12/332-2012.pdf). However, I also saw another question on this site that seemed pertinent and whose answer implied that it was a valid approach (Is it inappropriate to do a One-way independent ANOVA when one of the levels has only one participant?).
From what I could interpret from a different question on this site, if a random effect has only one level then the mixed model's optimizer will really only be estimating the random effect based on rounding error (Mixed model runs well in R whereas a random effect has only one level). In my opinion this seems fine in my case since 1) I just need to account for the effects of nested
on group
, 2) if the estimate for nested
in the single troublesome group
level is based on rounding error then it probably won't dramatically change the estimate for that level's fixed effect, and 3) the benefit to accounting for nested
within all other group
levels seems worth the tradeoff.
Note that I cannot exclude the troublesome group
level from the analysis.
QUESTION: Should I fit a mixed model that includes nested
, and if so, with how much caution should I interpret the results?
nested
? or are there 4*19+1 levels ofnested
? Are you sure you want to specify a fixed effect with 20 levels? Usually there are more levels of the variable to be used as a random effect than the one to be used as a fixed effect. $\endgroup$nested
. Yes, I have to specify a fixed effect with 20 levels given the experimental design. $\endgroup$