% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indicators_tobacco.R
\name{compute_tobacco_indicators}
\alias{compute_tobacco_indicators}
\title{Compute Tobacco Use Indicators}
\usage{
compute_tobacco_indicators(design)
}
\arguments{
\item{design}{A survey design object from \code{\link[=setup_survey_design]{setup_survey_design()}}.}
}
\value{
A named list of survey estimates. Each element contains proportion
estimates (as tibble with columns: estimate, lower, upper, etc.) for:
\itemize{
\item \code{current_tobacco_any_total/by_sex/by_age}: any current tobacco use
(smoking or smokeless) -- preferred headline variable
\item \code{current_tobacco_total/by_sex/by_age}: current tobacco smoking
\item \code{current_smoker_total/by_sex/by_age}: current smoker
\item \code{current_smokeless_total/by_sex/by_age}: current smokeless tobacco
\item \code{daily_tobacco_total/by_sex/by_age}: daily tobacco use
(only elements for variables present in design are returned)
}
}
\description{
Calculates prevalence of tobacco use from a survey design object.
Computes proportions of current and daily tobacco use, stratified by
sex and age group where available.
}
\details{
When both smoking and smokeless tobacco variables are present,
\code{current_tobacco_any} (either smoking or smokeless) is preferred
as the headline tobacco indicator.  The function also reports
\code{current_smoker} and \code{current_smokeless} separately if available.
}
\examples{
\donttest{
  test_data <- generate_test_data(n = 500, seed = 42)
  cols <- detect_steps_columns(test_data)
  clean <- clean_steps_data(test_data, cols)
  design <- setup_survey_design(clean)
  tobacco_results <- compute_tobacco_indicators(design)
}
}
\seealso{
\code{\link[=compute_all_indicators]{compute_all_indicators()}}
}
