post hoc tests for aoctool
2 views (last 30 days)
Show older comments
Hi, I am running an ANCOVA using AOCtool and am not understanding the syntax for post hoc testing
[h,atab,ctab,stats]=aoctool(table_zero_some.var1,table_zero_some.var2,table_zero_some.group,0.05,'var1','var2','group')
I get
atab =
5×6 cell array
{'Source' } {'d.f.'} {'Sum Sq'} {'Mean Sq'} {'F' } {'Prob>F' }
{'group' } {[ 1]} {[0.0869]} {[ 0.0869]} {[ 0.1908]} {[ 0.6674]}
{'activation' } {[ 1]} {[4.1257]} {[ 4.1257]} {[ 9.0583]} {[ 0.0075]}
{'group*activation'} {[ 1]} {[0.9107]} {[ 0.9107]} {[ 1.9996]} {[ 0.1744]}
{'Error' } {[ 18]} {[8.1983]} {[ 0.4555]} {0×0 double} {0×0 double}
I would like to use multcompare as I would in a standard ANOVA; however the matlab documentation says
multcompare uses stats.gnames(idx) as the control group
I'm not sure what this means or what the syntax is supposed to look like
This is the stats output:
stats =
struct with fields:
source: 'aoctool'
gnames: {2×1 cell}
n: [2×1 double]
df: 18
s: 0.6749
model: 5
slopes: [2×1 double]
slopecov: [2×2 double]
intercepts: [2×1 double]
intercov: [2×2 double]
pmm: [2×1 double]
pmmcov: [2×2 double]
Thanks!
0 Comments
Accepted Answer
the cyclist
on 24 Jan 2023
After running aoctool and getting the stats output, you can simply run
[results,~,~,gnames] = multcompare(stats)
If you do that, then by default the first group listed in gnames will be the reference group. Alternatively, you can run
[results,~,~,gnames] = multcompare(stats,'ControlGroup',3)
if you want the 3rd group to be the reference group. (Different sources of the stats variable can have different methods of specifying the control group, but that is how you do it for aoctool, according to this documentation.)
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!