% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bivariate_laplace_residual.R
\name{blt_residual}
\alias{blt_residual}
\title{Bivariate Laplace Transform of Residual Lives}
\usage{
blt_residual(
  s1,
  s2,
  t1 = 0,
  t2 = 0,
  surv_fn = NULL,
  k1 = 1,
  k2 = 1,
  theta = 0,
  upper = 50,
  star = FALSE
)
}
\arguments{
\item{s1, s2}{Positive Laplace parameters.}

\item{t1, t2}{Non-negative time thresholds (truncation ages).}

\item{surv_fn}{A function \code{function(x1, x2)} returning the joint
survival probability \eqn{\bar{F}(x_1, x_2)}.  Defaults to the
Gumbel bivariate exponential with \code{k1}, \code{k2}, \code{theta}.}

\item{k1, k2}{Rate parameters (used only when \code{surv_fn = NULL}).}

\item{theta}{Association parameter (used only when \code{surv_fn = NULL}).}

\item{upper}{Integration upper bound (default \code{50}).}

\item{star}{Logical; if \code{TRUE} returns the star version \eqn{L^*}.}
}
\value{
A named numeric vector with elements \code{L1} and \code{L2}
  (or \code{L1_star} and \code{L2_star} when \code{star = TRUE}).
}
\description{
Computes the bivariate Laplace transform of residual lives
\eqn{L_{X_{t_1|t_2}}(s_1)} and \eqn{L_{X_{t_2|t_1}}(s_2)} defined as
\deqn{L_{X_{t_1|t_2}}(s_1)
  = \frac{\int_{t_1}^{\infty} e^{-s_1 x_1}
    f(x_1 | X_2 > t_2)\,dx_1}{e^{-s_1 t_1} \bar{F}(t_1 | X_2 > t_2)}}
and analogously for the second component.

The *star* version (used for ordering) is
\deqn{L^*_{X_{t_1|t_2}}(s_1) = \frac{1 - L_{X_{t_1|t_2}}(s_1)}{s_1}
  = \frac{\int_{t_1}^{\infty} e^{-s_1 x_1}
    \bar{F}(x_1, t_2)}{e^{-s_1 t_1}\bar{F}(t_1,t_2)}\,dx_1.}
}
\examples{
# Gumbel bivariate exponential, default parameters
blt_residual(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5)

# Star version used in ordering
blt_residual(s1 = 0.5, s2 = 0.5, t1 = 1, t2 = 1, star = TRUE)

# User-supplied survival function (Schur-constant exponential)
surv <- function(x1, x2) exp(-(x1 + x2))
blt_residual(s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, surv_fn = surv)

}
\references{
Jayalekshmi S., Rajesh G., Nair N.U. (2022).
\doi{10.1080/03610926.2022.2085874}
}
\seealso{
\code{\link{blt_residual_gumbel}}, \code{\link{blt_order_residual}},
  \code{\link{np_blt_residual}}
}
