compute_ewac: Compute the EWAC

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Compute the Estimated Weekly Alcohol Consumption from Extended AUDIT-C data

Usage

1
compute_ewac(x, audit_coefficients = default_coefficients, uk_units = TRUE)

Arguments

x

a data frame or matrix with three character columns containing, in order:

audit1_label

a value in 'Never', 'Monthly or less', '2 to 4 times a month', '2 to 3 times a week', '4 to 5 times a week', '6 or more times a week'

audit2_label

a value in "1 to 2", "3 to 4", "5 to 6", "7 to 9", "10 to 12", "13 to 15", "16 or more"

audit3_label

a value in "Never", "Less than monthly", "Monthly", "Weekly", "Daily or almost daily"

audit_coefficients

a list of coefficients (default: default_coefficients)

uk_units

if TRUE (the default), the result is expressed in alcohol units (8g or 10mL of pure ethanol) per week. If FALSE, the result is expressed in grams per week.

Value

a numeric vector

Examples

1
2
3
4
5
compute_ewac(data.frame(list(
   audit1_label = "2 to 3 times a week",
   audit2_label = "1 to 2",
   audit3_label = "Monthly"
)))

peterdutey/ewac-resources documentation built on Dec. 22, 2021, 7:45 a.m.