Question: How to make batch univariate cox analysis for list
0
gravatar for BioLite
5 weeks ago by
BioLite20
BioLite20 wrote:

I have been trying to make batch univariate cox analysis with apply family and for loops, but I can't edit useful and effective codes. Please, please help me!

I have prepared two kinds of data. Data A, "data_train_list" is a list comprising many data frames. And each column elements in every data frame will serve as independent variables in my codes. Data B, "os_train_list" also is a list including data with data frames. And each data frame in this list will serve as the response variable.

Here are my codes,

    for (i in 1:length(data_train_list)) {comb_resBM[[i]]=apply(data_train_list[[i]],2,FUN = function(x){
  coxph(Surv(os_train_list[[i]]$time,os_train_list[[i]]$status)~.,data = data_train_list[[i]] )
})}

I hope finally codes can analyze correctly and effectively, because the data in the analysis is huge actually.

Thanks in advance!

ADD COMMENTlink modified 5 weeks ago by Kevin Blighe46k • written 5 weeks ago by BioLite20
2
gravatar for Kevin Blighe
5 weeks ago by
Kevin Blighe46k
Kevin Blighe46k wrote:

My Bioconductor package, RegParallel, will do this for you, i.e., it can test each gene independently in a Cox proportional hazards regression model and generate a neat output table for you (and process the variables via parallel processing). See if you can understand how to use it from the vignette (see section 3.4: 3.4 Survival analysis via Cox Proportional Hazards regression

Kevin

ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by Kevin Blighe46k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1607 users visited in the last hour