% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter14_multiple_decrement.R
\name{gain_loss_md}
\alias{gain_loss_md}
\title{Gain or loss in a two-cause multiple-decrement model}
\usage{
gain_loss_md(
  Vt,
  G,
  r,
  e,
  i,
  b1,
  b2,
  s1 = 0,
  s2 = 0,
  q1,
  q2,
  Vt1,
  year_end_cause2 = FALSE,
  q1prime = NULL,
  q2prime = NULL
)
}
\arguments{
\item{Vt}{Gross reserve at the beginning of the year.}

\item{G}{Gross premium.}

\item{r}{Percent-of-premium expense rate.}

\item{e}{Fixed beginning-of-year expense.}

\item{i}{Earned effective annual interest rate.}

\item{b1}{Cause 1 benefit.}

\item{b2}{Cause 2 benefit.}

\item{s1}{Cause 1 settlement expense.}

\item{s2}{Cause 2 settlement expense.}

\item{q1}{Cause 1 decrement probability.}

\item{q2}{Cause 2 decrement probability.}

\item{Vt1}{Gross reserve at the end of the year.}

\item{year_end_cause2}{Whether Cause 2 occurs only at year-end.}

\item{q1prime}{Single-decrement Cause 1 probability for the ordered case.}

\item{q2prime}{Single-decrement Cause 2 probability for the ordered case.}
}
\value{
A numeric vector of gains or losses.
}
\description{
Computes one-year gain or loss under simultaneous within-year decrement
probabilities or an ordered case in which Cause 2 occurs at year-end.
Numeric arguments may be scalar or compatible vectors.
}
\examples{
gain_loss_md(
  Vt = 115, G = 16, r = 0, e = 3, i = 0.06,
  b1 = 1000, b2 = 110, q1 = 0.01, q2 = 0.10, Vt1 = 128.83
)

}
