% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hormone_markers.R
\name{hormone_markers}
\alias{hormone_markers}
\title{Compute a suite of hormone ratio markers with QA and verbose summaries}
\usage{
hormone_markers(
  data,
  col_map = NULL,
  na_action = c("keep", "omit", "error", "warn", "ignore"),
  na_warn_prop = 0.2,
  verbose = TRUE
)
}
\arguments{
\item{data}{Data frame or tibble with mapped hormone inputs.}

\item{col_map}{Named list mapping the required keys to column names:
total_testosterone, SHBG, LH, FSH, estradiol, progesterone, free_T3, free_T4,
aldosterone, renin, insulin, glucagon, GH, IGF1, prolactin, cortisol_0, cortisol_30.}

\item{na_action}{One of \code{c("keep","omit","error","warn","ignore")}. \code{"keep"}/\code{"ignore"} leave NAs;
\code{"omit"} drops rows with any NA in used inputs; \code{"error"} aborts;
\code{"warn"} also warns about high missingness.}

\item{na_warn_prop}{Proportion in \eqn{[0,1]} for high-missingness warnings
when \code{na_action = "warn"}. Default 0.2.}

\item{verbose}{Logical; if \code{TRUE} (default), prints column mapping, input
availability, inference notes, physiological range information
(informational only, values not altered), computing markers, and a
per-column results summary.}
}
\value{
Tibble with one column per computable ratio. If an ID column is
detected in \code{data} (e.g. \code{id}, \code{IID}, \code{participant_id}), it is prepended
as the first output column.
}
\description{
Ratios computed:
\itemize{
\item FAI = (total_testosterone / SHBG) * 100
\item LH_FSH = LH / FSH
\item E2_P = estradiol / progesterone
\item T3_T4 = free_T3 / free_T4
\item ARR = aldosterone / renin
\item Ins_Glu = insulin / glucagon
\item GH_IGF1 = GH / IGF1
\item PRL_T = prolactin / total_testosterone
\item CAR_slope = (cortisol_30 - cortisol_0) / 30
}
}
\details{
Some inputs may be inferred when missing (for example, \code{free_T3} from
\code{TSH} + \code{free_T4}, or \code{GH} from \code{IGF1}) using internal heuristics. These
inferred values are intended for exploratory feature engineering only and
must not be treated as clinical substitutes for directly measured assays.
Ratios such as FAI, ARR, and CAR_slope have established literature usage;
several other outputs are simple arithmetic composites included for
feature-engineering convenience and may not have a single canonical
derivation paper.
}
\examples{
df <- data.frame(
  TT = c(15, 12), SHBG = c(40, 35), LH = c(5, 6), FSH = c(4, 5),
  E2 = c(100, 120), Prog = c(0.5, 0.6), fT3 = c(4.5, 4.2),
  fT4 = c(15, 14), Aldo = c(200, 180), Renin = c(10, 12),
  Ins = c(60, 70), Gluc = c(8, 9), GH = c(1.2, 1.0),
  IGF1 = c(180, 160), Prl = c(10, 12), Cort0 = c(400, 380),
  Cort30 = c(600, 580)
)
col_map <- list(
  total_testosterone = "TT", SHBG = "SHBG", LH = "LH", FSH = "FSH",
  estradiol = "E2", progesterone = "Prog", free_T3 = "fT3",
  free_T4 = "fT4", aldosterone = "Aldo", renin = "Renin",
  insulin = "Ins", glucagon = "Gluc", GH = "GH", IGF1 = "IGF1",
  prolactin = "Prl", cortisol_0 = "Cort0", cortisol_30 = "Cort30"
)
hormone_markers(df, col_map = col_map)
}
\references{
\insertRef{sowers2009fai}{HealthMarkers}
\insertRef{funder2016primaryaldosteronism}{HealthMarkers}
\insertRef{clow2004car}{HealthMarkers}
}
