# Comparing mixed models with weighted variance

I'm performing some linear mixed models for a psychological experiment. I'm not a statistician so my knowledge is limited. The basic idea is that: I have an experiment in which I model my response variable as a function of within-subject factors (Emotion, Mem) and a between-subject factor (Group). I use nlme:

fit <- lme(Score ~ Group + Emotion + Mem + Group:Mem, random= ~ 1 | Subject,
data = dati)


Where Group is a 2 level factor (Controls, Patients). Given that I have the assumption that the variance of the response variable is different between Controls and Patients I decided to insert a weight term for the variance weights = varIdent(form = ~1 | Group):

fit_var <- lme(Score ~ Group + Emotion + Mem + Group:Mem,
random = ~ 1 | Subject, data = dati,
weights = varIdent(form = ~ 1 | Group))


My question is: if I compare these two models and the fit_var model is better (in terms of AIC, BIC, LRT) it's like testing also the variance component? In other words, can I say that allowing for the heteroscedasticity in the model, the response variable explanation is improved? Thanks!

Yes, these models are nested and therefore you can use a likelihood ratio test to compare them. This can be simply done using the anova() function, i.e.,
anova(fit, fit_var)