- If A and B are somehow the same, for example measurements of the same variable or of comparable variables with the same units, then you may choose to conduct a repeated measures analysis. For example, you may do the analysis on left arm and right arm of subjects.
- If A and B are fundamentally different things, then you may choose not to use repeated measures analysis. For example, If A were age and B were weight of some subjects, and they are of very different scales, then you may decide fitrm is not appropriate.
Implementing Moderation analysis using fitrm when i have a 2 within subjects factors
11 ビュー (過去 30 日間)
古いコメントを表示
I have a (A)2x(B)2 within subjects design and a continuous moderator variable (X). I want to test whether X moderates the relationship between A and B. How can I impliment this in matlab using the fitrm function?
I have tried the following :
rm = fitrm(Datamatrix,'A-B ~1 + X','WithinDesign',within);
However I am not sure if this is the right thing to do.
Should i be using the fitlm function instead? If so, can someone explain how i should construct my design matrix for it?
Thanks in advance!
0 件のコメント
回答 (1 件)
Aditya Patil
2020 年 12 月 24 日
The idea behind repeated measures is that we measure the response variable over time or under different conditions.
As a workaround, it would be possible to model A and B separately. An advantage is that they would not be constrained to have the same functional relationship. For example, A could be a linear function of X and B could be a quadratic function of X. It would also be possible to study the residuals from the two models in order to decide the degree of correlation between A and B after adjusting for the between-subject models.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Repeated Measures and MANOVA についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!