I have a research problem and already collected the data from experiments.
Suppose, I plan to study the relationship between variable X (independent variable) and variable Y (dependent variable). I also consider the impacts of three distinct factors A, B, C, each factor has two levels (A = 0 or A = 1) as dummy variable. Therefore, I have 2*2*2=8 different experiment scenarios in the experimental design. The same group of participants take all eight experiments.
I plan to specify the model in R using lme4 as
model <- lmer(
data = dataset,
formula = Y ~ 1 + X + A + B + C + (1 + X | Scenario) +
(1 + X | Participant)
)
I have three problems regarding the model formulation of mixed effects model in my research problem?
1. Does the model formulation make sense?
Besides X as the independent variable, I also take dummy variables A, B and C as independent variables to study their impacts on estimating Y. I consider Scenario and Participant as the random effects? I am curious whether it is possible to take dummy variables A, B and C as fixed effects and Scenario as random effect at the same time. Because it seems Scenario includes A, B and C. Do I understand this right?
2. What other forms of model can I consider?
Based on this base model, I plan to add other terms:
- interaction terms of
A,BandConX. - The crossed structure of random effects between
ScenarioandParticipant. From Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?, I think there is crossed random effects in my problem. - Maybe other covariates like the gender/age of participants.
But I think that the model would be too complex and am not sure whether the model would perform well or not.
3. What is the differences in results of using three-way ANOVA and mixed effect model in this problem?
And the final question is what's the advantage of using mixed effects model over three-way ANOVA? I understand I can get a generalized regression model for different scenario setting combinations which is nice. But my focus is on the impact of A, B, C on the relationship between X and Y. Do I analyze by just comparing the slopes and intercepts (the estimated coefficients)?