Thread Subject: setting up groups for anova1 -large for loop issue

Subject: setting up groups for anova1 -large for loop issue

From: Farah

Date: 1 Jun, 2009 07:02:02

Message: 1 of 2

I have to conduct anova1 on log2ratios (microarray) that I am binning in to various segments based on biological selection. I have managed to set this up though it was tedious to do. I basically have 89 segments some with only 30 elements and some with upwards of 5000. The value of each element is totally independent and usually different from all others.
The problem is constructing a 'group array' in order to do anova1 on my segments.
result=anova1(dataVector,groupVector)

Currently I am building a for loop, ie. specifying elements between which row numbers of the whole log2ratio file are to be categorized as group 1, group2 and so on.
But this means I have to manually type in 89 for-end loops.
Does anyone know an easier way to do this?
Any help would be much appreciated. Thanks!

Subject: setting up groups for anova1 -large for loop issue

From: Steven Lord

Date: 1 Jun, 2009 13:40:11

Message: 2 of 2


"Farah " <fr.rasheed@gmail.com> wrote in message
news:gvvuda$437$1@fred.mathworks.com...
>I have to conduct anova1 on log2ratios (microarray) that I am binning in to
>various segments based on biological selection. I have managed to set this
>up though it was tedious to do. I basically have 89 segments some with only
>30 elements and some with upwards of 5000. The value of each element is
>totally independent and usually different from all others.
> The problem is constructing a 'group array' in order to do anova1 on my
> segments.
> result=anova1(dataVector,groupVector)
>
> Currently I am building a for loop, ie. specifying elements between which
> row numbers of the whole log2ratio file are to be categorized as group 1,
> group2 and so on.
> But this means I have to manually type in 89 for-end loops.
> Does anyone know an easier way to do this?

Post a small sample of your code that shows how you generate your
groupVector. I'm willing to bet there's an easier way to do what you want
than 89 FOR-loops. [In particular, if you're generating 89 variables group1
through group89, there's DEFINITELY a better way -- see Q4.6 in the
newsgroup FAQ (http://matlabwiki.mathworks.com/MATLAB_FAQ) if that's what
you're doing.]

--
Steve Lord
slord@mathworks.com

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
anova1 Farah 1 Jun, 2009 03:04:02
for loop Farah 1 Jun, 2009 03:04:02
building vectors Farah 1 Jun, 2009 03:04:02
rssFeed for this Thread
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com