[BioC] limma question: lmFit with continuous predictor

Gordon K Smyth smyth at wehi.EDU.AU
Sat Jul 9 12:19:46 CEST 2011


Dear Bonnie,

limma has no difficulty with continuous predictors, but they are not 
permitted to include missing values.  Your continuousVar apparently 
contains missing values.

BTW, neither lmFit() nor model.matrix() have an argument 'na.action', so 
it has no effect in the calls you give below.

Best wishes
Gordon

> Date: Thu, 7 Jul 2011 10:58:59 -0400
> From: "Joubert, Bonnie (NIH/NIEHS) [E]" <bonnie.joubert at nih.gov>
> To: "bioconductor at stat.math.ethz.ch" <bioconductor at stat.math.ethz.ch>
> Subject: [BioC] limma question: lmFit with continuous predictor
>
> Hello,
>
> I am trying to evaluate the association between a continuous predictor 
> variable and array data using limma's lmFit.  I used the methyLumi 
> package to create an eset to manage the data from the Illumina Infinium 
> DNA methylation platform.  I am able to run a model if my 
> exposure/predictor variable is categorical but when it is continuous I 
> get an error.  I am wondering whether lmFit must be run with categorical 
> predictor variables only.  If so, do you recommend something else to 
> evaluate continuous predictor variables?
>
>
>
> #Using a continuous predictor variable:
> dm1 <- model.matrix(~continuousVar, model.frame(~continuousVar,data=pData(mldat),na.action=NULL))
>
> fit1 <- lmFit(exprs(mldat), dm1, na.action=na.exclude)
> Error in qr.default(x) : NA/NaN/Inf in foreign function call (arg 1)
>
>
> #Using a categorical predictor variable:
> dm2 <- model.matrix(~ Sex2, model.frame(~Sex2,data=pData(mldat), na.action=NULL))
>
> fit2 <- lmFit(exprs(mldat), dm2, na.action=na.exclude)
> #no error
>
> Thank you.
> Bonnie Joubert


______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list