This github repo is currently a work in progress. Please contact DataScience@dhsc.gov.uk if you have any questions or ideas for improvements.
In the R folder, you will find quarto files with template code to run a basic consultation analysis. Feel free to run through these files as they are, or copy and paste out into your own scripts.
All code in the main branch is QA'd.
Active.
1st April 2026.
For reproducibility we give the lda functions a random seed. We recommend setting this to the long-form of a date relevant to the project, e.g. 20250102. This ensures that different projects are using different seeds, which has become an issue in random simulations. e.g. some projects had statistical quirks because almost every project was using one of "42", "1234", ... etc.
For best practise we would recommend using a second seed as a sensitivity analysis - asking whether the results are similar-enough if the seed is changed.
If in doubt on this section, consult statistics@DHSC.gov.uk
The outputs of this library should not be immediately published, but will likely go into the consultation response publication. It is important that individuals are not identifiable from the outputs.
Before publication, counts should be rounded to the nearest 5 and counts below 10 should be suppressed.
This should be considered within the context that a consultation is not a survey, and the outputs are not intended to be representative of the population.
Please note that the DHSCconsultations project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
All other content is © Crown copyright and available under the terms of the Open Government 3.0 licence, except where otherwise stated.