Designed to work with cross-sectional survey data with a wide range of individual-level covariates. Uses survey data and previously estimated coefficients to describe the patterns of single occasion drinking.

AlcBinge(data, params = tobalcepi::binge_params)

Arguments

data

Data table of individual characteristics.

params

List of three data tables containing the parameter estimates from Hill-McManus et al 2014, Tables 3, 5 and 6.

Value

Returns data plus the estimated variables.

Details

This is based on 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.

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,
  peakday = grams_ethanol_day / 8,
  age = rpois(n, 30),
  sex = sample(x = c("Male", "Female"), size = n, replace = T),
  income5cat = "1_lowest income",
  imd_quintile = "5_most_deprived",
  kids = "0",
  social_grade = "C2DE",
  eduend4cat = "16-18", # age finished education
  ethnicity_2cat = "white", # white / non-white
  employ2cat = "yes", # employed / not
  weight = rnorm(n, mean = 60, sd = 5), # weight in kg
  height = rnorm(n, mean = 1.7, sd = .1) # height in m
)

test_data <- AlcBinge(data)
}