% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/epi_quantities.R
\name{final_size}
\alias{final_size}
\title{Final epidemic size under the vanishing-seed regime}
\usage{
final_size(params, f, m_grid = NULL, tol = 1e-10)
}
\arguments{
\item{params}{A \code{"seair_params"} object.}

\item{f}{A mobility density, either a function on \eqn{[0,1]} or a
numeric vector of values on \code{m_grid}.}

\item{m_grid}{Optional mobility grid used when \code{f} is numeric,
or to evaluate the integrals (default: uniform grid of 201 points).}

\item{tol}{Tolerance for \code{\link{uniroot}}.}
}
\value{
A list with \code{R_inf} (total final size),
  \code{MR_inf} (first moment), \code{R0} (basic reproduction
  number), and \code{converged} (logical).
}
\description{
Solves the scalar fixed-point equation
\deqn{M_R^\infty \;=\; \int_0^1 m f(m)\,(1 - e^{-\beta c M_R^\infty m})\,dm}
for the first mobility moment of the recovered compartment at the
end of the epidemic (with \eqn{I_0 \equiv 0}, \eqn{R_0 \equiv 0},
\eqn{S_0 = f}), and returns the total final epidemic size
\deqn{R_\infty \;=\; 1 - \int_0^1 f(m)\,e^{-\beta c M_R^\infty m}\,dm.}
When the basic reproduction number is less than or equal to one,
the function returns \eqn{R_\infty = 0}.
}
\examples{
pars <- seair_params(beta = 1.5, sigma = 0.3, kappa = 0.2,
                     gamma_A = 0.1, gamma_I = 0.13,
                     alpha = 0.5, delta = 0.3)
f <- function(m) 6 * m * (1 - m)
final_size(pars, f)

}
