Thread Subject: Unbalanced ANOVA

Subject: Unbalanced ANOVA

From: Suman Seer

Date: 14 Aug, 2008 17:42:02

Message: 1 of 6

Hello Everyone,

I have been using anova1 till now to check for equality of
means between groups with same number of elements. But now
my data has unequal number of elements in groups and I
believe this is the case of Unbalanced ANOVA. I havent been
able to figure out a way or function to handle this case?
I would appreciate any help with this.

Thanks
Suman

Subject: Unbalanced ANOVA

From: Donn Shull

Date: 14 Aug, 2008 18:33:01

Message: 2 of 6

"Suman Seer" <supernova5271@yahoo.com> wrote in message
<g81qpa$6tk$1@fred.mathworks.com>...
> Hello Everyone,
>
> I have been using anova1 till now to check for equality of
> means between groups with same number of elements. But now
> my data has unequal number of elements in groups and I
> believe this is the case of Unbalanced ANOVA. I havent
been
> able to figure out a way or function to handle this case?
> I would appreciate any help with this.
>
> Thanks
> Suman

group1 = 1:3;
group2 = 2;

groups = [group1, group2];
names = {'gp1','gp1','gp1','gp2'};

[p,anovatab,stats] = anova1(groups, names);


Subject: Unbalanced ANOVA

From: Suman Seer

Date: 14 Aug, 2008 20:42:01

Message: 3 of 6

Hi Donn,

Thanks for your reply. This is how I have been using
anova1 before but my question is, since the groups have
unequal elements, is the anova1 test still valid or does
one have to make any changes?

Thanks.
Hussain



"Donn Shull" <donn.shull.no_spam@aetoolbox.com> wrote in
message <g81tot$co6$1@fred.mathworks.com>...
> "Suman Seer" <supernova5271@yahoo.com> wrote in message
> <g81qpa$6tk$1@fred.mathworks.com>...
> > Hello Everyone,
> >
> > I have been using anova1 till now to check for
equality of
> > means between groups with same number of elements. But
now
> > my data has unequal number of elements in groups and I
> > believe this is the case of Unbalanced ANOVA. I havent
> been
> > able to figure out a way or function to handle this
case?
> > I would appreciate any help with this.
> >
> > Thanks
> > Suman
>
> group1 = 1:3;
> group2 = 2;
>
> groups = [group1, group2];
> names = {'gp1','gp1','gp1','gp2'};
>
> [p,anovatab,stats] = anova1(groups, names);
>
>

Subject: Unbalanced ANOVA

From: Donn Shull

Date: 14 Aug, 2008 21:17:02

Message: 4 of 6

"Suman Seer" <supernova5271@yahoo.com> wrote in message
<g825ap$mkf$1@fred.mathworks.com>...
> Hi Donn,
>
> Thanks for your reply. This is how I have been using
> anova1 before but my question is, since the groups have
> unequal elements, is the anova1 test still valid or does
> one have to make any changes?
>
> Thanks.
> Hussain
>
>
>
> "Donn Shull" <donn.shull.no_spam@aetoolbox.com> wrote in
> message <g81tot$co6$1@fred.mathworks.com>...
> > "Suman Seer" <supernova5271@yahoo.com> wrote in message
> > <g81qpa$6tk$1@fred.mathworks.com>...
> > > Hello Everyone,
> > >
> > > I have been using anova1 till now to check for
> equality of
> > > means between groups with same number of elements.
But
> now
> > > my data has unequal number of elements in groups and I
> > > believe this is the case of Unbalanced ANOVA. I
havent
> > been
> > > able to figure out a way or function to handle this
> case?
> > > I would appreciate any help with this.
> > >
> > > Thanks
> > > Suman
> >
> > group1 = 1:3;
> > group2 = 2;
> >
> > groups = [group1, group2];
> > names = {'gp1','gp1','gp1','gp2'};
> >
> > [p,anovatab,stats] = anova1(groups, names);
> >
> >
>

Hi Hussain,

That question is beyond my area expertise. Perhaps someone
else can answer that. My guess is that since specifically
addresses how to use anova1 with unequal groups that it
would be valid. Anyone else?

Donn

Subject: Unbalanced ANOVA

From: Tom Lane

Date: 15 Aug, 2008 01:43:37

Message: 5 of 6

> Thanks for your reply. This is how I have been using
> anova1 before but my question is, since the groups have
> unequal elements, is the anova1 test still valid or does
> one have to make any changes?

Suman, anova1 accepts unbalanced data and handles that situation properly.

In contrast, you can't use unbalanced data with anova2 -- the input format
just doesn't permit it. Fortunately you can use anovan for unbalanced data
with two or more grouping variables.

-- Tom


Subject: Unbalanced ANOVA

From: Farah

Date: 29 May, 2009 11:41:01

Message: 6 of 6

Hi,

I'm new to MatLab and have come against the same problem as Suman. Only I have about 150 different groups, and the number of elements in each varies from 30 to 7000, with no two groups having the same number of elements necessarily. Also the values of the elements themselves are completely unrelated to each other (they are microarray probe log2ratios).
Anova1 is the test I need to do, but I don't quite understand how to apply the function for my case. Can anyone please show me some pointers? I've read Don's reply to Suman but I'm not clear on what it means.

Thanks!

"Tom Lane" <tlane@mathworks.com> wrote in message <g82n0a$eqr$1@fred.mathworks.com>...
> > Thanks for your reply. This is how I have been using
> > anova1 before but my question is, since the groups have
> > unequal elements, is the anova1 test still valid or does
> > one have to make any changes?
>
> Suman, anova1 accepts unbalanced data and handles that situation properly.
>
> In contrast, you can't use unbalanced data with anova2 -- the input format
> just doesn't permit it. Fortunately you can use anovan for unbalanced data
> with two or more grouping variables.
>
> -- Tom
>
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
unbalanced anova Farah 29 May, 2009 07:44:05
anova1 Farah 29 May, 2009 07:44:05
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com