Sorry for asking my question even though I know there are some subjects about mixed effect model on the forum. But I think my question is somewhat different.
I have to answer to a question about repeated measure.
It is a group of people followed for a treatment against depression: 146 people (Men an women), 8 times of measure for each subject. I have to answer about if treatment works better in one gender group compare to the other.
My variables of interest are ScoreHamilton
(Score used to assess depression state), GROUPE
(Gender: male or female),TEMPS
(Different times of visit),NUMERO
(Subjects ID)
I know I have to used mixed effect model, but I am not sure if my scripts (below) are correct.
modMix_H0 <- lme(ScoreHamilton ~ TEMPS + GROUPE,
random = ~1+TEMPS|NUMERO,
data = Ham_norm.mix)`
I fitted variables TEMPS
(time) and GROUPE
(Gender) like fixed effects and NUMERO
(Subjects) like random effect. I am wondering if that is right.
I hesitate a little about the way I made random effect. I tried to do random intercept and random slope like this~1+TEMPS|NUMERO
cause I noticed that people making random effects used to do like this ~1+TIME|ID
(in general). Now I am wondering why I cannot put in random terms my variable GROUPE
, something like this ~1+GROUPE|NUMERO
, or like this ~1+TEMPS+GROUPE|NUMERO
.
The other part of my question is the interpreting of the output. Here are the results of the summary of the model:
summary(modMix_H0)
Linear mixed-effects model fit by REML
Data: Ham_norm.mix
AIC BIC logLik
6628.782 6663.471 -3307.391
Random effects:
Formula: ~1 + TEMPS | NUMERO
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 4.73695760 (Intr)
TEMPS 0.08200003 -0.353
Residual 4.72718973
Fixed effects: ScoreHamilton ~ TEMPS + GROUPE
Value Std.Error DF t-value p-value
(Intercept) 22.989933 0.5959364 905 38.57783 0e+00
TEMPS -0.352266 0.0109268 905 -32.23866 0e+00
GROUPEHomme 2.952001 0.8013428 144 3.68382 3e-04
Correlation:
(Intr) TEMPS
TEMPS -0.359
GROUPEHomme -0.652 0.012
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.66404151 -0.58774912 0.02206275 0.56281247 3.97325207
Number of Observations: 1052
Number of Groups: 146
I don't know how to interpret all of the parameters, how they could influence the interpreting of my final result (that is, the impact of GROUPE
on the Score Hamilton), and the quality of my model .
Though, the way I interpret this result is that the score is significantly higher in men (Homme
) than in women. So, the treatment improve better the mental state in women (lowest score), a result I was not expecting for. This make me wondering about about the way I computed the model.
I have additional questions. My variable VISIT
was factor which I turned into numeric. Could it change something whether my variable VISIT
is factor or numeric?
Could it change something about my results whether I used na.omit
or not in the model, since my dataset has a lot of missing values?