필터 지우기
필터 지우기

Repeated measures ANOVA with 2 variables with different levels

조회 수: 4 (최근 30일)
MM
MM 2022년 4월 6일
댓글: MM 2022년 4월 7일
Hi, I am trying to run a 2 way RMANOVA on this data called RMANOVA_Table_Analysis. I have also attached this dataset.
I am trying to get the main effect of background, color and the interaction between them. This is what I tried, looks like I am making an error in creating the repeated measures model.
Any pointers on how to do this correctly, would be much appreciated!
  댓글 수: 2
Scott MacKenzie
Scott MacKenzie 2022년 4월 6일
What do you mean by "looks like I am making an error"? What error are you seeing?

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

채택된 답변

Scott MacKenzie
Scott MacKenzie 2022년 4월 7일
Change
rm = fitrm(dv, 'uniR - texB ~ 1 ', 'WithinDesign', withinDesign);
to
rm = fitrm(dv, 'uniR-texB ~ 1 ', 'WithinDesign', withinDesign);
Apparently, the fitrm function doesn't like the spaces on each side of the dash.
  댓글 수: 3
Scott MacKenzie
Scott MacKenzie 2022년 4월 7일
편집: Scott MacKenzie 2022년 4월 7일
@MM, you're welcome. In specifying the modelspec for fitrm, the between-subjects variables are placed on the right-hand side of the tilde symbol. Your design does not have any between-subjects variables, so "1" is used on the right-hand side of tilde in the modelspec. In your modified code, you are trying to position the within-subjects variables (Background, Color) as between-subjects variables. That's the reason for the error.
In your original code (with the correction I noted), you will get three effects: the main effects for Background and Color and the Background x Color interaction effect. From your question, I think that's your main objective, right? So I'm not sure what you are trying to do in the second version of fitrm.
BTW, the effect of Color on mean_final_offset was statistically significant, F(2,22) = 4.006, p = .0328. The other two effects were not statistically significant.
MM
MM 2022년 4월 7일
Thank you for explaining! Makes sense why I get the error.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Repeated Measures and MANOVA에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by