% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test_data.R
\name{generate_test_data}
\alias{generate_test_data}
\title{Generate simulated STEPS test data}
\usage{
generate_test_data(n = 3000, seed = 42)
}
\arguments{
\item{n}{Number of observations (default 3000).}

\item{seed}{Random seed for reproducibility (default 42).}
}
\value{
A data frame with \code{n} rows and the following columns:
\itemize{
\item \code{stratum}: Strata identifier (S1-S5)
\item \code{psu}: Primary sampling unit (PSU1-PSU40)
\item \code{wt_final}: Final analysis weight
\item \code{sex}: Sex (1=Male, 2=Female)
\item \code{age}: Age in years (18-69)
\item Step 1 (behavioural): \code{t1}, \code{t2} (tobacco), \code{a1}, \code{a5} (alcohol),
\code{met_total} (physical activity), \code{d1}-\code{d4} (diet)
\item Step 2 (physical): \code{m1} (height), \code{m2} (weight), \code{m3} (waist),
\code{b1}-\code{b6} (blood pressure), \code{b7} (BP medication)
\item Step 3 (biochemical): \code{c1_mmol} (glucose), \code{c5} (DM meds),
\code{c6} (cholesterol), \code{c10} (cholesterol meds)
}
}
\description{
Creates a realistic simulated dataset matching WHO STEPS survey structure.
Includes sampling design variables, demographics, and measures from all
three steps (behavioural, physical, biochemical).
}
\details{
Simulation parameters are realistic for low-middle income settings:
\itemize{
\item Tobacco prevalence: 32\% males, 8\% females
\item Alcohol current use: 55\% males, 28\% females
\item Heavy episodic drinking: 35\% of drinkers
\item Physical activity: MET-minutes/week, mean 1800, SD 1200
\item Diet: Fruit/veg days and servings per day (0-7, 1-5)
\item BP increases with age; medication prevalence 12\%
\item Glucose: mean 5.2 mmol/L, increases with age
\item Total cholesterol: mean 4.8 mmol/L
}

Use this function for:
\itemize{
\item Testing the STEPS pipeline
\item Developing reports before real data arrives
\item Training analysts on the analysis system
}
}
\examples{
\donttest{
  # Generate smaller dataset for quick testing
  test_data <- generate_test_data(n = 500, seed = 123)
  head(test_data)
}

}
