【问题标题】:Multiple comparison for repeated measures ANOVA in matlabmatlab中重复测量方差分析的多重比较
【发布时间】:2017-01-10 20:17:09
【问题描述】:

我想找出不同条件之间可能存在的差异。我有 n 个科目,我分别对每个科目的每个条件都有一个平均值。受试者之间的值差异很大,这就是为什么我想执行重复测量 anova 来控制它。

我的主体内因素将是当时的条件,而我没有任何主体间因素。

So far I have the following code:
%% create simulated numbers
meanPerf = randn(20,3);

%% create a table array with the mean performance for every condition

tableData = table(meanPerf(:,1),meanPerf(:,2),meanPerf(:,3),'VariableNames',{'meanPerf1','meanPerf2','meanPerf3'})

tableInfo = table([1,2,3]','VariableNames',{'Conditions'})

%% fit repeated measures model to the table data
repMeasModel = fitrm(tableData,'meanPerf1meanPerf3~1','WithinDesign',tableInfo);

%% perform repeated measures anova to check for differences
ranovaTable = ranova(repMeasModel)

我的第一个问题是:我这样做正确吗?

第二个问题是:如何进行事后分析以找出哪些条件彼此之间存在显着差异?

我尝试使用:

multcompare(ranovaTable,'Conditions');

但这产生了以下错误:

Error using internal.stats.parseArgs (line 42)
Wrong number of arguments.

我正在使用 Matlab 2015b。

如果你能帮助我,那就太好了。我想我正在失去理智。

最好, 菲尔

【问题讨论】:

    标签: matlab anova posthoc


    【解决方案1】:

    我在使用 Matlab R2016a 尝试相同的事情时,收到以下 multcompare 错误消息:“STATS 必须是来自 ANOVA1、ANOVA2、ANOVAN、AOCTOOL、KRUSKALWALLIS 或 FRIEDMAN 的统计输出结构。”。

    但是,这个讨论对我很有帮助: https://www.mathworks.com/matlabcentral/answers/140799-3-way-repeated-measures-anova-pairwise-comparisons-using-multcompare

    您可以尝试以下方法: multcompare(repMeasModel,'Factor1','By','Factor2)

    我相信您也需要在模型的内部结构中创建因子。

    【讨论】:

    • 不要发布链接作为答案。
    猜你喜欢
    • 1970-01-01
    • 2022-01-17
    • 2015-12-06
    • 1970-01-01
    • 2015-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多