% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scores_mh_famhx.R
\name{compute_famhx_endorsement}
\alias{compute_famhx_endorsement}
\title{Compute Family History [Parent] Endorsement indicator}
\usage{
compute_famhx_endorsement(data, name, var_matches, combine = TRUE)
}
\arguments{
\item{data}{tbl. Data frame containing the columns to be summarized.}

\item{name}{character. The name of the summary score.}

\item{var_matches}{character of length one. The base name of the checkbox
field that is used to find all corresponding columns in \code{data} that
contain the responses of a participant for the check box. This parameter
is passed onto \code{\link[ABCDscores]{combine_checkboxes}} function.}

\item{combine}{logical. Whether to combine the summary score column with the
input data frame (Default: TRUE).}
}
\value{
A tibble with the computed score for each participant/event.
}
\description{
Computes a binary endorsement indicator, for alcohol or drug use
computed using a set of variables.
Resulting indicator is either 0 (FALSE) or 1 (TRUE), and
\code{NA} for missing or non-responses (777, 888, or 999).
\itemize{
\item \emph{Notes:}
\itemize{
\item Following values are recoded as NA prior to any computation
\itemize{
\item 777
\item 888
\item 999
}
}
}
}
\examples{
\dontrun{
compute_famhx_endorsement(
  data = data,
  name = "mh_p_famhx__alc__fath_indicator",
  var_matches = "mh_p_famhx__alc__fath_001"
)
}
}
