% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/liver_fat_markers.R
\name{liver_fat_markers}
\alias{liver_fat_markers}
\title{Liver fat surrogates: HSI and NAFLD Liver Fat Score}
\usage{
liver_fat_markers(
  data,
  col_map = NULL,
  na_action = c("keep", "omit", "error", "ignore", "warn"),
  na_warn_prop = 0.2,
  verbose = TRUE
)
}
\arguments{
\item{data}{Data frame with needed columns (see col_map).}

\item{col_map}{Named list mapping:
\itemize{
\item Required for HSI: ALT, AST, BMI
\item Optional direct inputs: sex, diabetes, MetS, insulin
\item Optional to derive MetS or insulin: I0, waist, TG, HDL_c, sbp, bp_sys, bp_treated, glucose, G0
}}

\item{na_action}{One of c("keep","omit","error","ignore","warn").}

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

\item{verbose}{Logical; if TRUE, prints column mapping and computing messages.}
}
\value{
A tibble with columns HSI and NAFLD_LFS.
}
\description{
Computes:
\itemize{
\item HSI = 8 * (ALT/AST) + BMI + 2 (if female) + 2 (if diabetes)
\item NAFLD-LFS = -2.89 + 1.18\emph{MetS + 0.45}Type2DM + 0.15\emph{Insulin_u + 0.04}AST - 0.94*(AST/ALT)
}
}
\details{
Assumptions/units:
\itemize{
\item ALT, AST in U/L; BMI in kg/m^2.
\item \code{insulin} is expected in muU/mL; if unavailable and \code{I0} is provided,
\code{I0} is interpreted in pmol/L and converted to muU/mL via /6.
\item MetS is taken directly if provided; otherwise derived using a simplified
NCEP-ATP III style rule when sufficient inputs exist.
\item Type2DM is taken from \code{diabetes} (logical or 0/1).
}

These scores are surrogate indices for research/feature-engineering use and
are not validated as standalone clinical diagnostic tools.
}
\examples{
df <- data.frame(ALT=20, AST=25, BMI=27, sex="female", diabetes=FALSE, I0=60)
liver_fat_markers(
  df,
  col_map = list(ALT="ALT", AST="AST", BMI="BMI",
                 sex="sex", diabetes="diabetes", I0="I0")
)
}
\references{
\insertRef{lee2010hsi}{HealthMarkers}
\insertRef{kotronen2009nafldlfs}{HealthMarkers}
}
