% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eigen.R
\name{reproductive_values}
\alias{reproductive_values}
\title{Compute reproductive values}
\usage{
reproductive_values(A, tol = 1e-12, ensure_positive = TRUE)
}
\arguments{
\item{A}{A square numeric nonnegative matrix.}

\item{tol}{Numeric tolerance used for normalization/positivity checks.}

\item{ensure_positive}{Logical. If \code{TRUE}, attempts to orient the eigenvector so its
entries are mostly positive by flipping its sign if necessary.}
}
\value{
A numeric vector of length \code{nrow(A)} giving reproductive values, scaled so
  that \code{sum(v * w) = 1}.
}
\description{
Returns the reproductive value vector \code{v} for a square nonegative matrix \code{A}, defined as the
left eigenvector associated with the dominant eigenvalue (spectral radius). The vector is
normalized in the usual demographic way so that \code{sum(v * w) = 1}, where \code{w} is the
stable stage distribution returned by \code{\link{stable_stage}}.
}
\details{
For matrix population models with nonegative irreducible matrix, reproductive values are strictly
positive (up to scaling).
}
\examples{
#irreducible example
A <- matrix(c(
  0, 1,
  0.5, 0
), nrow = 2, byrow = TRUE)

w <- stable_stage(A)
v <- reproductive_values(A)
v
sum(v * w)  # should be 1

}
\references{
Caswell, H. (2001). \emph{Matrix population models: construction, analysis and
interpretation} (2nd ed.). Sinauer.
}
