I'm not an expert statistician so excuse me if the question is trivial or not clearly written. I'm performing some statistical analysis of experimental psychology research. Basically, I have an experiment in which subjects have to perform a computerized task with:
- 2 groups (control and clinical) - between-subject factor
- stimuli factors (different stimuli on the screen) - within-subject factor
- my response variable that is a continuous variable representing the performance
Both the mean and the standard deviation of my response variable represent the precision in the task and one of my hypothesis is that the clinical group performance is worst compare to controls (higher mean and higher SD)
Given that I have multiple observation on the same subject, I'm performing a linear mixed-effect model with subjects as random effect.
In R using the lme4
package the code is:
fit <- lmer(Response ~ Group * Factor1 * Factor2 + (1|Subjects), data = dati)
This works well for difference in mean, but I would like to include in the model (and comparing with the model without this term) that the variance in Response is different between levels of the Group variable (Controls and Clinical).
I've seen this thread about including weights=varIdent(form=~1|Group)
in the model fitted with nlme
. But given that this term refers to the residual variance, I'm not sure that is what I need. Does including this term answer to my question?
str(dati)
,summary(dati)
andsummary(fit)
into the question. $\endgroup$