Cox Regression in DataSHIELD

I found the paper above and wondered if someone of you has already looked at this if it might be useable in DataSHIELD?

Best wishes, Daniela

Hi Daniela,

A team in IKNL (the Nederlands Cancer Registry) implemented this algorithm in their infrustructure ( and presented last year in the DataSHIELD workshop.

We haven’t looked into the details of the algorithm yet to check if it can be implemented in DataSHIELD but we should do it soon. Also, we should develop a function for study-level meta analysis of Cox regression.


I also remember the presentation at last years workshop - the slides are available via the DS website although I’m not sure if the one about Cox is actually there. Also, I think @Gijs is on the forum so he might have more knowledge about that.

With respect to Cox survival analysis in DataSHIELD, my understanding is that @paularaissa and @rcamacho have been working on this (or have it very imminently on their work list) at INESC TEC as part of the RECAP-Preterm project (and possibly also as part of the EUCAN-Connect project??). It’s probably also worth them commenting on this thread.



Hi Andrei

Apologies, these mails go to a separate folder and I don’t check that too often.

Yes, we have an implementation but it has not been dataSHIELD-ized. Paul is concerned that the algorithm shares the failure times per site, we think this is acceptable for most use cases, but it is something to consider.

Like I indicated during the September: we are happy to help, but please let us know how.



Hi, The Cox regression is in our work list. Since there is the implementation from IKNL, I’m looking into the details if it can be implemented in DataSHIELD. I have started a test with code adaptation. Considering that this task is important in RECAP project, so please let us know if we could work together and adapt the IKNL code.

Dear all,

I recently joined Daniela’s team and am interested to work on this :slight_smile: Are you all still actively working on this project and do you have any interesting updates or findings? I am new to this area but I am also willing to help if needed!


Hi Kevin,

My colleague Soumya (who will join the forum soon) has been working on a Study Level Meta Analysis version of fitting Cox models. This is not as technical as some of the solutions mentioned above where I think the aim is to fit a single model across distributed studies. But it is still quite a challenge to get in place. In summary the idea is to allow Cox models to be fitted at each study, and then meta analyse the results.

Best wishes


Dear Kevin,

Thank you so much for your message!

As Tom mentioned, we are currently working on a study level meta-analysis of survival models/Cox regression. We will be in touch soon with more news on that front.

Thanks a lot again! Kind regards Soumya Banerjee

Dear all, I am Ghislain, new on DataSHIELD and working in Daniela’s team. I am writing a function which allows the cox model to be fitted in each studies and performing a meta analysis (SLMA) of their individual matrices. Since most are working on a similar topic, could anyone please know which of the coxph outputs are considered disclosive?

Thanks in advance and i look foward to collaborate.

Regards, Ghislain

Dear Ghislain, Thank you for your email and for your interest in this topic.

We have been working on a first draft implementation of survival models. This should get integrated into DataSHIELD in the next release.

I can point you to these draft implementations and some of the functions here:

  1. Functions to create survival objects:

Links to create survival models follow in my next email (discourse will only allow 2 links per email message for me).

Thanks and regards Soumya

Dear Ghislain,

Here are the other links for creating survival models

  1. Functions to create survival models using these survival objects:

Please let me know if you have any questions and we are happy to help. Thanks and regards Soumya Banerjee

Dear Soumya,

Thank you for sharing. I do think returning the summary(cxph_serverside) of your coxphSLMADS functionn could contain some disclosive information like the number of events.

I have this error " 'ds.Surv 'is not an object exported by ‘namespace: dsBaseClient’ " which i can not figure out from your ds.Surv function. Could you please check also on that?

find below my draft implementation

Dear Ghislain, Thank you for your response.

Could you please share some additional details on the error message and the environment you are using? For example, I am using the dstesting100 virtual machine.

Also did you get this error message after compiling the package dsBaseClient?

Could you try cleaning and rebuilding the package from my source for dsBase and dsBaseClient (branch absolute_newbie)

I usually get this error message if the NAMESPACE file does not have


Thanks a lot again.

Kind regards Soumya

Here are pointers to my repository on github:



discourse will not allow me to post links so please prefix these with the full URL

https github com

Dear Soumya, yes i also used the dstesting100 virtual machines. I think the problem is the ‘ds.Surv’ function which (for now) is not yet part of the dsBaseClient packages, so datashield doesn’t recognizes it as a NAMESPACE exported object. This means in other words that it can only be called up in the server-side. Well, deleting it returns the expected output ‘NULL’(see attached images opal 1 & 2). Also i added ‘dsBase::’ to listDisclosureSettings on the server for the checks. Opal1


Dear Ghislain, Thank you for your response.

Could you also:

  1. clone my dsBaseClient repository from the link above
  2. In R Studio open dsBaseClient as a package
  3. Click on Build -> Build source package
  4. Click on Build -> Install and restart

Could you also please ensure that if you click on:

  1. Build -> Configure build tools -> Build tools

     a) The generate documentation with roxygen is checked 
     b) If you click on configure, use roxygen to generate NAMESPCAE file is checked

Please find attached screenshots for these (I hope discourse will not remove these attachments).

This will install my version of dsBaseClient on your local environment.

If you then call dsBaseClient::ds.Surv() that should go through.

Best of luck.


Dear Soumya,

Yes it works. Also from the output of your ds.coxph, returning the summary statistics like the number of events/censoring could be disclosive because it can be used to infer the values of the study participants. You can have a look on this section of the DataSHIELD wiki documentation.

What do you think?

Best regards, Ghislain

Dear Ghislain,

Thank you so much. I am glad to know that this works for you.

Thank you so much also for all your comments on the disclosure checks. I will get back to you on this.

Kind regards


Dear Soumya,

I was able to surpress some output like the censoring in my SurvDS function. Do have any update with your functions? Also is it already integrated into DataSHIELD new release?