필터 지우기
필터 지우기

Specifying a repeated measures model using fitrm

조회 수: 11 (최근 30일)
Matt Panichello
Matt Panichello 2023년 9월 14일
답변: Sai Pavan 2023년 10월 9일
Hello,
I'm trying to fit a repeated measures model to a dataset using fitrm, but I'm having a hard time understanding how to specify the model using the help page and examples.
I measured the scalar response FR from 4,894 individuals, termed NEU. I measured FR from each NEU 16 times, while manipulating two variables in a factorial design: CUE (8 categorical values) and STATE (2 categorical values).
Here are the first and last few rows of the table containing the data for clarity:
Using fitrm.m, How can I model the effect of STATE and CUE on FR (FR~CUE*STATE), while accounting for the fact that FR was repeatedly measured from each NEU?

답변 (1개)

Sai Pavan
Sai Pavan 2023년 10월 9일
Hi Matt,
I understand that you are trying to model the effect of STATE and CUE on FR as well as account for the fact that FR was repeatedly measured from each NEU.
Please try using the "fitrm" function as given below to model the repeated measures:
rm = fitrm(data, 'FR1-FR16~CUE*STATE', 'WithinDesign', [1 4]);
The FR1-FR16 specifies the repeated measures of FR. The CUE*STATE specifies the fixed effects of CUE and STATE, as well as their interaction. By providing the “WithinDesign” and “[1 4]” parameters to the “fitrm” function, we indicate that the repeated measures are within-subjects factors. In this case, the first index (1) represents the column number of repeated measures of FR, and the second index (4) represents the column number of the subject identifier NEU.
Please refer to the below documentation to learn more about the “WithinDesign parameter in “fitrm function: https://www.mathworks.com/help/stats/fitrm.html#:~:text=WithinDesign%20%E2%80%94%20Design%20for%20within%2Dsubject%20factors
Hope it helps.
Regards,
Sai Pavan

카테고리

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