% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reserve_ch11.R
\name{decompGg_disc}
\alias{decompGg_disc}
\title{Ordered decomposition of gross gain}
\usage{
decompGg_disc(
  VtG,
  Vt1G,
  G,
  i_assumed,
  q_assumed,
  r_assumed = 0,
  e_assumed = 0,
  s_assumed = 0,
  i_actual,
  q_actual,
  r_actual = 0,
  e_actual = 0,
  s_actual = 0,
  b = 1,
  order = c("interest", "mortality", "expense")
)
}
\arguments{
\item{VtG}{Gross reserve at duration \code{t}.}

\item{Vt1G}{Gross reserve at duration \code{t + 1}.}

\item{G}{Gross premium.}

\item{i_assumed}{Assumed annual effective interest rate.}

\item{q_assumed}{Assumed mortality probability.}

\item{r_assumed}{Assumed percent-of-premium expense rate.}

\item{e_assumed}{Assumed per-policy expense.}

\item{s_assumed}{Assumed settlement expense.}

\item{i_actual}{Actual annual effective interest rate.}

\item{q_actual}{Actual mortality probability.}

\item{r_actual}{Actual percent-of-premium expense rate.}

\item{e_actual}{Actual per-policy expense.}

\item{s_actual}{Actual settlement expense.}

\item{b}{Benefit amount.}

\item{order}{Character vector containing \code{"interest"},
\code{"mortality"}, and \code{"expense"} exactly once.}
}
\value{
For scalar input, a named numeric vector. For vectorized input,
  a numeric matrix with columns \code{total_gain}, \code{interest},
  \code{mortality}, \code{expense}, and \code{check}.
}
\description{
Decomposes gross gain into interest, mortality, and expense components
in a user-specified order.
}
\details{
For scalar input, the function returns a named numeric vector. For
vectorized input, it returns a numeric matrix with one row per calculation.
}
\examples{
decompGg_disc(
  VtG = 3950.73,
  Vt1G = 4607.07,
  G = 685,
  i_assumed = 0.06,
  q_assumed = 0.00592,
  r_assumed = 0.05,
  e_assumed = 0,
  s_assumed = 300,
  i_actual = 0.065,
  q_actual = 0.005,
  r_actual = 0.06,
  e_actual = 0,
  s_actual = 100,
  b = 50000
)

}
