opensafely / ics-research

This is the code and configuration for our paper, Inhaled corticosteroid use and risk COVID-19 related death among 966,461 patients with COPD or asthma
https://opensafely.org
0 stars 1 forks source link

Declare Stata dependencies in a do-file #110

Closed remlapmot closed 4 years ago

remlapmot commented 4 years ago

I think you are using at least 2 user-written Stata commands evalues and datacheck.

Maybe you should include a do-file which installs these user-written Stata dependencies. You have a few ssc install datacheck commands commented out in your code. The Stata github package suggests ado-file package authors include a dependency.do file. So yours would need at least:

ssc install evalue
scc install datacheck

Maybe this would need to be run before you submit your analysis to your database - as I'm not sure if that has internet access. Or maybe you just need to comment in the README, run this do-file before submitting the analysis.

In the previous OpenSAFELY analysis I think you included the user-writen ado-files in the repo, and here you've done that for datacheck but not for evalue.

Also in Stata for even fuller reproducibility people would write at the top of their do-files

version #

where is # is whatever you used. In Stata see help version for more info.

annaschultze commented 4 years ago

Thanks for this, good points and suggestions to improve the reproducibility of the analyses. You're right we cannot run ssc install on our database as this does not have internet access, which is why these are commented out. I'll make this clear in the README (and we'll update the README templates for future studies to reflect this). I'll also add the required ado for evalue the repo, apologies for missing this.

I'll be uploading a number of updates to my programs over the coming weeks and will add the Stata version in my do file headers as part of this. Thanks again!

remlapmot commented 4 years ago

Thanks indeed.