Intended for healthcare professionals

Editorials

Mandatory data and code sharing for research published by The BMJ

BMJ 2024; 384 doi: https://doi.org/10.1136/bmj.q324 (Published 05 March 2024) Cite this as: BMJ 2024;384:q324
  1. Elizabeth Loder, head of research,
  2. Helen Macdonald, publication ethics and integrity editor,
  3. Theodora Bloom, executive editor,
  4. Kamran Abbasi, editor in chief
  1. The BMJ, London, UK
  1. Correspondence to: E Loder eloder{at}bmj.com

New policy requires authors to share analytic codes from all studies and data from all trials

The case for sharing data from clinical research is strong.12 Clinical study data include all information collected during a study, which is then analysed using computer codes to generate results. Unimpeded access to both data and code across the research community maximises the value of each research project. It shows respect for the efforts of research participants and the economic contributions of the public. It enables data scrutiny and re-analyses, which are essential for the self-correcting activities that contribute to good science and better patient and population outcomes.

Code sharing, in particular, makes it possible to evaluate analytical decisions that cannot easily be described in the methods section of a paper but have an important effect on results. It is plausible, for example, that requirements for code sharing might have deterred submission, or prevented publication of, the fraudulent Surgisphere papers published during the pandemic.3 Although there are practical challenges and potential harms associated with data sharing, we believe they are outweighed by the benefits. There are fewer such concerns when sharing code.

The BMJ is committed to transparency in research. In 2013, we required authors of drug and device trials published in the journal to agree to share relevant trial data on reasonable request.4 In 2015, this requirement was extended to all clinical trials published in the journal.5 Sadly, not all authors honoured this promise, and sharing of trial data remains disappointingly low.67 Barriers include the time and effort required to ensure that data are organised and useable, and fears among some researchers that competitors might gain unfair academic or commercial advantages or misuse or misinterpret the data.

It is time for the next step. From 1 May 2024, The BMJ will require authors of all submitted trials to post relevant trial data in an enduring, publicly accessible repository such as Vivli8 before publication. Repositories organise and store study data so that they can be retrieved and used by other researchers. We encourage authors of trials currently accepted for publication to voluntarily adhere to this policy. A link to the trial data will be included in the data sharing statement on every research paper published in The BMJ. Data sharing should not be confined to trials, and The BMJ intends to broaden its data sharing policy to non-trial research in future. But practical problems remain for observational studies and other non-trial research, such as permissions and privacy of data held in registries.

We will also require submission of relevant analytical code in a supplementary file that will be permanently accessible alongside each paper.9 Our new policy on code sharing applies to all research we publish, and a new code availability statement will be included in research papers. Other journals are moving in this direction as well. Springer Nature has announced a policy to require code availability statements in articles in its journals, and to encourage authors to share code publicly and cite code they have used.10

Details about this new policy, acceptable data repositories, and requirements for code sharing can be found on bmj.com in our advice to contributors (https://www.bmj.com/about-bmj/resources-authors/article-types). We hope that you will support us in enhancing transparency and scrutiny of medical research. It is important to put the public good ahead of personal, academic, and corporate interests. We welcome your views.

Footnotes

References