Skip to content

Releases: stapm-platform/hseclean

1.14.7

27 Apr 15:34
459e88b

Choose a tag to compare

Add HSE 2022

1.14.6

04 Dec 14:15

Choose a tag to compare

Damon added EQ-5D domains for years where this is included in the Health Survey for England

  • 2003
  • 2006
  • 2008
  • 2010
  • 2011
  • 2012
  • 2014
  • 2017 (5L)
  • 2018 (3L and 5L)

1.14.5

01 Dec 18:36

Choose a tag to compare

Duncan edits to the imputation of years since quit for former smokers

introducing a 0 years since quit (previous min 1)
and imputing single years within categorical years since quit for years >=2015 based on distribution for years 2011-2014

1.14.4

10 Oct 14:56

Choose a tag to compare

Damon fixed bugs in the alc_weekmean_adult function that occur when processing Scottish or Welsh data

1.14.3

03 Oct 10:40

Choose a tag to compare

Damon edits to HSE 2019 alcohol processing code

1.14.2

30 Sep 08:41

Choose a tag to compare

Patch for alcohol consumption in HSE 2019
This patch presents updates to both the read_2019 and alc_weekmean_adult functions in hseclean to accommodate survey changes for alcohol consumption in HSE 2019.

In detail for read_2019, specific name changes have been made to bring the variables in line with 2018 and previous years. Also some alcohol consumption variables had a positive 98.0 entry to represent 'don't know' as an answer to some self-complete questions. This has been identified as an NA string and modified accordingly.

In detail for alc_weekmean_adult, HSE 2019 has changed the names of many of the variables and now records both normal-strength and strong beers in pints rather than half pints for the interview. In addition, the organisation of the wine questions has changed. Small changes have also been made to the drink type preferences (from proportion to percentage) and how NA values are dealt with in sums. Finally a new variable has been created (wine_only_units), to preserve this data when modifying wine_units to also include sherry_units when aggregating drink categories.

Specific summaries:
Survey year and country-specific logic updates:

Extended year_set2 to include 2019, allowing the function to process more recent data.
Adjusted logic for handling beer and strong beer quantities for England and Wales in 2019 and later, reflecting changes in survey formats (e.g., recording in pints instead of half-pints).
Data aggregation and robustness improvements:

Changed the calculation of beer_units and wine_units to use rowSums for NA protection and added logic to set these to NA if both component units are zero, improving data reliability.
Self-completion and interview question handling:

Moved and updated the handling of self-completion frequency questions for younger adults, including support for new variable names and logic for England 2019.
Data cleanup adjustments:

Commented out many lines that previously deleted intermediate variables, likely to facilitate debugging or further data processing.
Minor corrections and improvements:

Fixed a typo in a comment ("dont't know" → "don't know").

1.14.1

04 Sep 14:21

Choose a tag to compare

minor patch to NSW reading function filepath