% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decrement_ch13_ext.R
\name{nqxj_md}
\alias{nqxj_md}
\title{Cause-specific multiple-decrement probability from a table}
\usage{
nqxj_md(tbl, x, n, j)
}
\arguments{
\item{tbl}{A multiple-decrement table produced by \code{md_table()}.}

\item{x}{Starting age or duration. May be scalar or vector.}

\item{n}{Nonnegative integer term. May be scalar or vector.}

\item{j}{Positive integer cause index. May be scalar or vector.}
}
\value{
A numeric vector of cause-specific decrement probabilities.
}
\description{
Computes the probability of decrement from cause \code{j} within
\code{n} years:
\deqn{
{}_nq_x^{(j)}
=
\sum_{k=0}^{n-1}
{}_kp_x^{(\tau)}q_{x+k}^{(j)}.
}
}
\examples{
ages <- 45:50
qmat <- cbind(
  q1 = c(0.011, 0.012, 0.013, 0.014, 0.015, 0.016),
  q2 = rep(0.100, 6)
)
tbl <- md_table(ages, qmat, radix = 1000)

nqxj_md(tbl, x = 46, n = 2, j = 1)

}
