question on repeated measure GLM model

Dear experts,
I'm troubled about using the RM-GLM model.
Let me introduce my case. I want to use energy as the predictor variable and score as the dependent variable (each subject has only 1 score). Also, energy has two states baseline and condition, and all subjects can be divided into three groups group 1-3, using age and gender as covariates. I would like to analyse the effects within and between each group, and the interaction effects between energy, baseline vs. condition and group.
My questions are:
1) is it proper to use repeated measures ANOVA?
2) Is it appropriate to construct the model like this way,
score ~ 1 + energy * group * baseline_condition -energy:group:baseline_condition + age + gender?
3) I am confused on the regressor of contion vs. baseline, as they are two state of the energy. Can I combine the two states of energy values into one column and then add a separate column indicating that energy belongs to a condition or a baseline. In that case, the data in all other columns would have to be duplicated. Do I need to add another column for the subject ID, indicating which subject the duplicate data belongs to(then how to add the subject ID in the model)?
I'm not familiar with the fitlm function in matlab, I've used the fitglm function before. Mainly I don't understand how I should prepare the data, whether the model is correct and how to see the between and within group effects.
Any suggestions will be highly appreciated!
Best,
Yifei

Answers (1)

I don't fully understand the design so I won't attempt to answer questions 2) or 3), but I think this is the answer to 1):
If 'score' is the dependent variable and you only have 1 score per subject, then no, repeated measures ANOVA is not appropriate. RM ANOVAs are only applicable when there are multiple values of the DV for each subject (i.e., recorded under different conditions).

4 Comments

Dear Jeff,
Firstly, thank you very much for your answer. Sorry I didn't make the question clear. I was trying to analyse the relationship between energy as an independent variable and score as a dependent variable. The score is a behavioural data that each subject has only one value. Energy is a measure of brain energy value. There are two states of energy values, condition and baseline. Also the subjects were divided into three groups (based on symptoms). The purpose of the analysis is to find out the relationship between the independent and dependent variables within each of the three groups, between groups, as well as the interaction between energy, groups and the two states (condition vs. baseline). In the meanwhile,I would like to use age and gender as covariates.
Can I use the same score value twice as the dependent variable in different energy states (condition vs baseline), where the values of the independent variable energy are different in the two states.
If repeated measures ANOVA is not appropriate, what statistical method should I use?
Thank you so much!
Best,
Yifei
"Can I use the same score value twice as the dependent variable" No, definitely not.
It sounds to me like you want to use fitlm to model your "score" DV as a function of multiple predictors, including the two energy variables (or perhaps, their average and their difference) and including dummy variables to code the groups, genders, etc. This is pretty complex modelling and you should probably consult a stats expert on the details.
Dear Jeff,
Thank you very much for your reply! I am currently switching to linear mixed effect model.
In my case, each subject had one behavioral scale score as the dependent variable, with two states of average brain energy (condition vs baseline, contineous values). Subjects were divided into 3 groups according to symptoms. Age and gender as covariates. I have tried using a two-layer model with one layer for individuals and one layer for groups. I tried these two models:
model 1) score ~ 1+age+gender+energy_base+energy_condition+energy_base:energy_condition+(1|group)+(1+energy_base|group)+(1+energy_condition|group)+(1+energy_base:energy_condition|group)
model 2) score ~ 1+age+gender+energy_base+energy_condition+energy_base:energy_condition+(1+energy_base|group+energy_condition+energy_base:energy_condition|group)
I have very little confidence in the construction of the model. I am not sure that
1) The p-values in the results are different in the random effects of the two models above when written together and separately, and I'm not sure what the difference is between the two ways of writing them.
2)I wonder if I should construct a three-layer model, with the individual as the first layer, the two energy states as the second layer, and the group as the third layer. I am not sure how the model should be constructed.
3)I would also like to include, in the model, interaction effects between groups, states, and energies.
Sorry for all the questions I've asked here, I really don't have a better source to be able to ask for advice on this question.
Best,
Yifei
Sorry, I don't know enough about linear mixed effects models to advise about those.

Sign in to comment.

Products

Release

R2019b

Asked:

on 5 Apr 2023

Commented:

on 24 Apr 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!