Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: one-way repeated measures ANOVA with more levels than subjects
Replies: 8   Last Post: Nov 6, 2013 3:53 AM

 Messages: [ Previous | Next ]
 Tim Posts: 5 Registered: 10/23/13
Re: one-way repeated measures ANOVA with more levels than subjects
Posted: Oct 25, 2013 11:18 AM

On Thursday, October 24, 2013 1:27:38 AM UTC+2, Jeff Miller wrote:
> On Thursday, October 24, 2013 10:37:52 AM UTC+13, Bruce Weaver wrote:
>

> > For those who are interested, here's the code:
>
>
>
>
> This part of the code looks suspect to me:
>
>
>
> nunits = max(design(cfg.uvar,:));
>
> dfdenom = nunits - ncontrasts;
>
>
>
> I'm not confident, but it looks to me like:
>
>
>
> nunits = the number of subjects.
>
> ncontrasts = (at least by default) the number of df's
>
> for the repeated measures factor factor.
>
>
>
> In that case, dfdenom for the factor effect in a repeated measures design should be (nunits-1)*ncontrasts.

Hi Jeff,

Thanks for looking into this. The line you are referring to is the suspicious one (in fact the one that made me wonder whether I had a conceptual misunderstanding here).

Below the line, they compute the actual F statistic with

for smplindx=1:nsmpls
datonesmpl=reshape(dat(smplindx,poslabelsperunit),nunits,nconds);
contrasts=datonesmpl*cfg.contrastcoefs';
contrastavg=mean(contrasts,1);
dev=contrasts-repmat(contrastavg,nunits,1);
covmat=(dev'*dev)/(nunits-1);
s.stat(smplindx)=nunits*contrastavg*inv(covmat)*contrastavg';
end;

Apparently, they are comparing the factor levels to their average, which makes a MANOVA unlikely. I will go and see whether there is something on this in the fieldtrip mailing list. I will keep you updated.

If someone has a suggestion in the meantime, of course please let me know about it.

Tim

Date Subject Author
10/23/13 Tim
10/23/13 Bruce Weaver
10/23/13 Tim
10/23/13 Bruce Weaver
10/23/13 Jeff Miller
10/25/13 Tim
11/6/13 Tim
10/23/13 Art Kendall
10/23/13 Tim