>
> Hi, Mark:
> Thanks again, here comes more questions :)
>
> I got the example from one of the threads here, the original post was:
>
> library(limma)
> fit<-lmFit(exFirma[,6:ncol(exFirma)], model.matrix(~
> your.class.variable))
> fit<-eBayes(fit)
>
> I thought I should be ok to define the design , then fit to it. Am I wrong?


Sabrina.

My point is about parameterization.  So, if you have:

design1 <- cbind(Grp1=1,Grp2=c(0,0,0,0,0,1,1,1,1))
fit1 <- lmFit(data, design1)

design2 <- cbind(Grp1=c(1,1,1,1,1,0,0,0,0),Grp2=c(0,0,0,0,0,1,1,1,1))
fit2 <- lmFit(data, design2)

... 'fit1' and 'fit2' are fitting different parameterizations and if you
were looking for differences between Grp1 and Grp2, you'd have to go about
it differently, depending on which you use.  I'll leave it as an exercise
to the reader as to how these differ -- see the limma user guide or a
textbook that covers linear models.



> Or if I want to use model.matrix, which variable should I use
> in terms of firmaScore? I am bit confused. . I also looked at LIMMA
userguide, so I figured maybe I can do this:
>
> contrast.matrix<-makeContrasts(group1-group2,levels=design)
> fit2<- contrasts.fit(fit,contrast.matrix)
> fit2<-eBayes(fit2)
> x2<-topTable(fit2)
>
>
> but when I ran it, it gave me warning as follows:
>
> Warning message:
> In contrasts.fit(fit, contrast.matrix) :
>   row names of contrasts don't match col names of coefficients
>
>
> Can you tell me what I did wrong here?


I think the safest bet is to use the example I posted awhile ago. 
Something like:

library(limma)

# below for 'cls' assumes you have 5 samples of 'A',
# 4 samples of 'B' and you are interested where
# they are different
cls <- c("A","A","A","A","A","B","B","B","B")

mm <- model.matrix(~cls)

fit <- lmFit(exFirma[,6:ncol(exFirma)], mm)
fit <- eBayes(fit)

topTable(fit,coef=2)

Hope that helps.
Mark



>
>
>> Careful here as to what you are fitting and testing with limma.  You  
are fitting a parameterization that would require a contrast to be fit

>> ( ... such as 'contrasts.fit' ... ) in order to assess the differences

>> between your 2 groups.  Did you get this example from a web page or a  
thread somewhere?  If so, I should correct it.
>> Probably what you want is:
>> design <- cbind(Grp1=1,Grp2=c(0,0,0,0,0,1,1,1,1))
>> ...
>> topTable(fit,coef=2)
>> Under this parameterization, setting coef=2 will test the difference  
between the 2 groups.  Note that topTable by default gives the top 10  
values, regardless of statistics.
>> Does that make sense?
>> > However I only got about 10 IDs with all of which adjusted P values
as
>> > 1. I wonder if there is anything I did wrong here. Also when I
checked
>> > the IDs back to Affymetrix annotation file, I could only find one
match, I wonder what went wrong.
>> How exactly did you match them back?
>
>
> once I got x as the topTable, I used exFirma[x$ID,] to see what are the
top lists, it showed me ID with unitName and Group Name. So I did
manually, using unitName to find a match in AffyAnnotation file. Or
should I use GroupName instead? One other problem is that Excel only can
not display all rows of the annotation file, so some of them I can't not
search. Is there any easy way to do it in R and display it in R?  I
usually use Matlab, so I am very unfamiliar with R.
>
> Thank you so much!
>
> Sabrina
>
>
> >
>





--~--~---------~--~----~------------~-------~--~----~
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group.
To post to this group, send email to aroma-affymetrix@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/aroma-affymetrix?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to