% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter14_multiple_decrement.R
\name{Abarxj_md}
\alias{Abarxj_md}
\title{Continuous multiple-decrement insurance APV \eqn{\overline{A}_{x}^{(j)}}}
\usage{
Abarxj_md(t, ptau, muj, delta, benefit = 1)
}
\arguments{
\item{t}{Numeric vector of time points.}

\item{ptau}{Numeric vector of values \eqn{{}_{t}p_{x}^{(\tau)}}.}

\item{muj}{Numeric vector of values \eqn{\mu_{x+t}^{(j)}}.}

\item{delta}{Force of interest.}

\item{benefit}{Benefit amount payable on decrement by Cause \eqn{j}.}
}
\value{
A numeric scalar.
}
\description{
Computes the actuarial present value of a benefit payable at the moment of
decrement by Cause \eqn{j}, matching Equation (14.4) in Chapter 14.
}
\details{
The integral is evaluated numerically by the trapezoidal rule:
\deqn{
\overline{A}_{x}^{(j)} = \int_0^T v^t {}_{t}p_{x}^{(\tau)} \mu_{x+t}^{(j)} dt
}
}
\examples{
t <- seq(0, 20, by = 0.01)
ptau <- exp(-0.012 * t)
mu_ac <- rep(0.002, length(t))
Abarxj_md(t, ptau, mu_ac, delta = 0.05, benefit = 2000)

}
