필터 지우기
필터 지우기

Extending repeated measures ANOVA to linear mixed effects model

조회 수: 5 (최근 30일)
bsriv
bsriv 2022년 9월 19일
댓글: Jeff Miller 2022년 9월 21일
Hi, I currently have data on a group of participants undergoing an identical experiment in which they submit a rating after a given instruction/cue set at two separate timepoints that I have analyzed using repeated measures ANOVA:
t=table(inst1_cue1_pre_rating_mean_stack,inst1_cue1_post_rating_mean_stack,inst2_cue1_pre_rating_mean_stack,inst2_cue1_post_rating_mean_stack,inst1_cue2_pre_rating_mean_stack,inst1_cue2_post_rating_mean_stack,inst2_cue2_pre_rating_mean_stack,inst2_cue2_post_rating_mean_stack,'VariableNames',{'inst1_cue1_pre','inst1_cue1_post','inst2_cue1_pre','inst2_cue1_post','inst1_cue2_pre','inst1_cue2_post','inst2_cue2_pre','inst2_cue2_post'}); with instruction ("inst1/inst2"), cue ("cue1/cue2") and time (pre/post) as categorical variables
WithinStructure=table([1 1 2 2 1 1 2 2]',[1 1 1 1 2 2 2 2]',[1 2 1 2 1 2 1 2]','VariableNames',{'instruction','picture','time'});
WithinStructure.instruction = categorical(WithinStructure.instruction);
WithinStructure.picture = categorical(WithinStructure.picture);
rm=fitrm(t,'look_alc_pre-negative_food_post~1','WithinDesign',WithinStructure);
ranovatbl=ranova(rm,'WithinModel','instruction*picture*time')
My question is, I would like to extend this to a linear mixed effects model, where instead of pre and post I would like to have a continuous variable interval days between session ("intervals")
So I have gotten as far as setting up the table for the lme:
pre_table=table(inst1_cue1_pre_rating_mean_stack,inst2_cue1_pre_rating_mean_stack,inst1_cue2_pre_rating_mean_stack,inst2_cue2_pre_rating_mean_stack,intervals_baseline)
, where intervals_baseline is a column of zeros the size of the participant group
post_table=table(inst1_cue1_post_rating_mean_stack,inst2_cue1_post_rating_mean_stack,inst1_cue2_post_rating_mean_stack,inst2_cue2_post_rating_mean_stack,intervals_post)
where intervals_post is the number of days for each participant between tests
tbl=[tbl_pre;tbl_post]
My question is how to extract (or code) the categorical variables for the linear mixed effects model, which I think should be rating~instruction+cue+intervals (and I would like the interaction terms instruction*intervals and cue*intervals) but I'm a little lost on how to set this up. Do I code the fixed effects as in the anova? And what about the dependent variable?
Thank you!
  댓글 수: 3
bsriv
bsriv 2022년 9월 20일
Hi- thanks for the response
I have 22 particpants and here is a histogram (x axis = #days between sessions, y axis # of participants)
Jeff Miller
Jeff Miller 2022년 9월 21일
That's not a lot of participants, and they are mostly squished together in that 90-100 range, so I doubt you have much power to detect an influence of the interval length. If you want to try, I'd suggest using a median split on interval to divide the participants into two groups (short vs long interval) and then treating that division as a between-Ss factor in the ANOVA. If it is practical in a future study looking harder at interval, maybe randomly assign participants into more distinct short- and long-interval groups (e.g., 80-95 and 110-125).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by