% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sex_ratio.r
\name{sex_ratio}
\alias{sex_ratio}
\title{Sex ratio}
\usage{
sex_ratio(
  mTATB,
  GSA,
  country,
  depth_range,
  stratas,
  stratification,
  wd = NA,
  save = TRUE,
  verbose = FALSE
)
}
\arguments{
\item{mTATB}{data frame of the merged TA and TB}

\item{GSA}{reference GSA for the analysis}

\item{country}{vector of reference countries for the analysis}

\item{depth_range}{range of depth strata to perform the analysis (min, max)}

\item{stratas}{data frame of the reference strata for the study area}

\item{stratification}{data frame of strata surface area}

\item{wd}{working directory}

\item{save}{boolean. If TRUE the plot is saved in the user defined working directory (wd)}

\item{verbose}{boolean. If TRUE a message is printed}
}
\value{
A \code{data.frame} containing the sex ratio statistics by year and stratum.
}
\description{
Assesses the proportion of sexes within the population, providing
critical information on demographic structure, reproductive potential,
and stock resilience.
}
\examples{
data(TA)
data(TB)
# Create a merged dataset for GSA 10
mTATB <- merge_TATB(TA[TA$AREA==10,], TB[TB$AREA==10,], "MERLMER")
sex_ratio(mTATB, GSA=10, country="all", depth_range=c(10,800),
          stratas=BioIndex::strata_scheme,
          stratification=BioIndex::stratification, wd=tempdir(), save=FALSE)
}
\author{
Walter Zupa \email{zupa@fondazionecoispa.org}
}
