Designed to work with simulated individual trajectories of alcohol consumption - stratified by age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to the simulated sample of individuals to estimate their characteristics of single occasion drinking at each time step in the simulation.

AlcBinge_stapm(data, params = tobalcepi::binge_params_stapm)

Arguments

data

Data table of individual characteristics - the variables used are average weekly alcohol consumption, age, sex and IMD quintile.

params

List of four data tables - three containing coefficient estimates from Hill-McManus et al averaged by age category, sex and IMD quintile, and the fourth containing estimates of individual height and weight averaged by age category, sex and IMD quintile.

Value

Returns data plus the estimated variables.

Details

The coefficients used come originally from a study by Hill-McManus 2014, who analysed drinking occasions using data from detailed diaries in the National Diet and Nutrition Survey 2000/2001. Using the results, it possible to model each individual's expected number of drinking occasions across the year, the average amount they drunk on an occasion, the variability in the amount drunk among occasions, and how these vary socio-demographically.

To get these coefficients into a form in which they fit with the age, sex and IMD quintile stratification of the STAPM model required assigning them to a sample of Health Survey for England data (2011-2017) based on a full range of covariates, and then calculating weighted averages by age category, sex and IMD quintile.

This function is designed to be applied at each time step during a STAPM model run.

Examples


if (FALSE) {

# Simulate individual data

# Using the parameters for the Gamma distribution from Kehoe et al. 2012
n <- 1e3
grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03)

data <- data.table(
  weekmean = grams_ethanol_day * 7 / 8,
  age = rpois(n, 30),
  sex = sample(x = c("Male", "Female"), size = n, replace = T),
  imd_quintile = "5_most_deprived"
)

test_data <- AlcBinge_stapm(data)
}