ANOVA & multcomp on data matrix with groups

Hi! I have a 40x173 data matrix, and the columns are broken into 4 groups (n=10). I would like to complete an individual ANOVA for each column then based on those stats complete multiple comparisons against the 173 columns.
I am having trouble assigning the 4 groups to the matrix despite importing an additional 'group' variable as recommended here: https://au.mathworks.com/help/stats/anova1.html#bulav5i-group
After running my code anova1(data, group) I am getting the error code:
"Error using anova1 (line 93)
X and GROUP must have the same length."
Which when I click on the error, reads line 93: "error(message('stats:anova1:InputSizeMismatch'));"
I have already tried to create a 40x173 matrix with the groups 1-4 assigned to the position in the data but this retrieves the same error.
Any assistance on this would be wonderful.
Thank you!

1 件のコメント

Alexander Guillen
Alexander Guillen 2023 年 3 月 6 日
Were you able to figure it out? I am having the same issue

サインインしてコメントする。

回答 (0 件)

カテゴリ

製品

リリース

R2018b

タグ

質問済み:

2019 年 4 月 17 日

コメント済み:

2023 年 3 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by