My attempt is to define a survival analysis model from a case-cohort study, where a subcohort is initially selected randomly. Later on, all cases from the entire cohort are added non-randomly to the subcohort. In my case, the goal is to estimate whether molecules measured in blood could serve as biomarkers for cardiovascular disease. I am working with the survival package in R, specifically using the cch function. I have observed random effects in classical Cox regression models here , here

The issue arises from the experimental analysis, where the dendrogram revealed an anomaly in one specific batch, requiring further adjustment. Until now, I have primarily worked with longitudinal models, which have allowed me to determine and specify random effects.

I am curious if it's possible to incorporate random effects into Cox regression, particularly using the cch function. While exploring information on Cross-Validated, I found limited threads discussing cch. I haven't found though, an argument contained in the function letting random effects to be included Conceptually, if I'm artificially or voluntarily adding cases to the subcohort, would it be appropriate to determine random effects? From my understanding, this is not a random occurrence, but rather a specific effect to be determined.

If not possible to include it as random effect, do you think is plausible to include it as covariable, considering just the subcohort size of 240 and proven batch effect around 10 samples

The model I attempt to execute:

# The model without batch or box effect being
# tocoro: time to event or censoring
# iam: event (acute infarction)
# edat: age
# sexe: sex
# hsamir985p: covariate of interest

Surv(tocoro, iam) ~ edat + sexe +  hsamir985p

# Including the box
Surv(tocoro, iam) ~ edat + sexe +  hsamir985p + box


From the hierarchical analysis done to establish if there are different clusters according batch or box, the results showed one box or batch with lower quality of DNA, which was clustered apart. I refer to hsamir985p among other biomarkers, but yes, this is the variable affected. This batch or box effect is what I am trying to smooth. Not sure what you refer to make them comparable? To establish like a regression and then include the results from problematic box?? Regarding cases and controls, I have 194 controls and 52 cases = iam, acute myocardial infarction


Clusters made with data normalized using TMM. Clustering method is Ward.D2 with correlation distances. This is what is reported in hierarchical analysis, because this service was externalized. Apart from the clustering analysis quality of sample and available volume were the inconveniences

Considering the context:

First it is impossible because they're already analyzed, and even if we don't know they would have been different in terms of hsamir985p values, but we know for sure, samples in this box have lower counts and lower volume. Due to the impossibility of analyze them again, a correction factor for calibration curve among batches is not a possibility. Guess this is your aimed suggestion, as adding a constant in a linear regression

Second, it was the adjustemet I have made, but doubts arose about using this 2-level factor as a covariate. Third, it is the same of second but more sophisticated, because I have 5 boxes, so instead 2-level factor, 5 levels according the number of batches.

I will try to model using the different formats, but what I don't fully know is how the argument stratum behaves, and if it does way different from an usual covariate, as mentioned before. I could also distinguish that in different threads, it is used strata, while cch function works with stratum. Are both the same?


I answer my own question. The two options, passing the batch (named box ) as covariate or as a stratum differ in the statistic results (not pasted)

#formula 1: box as covariate

cch(Surv(tocoro, iam) ~ edat + sexe + hdldir + imc + trigli + box + hsamir985p, data = dat2, subcoh =  ~ casecohort2, id = ~parti, cohort.size = 5404, method = "LinYing", robust = TRUE, stratum = ~ box)

#formula 2: box as stratum

cch(formula = Surv(tocoro, iam) ~ edat + sexe + hdldir + imc + trigli +  hsamir985p , data = dat2, subcoh = ~casecohort2, id = ~parti, 
    stratum = ~box, cohort.size = 5404, method = "LinYing", robust = TRUE)

[1] "01" "02" "03" "04" "05"

  • $\begingroup$ When you say "an anomaly in one specific batch, requiring further adjustment," do you mean a batch of measurements of hsamir985p or something else? If it's in measurements of hsamir985p, was it possible to adjust the measurements to make them comparable to other measurement batches? How many total cases and events (iam) were there? Please provide this information by editing the question, as comments are easy to overlook and can be deleted. $\endgroup$
    – EdM
    Commented Apr 5 at 17:40

1 Answer 1


The best way to deal with this type of problem is to have known internal standards in each analysis batch so that the measurements of hsamir985p (or whatever other micro RNA or mRNA might be of interest) can be put onto a scale that is comparable across batches. If you want to put this type of measurement into practical use for prognostication, you are going to need reliable, calibrated measurements to plug into your prognostication formula.

If that wasn't done, there are a few things you could try.

First, if there are RNA species that you know shouldn't be systematically different among individuals, you might use their batch differences to provide a calibration curve to put all measurements on the same scale.

Second, if you are confident that all analysis batches other than the one in question are comparable, you could just incorporate a single fixed 2-level factor in your model, representing whether or not the RNA analysis was from the questionable batch. That could be used in an interaction with the hsamir985p values, or used to set up separate strata based on the analysis batch. The cch() function does allow for strata.

Third, if you think that all analysis batches right be different, you could extend the second suggestion to include all analysis batches in a multi-level factor. I would not recommend treating batch as a "random effect" in your case (even if that would be possible with cch()), as that imposes a Gaussian or some other smooth distribution on the random effects that would not be suitable when there is only 1 batch that is a marked outlier.


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.