% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multilife_ch12_ext.R
\name{multilife_contingent_probabilities}
\alias{multilife_contingent_probabilities}
\alias{tqxy1}
\alias{tqyx1}
\alias{tqxy2}
\alias{tqyx2}
\title{Contingent multi-life probabilities}
\usage{
tqxy1(x, y, n, tbl = NULL, model = NULL, ...)

tqyx1(x, y, n, tbl = NULL, model = NULL, ...)

tqxy2(x, y, n, tbl = NULL, model = NULL, ...)

tqyx2(x, y, n, tbl = NULL, model = NULL, ...)
}
\arguments{
\item{x}{Age of the first life. May be scalar or vector.}

\item{y}{Age of the second life. May be scalar or vector.}

\item{n}{Term in years. May be scalar or vector.}

\item{tbl}{Optional life table object retained for backward compatibility.
Continuous calculations currently require \code{model}.}

\item{model}{Parametric survival model.}

\item{...}{Additional parameters passed to the survival and hazard
functions.}
}
\value{
A numeric vector of contingent probabilities.
}
\description{
Computes probabilities associated with the order of death of two
independent lives over a specified term.
}
\details{
\code{tqxy1()} computes the probability that the first life dies before
the second life within \eqn{n} years.

\code{tqyx1()} computes the probability that the second life dies before
the first life within \eqn{n} years.

\code{tqxy2()} computes the probability that the first life dies after
the second life but within \eqn{n} years.

\code{tqyx2()} computes the probability that the second life dies after
the first life but within \eqn{n} years.

These functions require a parametric survival model because an annual
life table does not uniquely determine the within-year order of death
without an additional interpolation assumption.


All calculations assume the two future lifetimes are independent.

The probabilities are obtained by integrating the joint survival
function together with the appropriate force of mortality.

The four functions partition the probability that one of the two lives
dies within the specified term according to the order of death.
}
\examples{
tqxy1(
  40, 50,
  n = 10,
  model = "uniform",
  omega = 100
)

tqyx1(
  40, 50,
  n = 10,
  model = "uniform",
  omega = 100
)

tqxy2(
  40, 50,
  n = 10,
  model = "uniform",
  omega = 100
)

tqyx2(
  40, 50,
  n = 10,
  model = "uniform",
  omega = 100
)

}
