[BioC] limma question: lmFit with continuous predictor

Joubert, Bonnie (NIH/NIEHS) [E] bonnie.joubert at nih.gov
Sat Jul 9 19:07:11 CEST 2011


Hi Gordon,
Thank you.  The issue was due to missing values.  I included model.frame in my model.matrix statement to retain the missing values and then na.action=na.exclude later for the model.
I have a related question to limma .  I would like to run a logistic model with my data where I have a dichotomous outcome and the predictor variables are the methylation values (exprs(mldat)).  LmFit is for a linear model only.  Is there a related package for performing logistic regression?

Thanks,
Bonnie
________________________________________
From: Gordon K Smyth [smyth at wehi.EDU.AU]
Sent: Saturday, July 09, 2011 6:19 AM
To: Joubert, Bonnie (NIH/NIEHS) [E]
Cc: Bioconductor mailing list
Subject: limma question: lmFit with continuous predictor

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:6}}



More information about the Bioconductor mailing list