I have a large dataset with 10,000+ individuals and many many biological features (>5000). And I want to use these features to build a linear model (e.g. elastic net) to predict their clinical outcome (e.g. time-to-death).

The problem is, these individuals can be further classified into many sub-groups (i.e. different diseases), and therefore it might not feasible to get a universal model to predict the time-to-death in all these patients. However, the aim is to predict the time-to-death of any new patients only based on these biological features.

Edit: there are "classification" information for each sample and the model works well in predicting inside of each class. However, the classification information here are fully imputed based on the biological features (as what I used to build the prediction model), with some human curation.

Therefore, I'm wondering if it is a good idea to train a two-steps model: First, build a classification model to predict which subtype the individual belongs to. And second, train multiple linear models for each subtype.

In this way, for any new patient, I can first run the classification model to get the probability/weight for each subtype and then predict the time-to-death using different linear models and weight the result based on step 1.

My question is, is this a good idea? If so, is there any reference for this method?

Thank you in advance!

  • $\begingroup$ Yes, this is a classic latent variable approach. $p(\text{TTD} \mid \text{patient}) = \sum_{\text{subtype}} p(\text{TTD} \mid \text{subtype} , \text{patient})p(\text{subtype}) \mid \text{patient})$ $\endgroup$ Apr 15, 2021 at 9:18
  • $\begingroup$ See also stats.stackexchange.com/questions/245902/… $\endgroup$
    – rep_ho
    Apr 15, 2021 at 11:51

1 Answer 1


My understanding is that this is best done with a combined model that evaluates together both the probability of class membership along with the associations of class membership and covariate values with outcome. Larssen (Biometrics 60: 85–92, 2004) developed such an approach with categorical predictors of class membership. You maximize the overall (partial) likelihood of the data combining both the class-membership model and the survival model. That avoids problems that can arise from a 2-step model and its fixed assignments of potentially highly uncertain class memberships. As a more recent example, Liu et al. (Computational Statistics and Data Analysis 91: 40–50, 2015) extended this to arbitrary predictors and individual longitudinal data in parametric Weibull models, and note why a combined approach is better than a 2-step model.

I don't know of any off-the-shelf programs to do this combined class/survival analysis, however. Also, I understand that these approaches require a pre-specification of the number of classes. There might be Bayesian approaches that would also model the number of classes, but that's far beyond my expertise.

Besides the general cautions expressed in the post on latent class models linked in a comment by @rep_ho, make sure that the way you try "to predict the time-to-death of any new patients only based on these biological features" makes biological and clinical sense. These sound like cancer outcome data together with tumor gene-expression data, but even if they are something else the following principles still hold.

Make sure that the "biological features" include all the associated critical clinical characteristics.

First, there presumably is clinical assessment of the "different diseases" at question. That clinical assessment should be a primary factor in class assignment. Tumors originating in the same organ can have well defined subtypes, as in breast and lung cancer. You might want to start by assessing how gene expression values are associated with these major clinical distinctions among tumor types.

Second, each type of cancer also has its own further breakdown into stages specifically related to outcome for that type of cancer. Ignoring that information (either the overall staging, or the factors that go into defining the stages) is done at your peril.

Third, the same type of cancer can be treated with different therapies. For example: primary therapy of surgery versus chemo (and/or radio) therapy, radiation and/or chemotherapy adjuvant to surgery, classic systemic chemotherapy versus therapy "targeted" against particular molecular aspects of a tumor versus more recent immunotherapies. There is no reason to expect that molecular characteristics of a tumor will have the same associations with outcome for different therapies received even in a single tumor type. You might need to examine interactions of your thousands of biological characteristics with therapy in terms of outcome.

If you are using an approach like elastic net, you might best be served by not penalizing the critical clinical variables, reserving your variable selection and penalization for the other markers like gene-expression values.

  • $\begingroup$ Hi EdM, thank you so much for your reply! The reference is really helpful. One thing I forgot to mention (now updated to the question) is that: the classification information in the dataset are fully imputed based on the biological features (as what I used to build the prediction model), with some human curation. In another word, if I just build different models for each class, I will be still unintentionally doing a 'two step model' with some mixture of human curation. That's why I want to do the clustering myself. $\endgroup$ Apr 19, 2021 at 9:40
  • $\begingroup$ Another thing I don't understand is that why this latent class approach is not popular? --considering that most (if not all) of real-life samples have underlying groups and heterogeneity. Does that mean this approach actually doesn't work well? $\endgroup$ Apr 19, 2021 at 9:51
  • $\begingroup$ @AlbertYing modeling based on knowledge of the subject matter is generally preferred to machine-learning methods whose results can difficult for humans to understand, particularly in clinical situations. If I were treating lung cancer, I would want a good model specific to types of lung cancer whether or not a related model worked for prognostication on colon cancer. In that sense, I think most clinicians would prefer a 2-step approach, distinguishing clinical/biological subclasses and then performing survival analysis within each class. $\endgroup$
    – EdM
    Apr 19, 2021 at 13:31
  • $\begingroup$ @AlbertYing latent-class analysis isn't "unpopular"; it has a long history in general. The question here is when it provides something useful beyond standard clinical information. Combining large numbers of cases with thousands of predictors, as with The Cancer Genome Atlas, is relatively new. Thus it's only been recently that one could envision mining large amounts of biological/clinical data to find latent classes that cut across clinical classes. How much machine learning will add to clinical categorization is the open question. $\endgroup$
    – EdM
    Apr 19, 2021 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.