compute_auditc_score: Compute the AUDIT-C score

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Compute the traditional AUDIT-C score from Extended AUDIT-C data

Usage

1
2
3
4
5
compute_auditc_score(
  x,
  audit_coefficients = default_coefficients,
  zero_if_never_drinks = FALSE
)

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)

zero_if_never_drinks

a boolean indicating whether an AUDIT-C score of zero should be given by default if AUDIT-1 = 'Never'. Default is FALSE.

Value

a vector of AUDIT-C score between 0 and 12.

Examples

1
2
3
4
5
compute_auditc_score(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.