limma design model for categorical variable
1
0
Entering edit mode
Jitendra ▴ 10
@nabiyogesh-11718
Last seen 8 minutes ago
United Kingdom

Hi all,

could anyone please help how to design model in limma for categorical variables association with methylation epic array data?

I am using below model but keep getting error; status is the categorical variable here;

#model matrix

var1<-model.matrix(~status + as.factor(sex) + Age +CD8T +CD4T +NK + Bcell +Mono+smoking + PC1 + PC2 + PC3, data=targets2)
fit1<-lmFit(mval,var1)


fit1<-eBayes(fit,trend=TRUE, robust=TRUE)

probe<-topTable(fit1,adjust="BH",coef=2,num=Inf)

sig.probe<-probe[which(probe$adj.P.Val<=0.05),]

Many thanks

DNAMethylation limmaGUI biostatistics limma • 232 views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

The error message would tell you what the problem is and hence how to fix it.

You haven't told us what the error message is or even which line of code produced the error. I doubt that the error has anything to do with having a categorical variable in the model.

ADD COMMENT
0
Entering edit mode

Thanks, this model previously working effectively when analyzing the association between continuous variables and DNA methylation. However, when attempting to assess the relationship with categorical variables, the script appears to hang indefinitely on the high-performance computing (HPC) system. In contrast, analyzing continuous variables only took approximately two hours to complete.

But will try again!

ADD REPLY
1
Entering edit mode

How many levels does status have? Please type table(status) and show the output.

What you are describing is not a limma error, but an issue with the size of the dataset and your computational resources, for example running out of memory.

Computation time in limma is determined by the size of the dataset (which you haven't described) and by the number of columns to the design matrix. For a given number of design matrix columns, computation time is unaffected by whether the original variables were continous or categorical. The problem has nothing to do with categorical vs continuous but simply the size of the fitted model

I note that you have posted several previous questions on this forum where you reported successfully fitting limma models to methylation data including categorical variables, so you must already know from your own experience that there's no particular problem with categorical variables. Your current model as several categories variables, not just status but also sex and probably smoking.

ADD REPLY
0
Entering edit mode

thanks, Gordon Smyth, it is sorted now. it was just a large sample size. above command work perfectly with both continue and categorical variable association analysis.

ADD REPLY

Login before adding your answer.

Traffic: 583 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6