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!

回答(0 个)

类别

产品

版本

R2018b

标签

Community Treasure Hunt

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

Start Hunting!

Translated by