> Date: Thu, 17 Apr 2014 09:26:33 +0200
> From: Riba Michela <riba.michela at="" gmail.com="">
> To: "James W. MacDonald" <jmacdon at="" uw.edu="">
> Cc: bioconductor at r-project.org
> Subject: Re: [BioC] limma modeling, paired samples and continuous
> variable
>
> Hi,
> thanks a lot for your kind answer.
> I have to specify an additional observation:
> the "r"parameter is indeed a numeric variable and also in this situation the result is the same.
Actually it is not possible to get the same message as before if you have correctly code r as a numeric variable.
> Would be reasonable to try and model the design as:
> design<- <- model.matrix(~0+r)
> #where "r"is a numeric variable?
>
> for the points about the coefficients I have to reason about
No.
To answer your question "if differential gene expression between two classes of disease are correlated with the r status", you probably need a Genotype:r iteraction term in your model.
You probably need to show us the whole targets frame for us to help you
further. In other words, we need to see:
data.frame(Genotype,Disease,r)
Best wishes
Gordon
Dear Riba,
Well, a couple of points.
First, if you want to treat Condition as numeric, then you must not declare it to be a factor. In R, a "factor" is a variable that is categorical instead of numeric.
Second, Condition is entirely confounded with Genotype in your experiment. Samples for the same Genotype always have the same Condition. For example, all samples of Genotype pt01 have Condition=0, all samples of Genotype
pt06 have Condition=0.5, and so on. Hence you cannot include Condition and Genotype in the same model, because they are giving the same information. If you adjust for Genotype in the model, then you have necessarily also adjusted for the Condition.
You need:
target<- readTargets("targetPTpGSp.txt") Genotype <- factor(target$Genotype) Disease<- factor(target$Disease) Condition <- target$Condition
Then can use either:
design <- model.matrix(~Genotype+Disease)
or
design <- mode.matrix(~Condition+Disease)
Best wishes
Gordon
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.